__construct() public method

Construct
public __construct ( $base_url = null )
$base_url
コード例 #1
0
ファイル: Request.php プロジェクト: brightbrothers/Mackey
 /**
  *	Конструктор
  *
  *	@param	string	$base_url
  */
 public function __construct($base_url = null)
 {
     parent::__construct($base_url);
     $this->setOpt(CURLOPT_SSL_VERIFYPEER, false);
     $this->setJsonDecoder(function ($response) {
         if (($json_obj = json_decode($response, true)) !== null) {
             return $json_obj;
         }
         return $response;
     });
 }
コード例 #2
0
ファイル: HiboutikAPI.php プロジェクト: hiboutik/hiboutikapi
 public function __construct($account, $user, $key)
 {
     try {
         if (count(func_get_args()) !== 3) {
             throw new \Exception("HiboutikAPI: The contructor expects exactly 3 (three) arguments.");
         }
         $this->account_connection = "https://" . $account . ".hiboutik.com/apirest";
         $this->user_connection = $user;
         $this->key_connection = $key;
         $this->debug = false;
         parent::__construct();
         $user_agent = "HiboutikAPI v" . self::VERSION_API . " (+https://github.com/hiboutik/hiboutikapi)";
         $user_agent .= " PHP/" . PHP_VERSION;
         $curl_version = curl_version();
         $user_agent .= ' curl/' . $curl_version['version'];
         $this->setUserAgent($user_agent);
         $this->setBasicAuthentication($user, $key);
     } catch (\Exception $e) {
         trigger_error($e->getMessage(), E_USER_ERROR);
     }
 }
コード例 #3
0
ファイル: Curl.php プロジェクト: guitarpoet/clips-tool
 public function __construct()
 {
     parent::__construct();
 }
コード例 #4
0
ファイル: CACApi.php プロジェクト: fdisotto/cac-api
 /**
  * Constructor
  *
  * @param array $conf key and login prameters
  */
 public function __construct(array $conf)
 {
     parent::__construct();
     $this->_data = $conf;
 }