Exemplo n.º 1
0
 protected function connect($url, $username, $password) {
     $client = new Client(array(
         'baseUri' => $url,
         'userName' => $username,
         'password' => $password,
     ));
     try {
         $response = $client->options();
         return $response ? $client : null;
     } catch (Exception $exc) {
         return null;
     }
 }