コード例 #1
0
ファイル: Simples.php プロジェクト: v-technologies/simpl-es
 /**
  * Returns the current client.
  * 
  * @return Simple_Transport
  */
 public static function current(array $config = array())
 {
     if (!isset(self::$_client)) {
         self::$_client = self::client($config);
     }
     if ($config) {
         return self::$_client->config($config);
     }
     return self::$_client;
 }
コード例 #2
0
ファイル: Http.php プロジェクト: v-technologies/simpl-es
 /**
  * Constructor.
  * 
  * @param array $config		[optionnal] Connection configuration.
  */
 public function __construct(array $config = null, Simples_Factory $factory = null)
 {
     // Check : curl installed ?
     if (!extension_loaded('curl')) {
         throw new Simples_Transport_Exception('Curl is not installed (curl_init function doesn\'t exists).');
     }
     return parent::__construct($config, $factory);
 }