Пример #1
0
 /**
  * Constructor, gateway to another dimension.
  * Creates and sets a new session and command builder instance
  * Sets the logging interface
  *
  * @param TransportInterface $transport
  */
 public function __construct(TransportInterface &$transport)
 {
     $this->transport =& $transport;
     $this->session = Factory::getSession();
     $this->ociBuilder = Factory::getBuilder($this->session);
     $this->errorControl = Factory::getErrorControl();
     $this->transport->updateSession($this->session);
 }
Пример #2
0
 /**
  * Constructor, sets up transport ready for use.
  *
  * @param string $url
  * @param int $timeout
  * @param bool $autoLogout
  * @param bool $followRedirects
  * @param null $proxy
  */
 public function __construct($url, $timeout = 10, $autoLogout = true, $followRedirects = true, $proxy = null)
 {
     $this->errorControl =& Factory::getErrorControl();
     $this->url = $url;
     $this->autoLogout = $autoLogout;
     $this->followRedirects = $followRedirects;
     $this->proxy = $proxy;
     $this->timeout = $timeout;
 }