build() public method

public build ( )
Exemplo n.º 1
0
 public function setProxy($host, $port = 8080, $user = null, $pass = null)
 {
     $uri = new Uri(array('scheme' => 'tcp', 'host' => $host, 'port' => $port));
     if (!empty($user)) {
         $uri->user = $user;
         if (!empty($pass)) {
             $uri->pass = $pass;
         }
     }
     $this->setOption('proxy', $uri->build());
 }