private function setRestDriver($restDriver)
    {
        $namespace = '\\' . __NAMESPACE__ . '\\RestClient\\';
        $driver = $namespace . $restDriver;
        $parent = $namespace . 'DriverInterface';

        if (
            empty($restDriver)
            || !class_exists($driver)
            || !is_subclass_of($driver, $parent)
        ) {
            throw new InvalidArgumentException('rest driver', $driver);
        }

        // create a new REST Driver
        $this->restDriver = new $driver();
        if (isset($this->url)) {
            $this->restDriver->setHost($this->url);
        }
    }
private function setRestDriver($restDriver)
    {
        $namespace = '\\' . __NAMESPACE__ . '\\RestClient\\';
        $driver = $namespace . $restDriver;
        $parent = $namespace . 'DriverInterface';

        if (
            empty($restDriver)
            || !class_exists($driver)
            || !is_subclass_of($driver, $parent)
        ) {
            throw new InvalidArgumentException('rest driver', $driver);
        }

        // create a new REST Driver
        $this->restDriver = new $driver();
        if (isset($this->url)) {
            $this->restDriver->setHost($this->url);
        }
    }
private function setRestDriver ( $ restDriver ) { $ namespace = '\\' . __NAMESPACE__ . '\\RestClient\\' ; $ driver = $ namespace . $ restDriver ; $ parent = $ namespace . 'DriverInterface' ; if ( empty ( $ restDriver ) || ! class_exists ( $ driver ) || ! is_subclass_of ( $ driver , $ parent ) ) { throw new InvalidArgumentException ( 'rest driver' , $ driver ) ; } // create a new REST Driver $ this -> restDriver = new $ driver ( ) ; if ( isset ( $ this -> url ) ) { $ this -> restDriver -> setHost ( $ this -> url ) ; } }
Create and set the REST driver to be used.

@param string $restDriver REST driver class name
Create and set the REST driver to be used .