本文整理汇总了PHP中Am_HttpRequest::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_HttpRequest::__construct方法的具体用法?PHP Am_HttpRequest::__construct怎么用?PHP Am_HttpRequest::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_HttpRequest
的用法示例。
在下文中一共展示了Am_HttpRequest::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($api_key)
{
$this->api_key = $api_key;
parent::__construct();
$this->setMethod(self::METHOD_POST);
$this->setUrl($this->endpoint);
}
示例2: __construct
public function __construct(Am_Paysystem_Abstract $plugin)
{
$this->plugin = $plugin;
$cert_file = APPLICATION_PATH . '/configs/cert_key_pem.txt';
if (is_file($cert_file) && is_readable($cert_file)) {
$this->use_cert = true;
}
if (!$this->use_cert) {
$url = $this->plugin->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL;
} else {
$url = $this->plugin->getConfig('testing') ? self::CERT_SANDBOX_URL : self::CERT_LIVE_URL;
}
parent::__construct($url, self::METHOD_POST);
if ($adapter = $this->plugin->createHttpRequest()->getConfig('adapter')) {
$this->setConfig('adapter', $adapter);
}
// Check certificate file.
if ($this->use_cert) {
$this->setConfig('ssl_local_cert', $cert_file);
}
// Check certificate file.
$ca_file = APPLICATION_PATH . "/configs/api_cert_chain.crt";
if ($this->use_cert && is_file($ca_file) && is_readable($ca_file)) {
$this->setConfig('ssl_cafile', $cert_file);
}
if (!$this->use_cert) {
$this->addPostParameter('SIGNATURE', $this->plugin->getConfig('api_signature'));
}
$this->addPostParameter('VERSION', '63.0')->addPostParameter('BUTTONSOURCE', 'CgiCentral.aMemberPro')->addPostParameter('USER', $this->plugin->getConfig('api_username'))->addPostParameter('PWD', $this->plugin->getConfig('api_password'));
}
示例3: __construct
public function __construct(Am_Paysystem_Abstract $plugin)
{
$this->plugin = $plugin;
parent::__construct($this->plugin->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL, self::METHOD_POST);
if ($adapter = $this->plugin->createHttpRequest()->getConfig('adapter')) {
$this->setConfig('adapter', $adapter);
}
$this->addPostParameter('VERSION', '63.0')->addPostParameter('SIGNATURE', $this->plugin->getConfig('api_signature'))->addPostParameter('USER', $this->plugin->getConfig('api_username'))->addPostParameter('PWD', $this->plugin->getConfig('api_password'));
}
示例4: __construct
public function __construct($plugin, $requestType)
{
$this->plugin = $plugin;
$this->requestType = $requestType;
parent::__construct();
$this->setUrl($this->plugin->getConfig('testMode') ? Am_Paysystem_Intuit::URL_TEST : Am_Paysystem_Intuit::URL_LIVE);
$this->setMethod(Am_Request::METHOD_POST);
$this->setHeader('Content-type', 'application/x-qbmsxml');
}
示例5: __construct
public function __construct($url, $debug = false)
{
parent::__construct();
$this->setMethod(self::METHOD_POST);
$this->setHeader('Content-type: text/xml; charset=utf-8');
$this->setUrl($url);
$this->debuglog = $debug;
}
示例6: __construct
public function __construct($xmlOut, $requestType, $debugMode = false)
{
$this->requestType = $requestType;
$this->debugMode = $debugMode;
parent::__construct(Am_Paysystem_PaymentExpress::URL, self::METHOD_POST);
$this->setBody($xmlOut);
}
示例7: __construct
public function __construct(Am_Newsletter_Plugin_Madmimi $plugin)
{
$this->plugin = $plugin;
parent::__construct();
}
示例8: __construct
public function __construct(Am_Newsletter_Plugin_Icontact $plugin)
{
parent::__construct();
if ($plugin->getConfig('testmode')) {
$this->setLink($this->urlTest . '/icp/a/' . $plugin->getConfig('accountid') . '/c/' . $plugin->getConfig('clientfolderid'));
} else {
$this->setLink($this->urlWork . '/icp/a/' . $plugin->getConfig('accountid') . '/c/' . $plugin->getConfig('clientfolderid'));
}
$this->debugLog = $plugin->getConfig('debuglog');
$this->setHeader(array('Accept: application/json', 'Content-Type: application/json', 'Api-Version: 2.0', 'Api-Username: ' . $plugin->getConfig('user'), 'Api-AppId: ' . $plugin->getConfig('apiappid'), 'Api-Password: ' . $plugin->getConfig('apipass')));
}
示例9: __construct
public function __construct(Am_Newsletter_Plugin_Autoresponderpro $plugin)
{
$this->plugin = $plugin;
parent::__construct();
$this->setMethod(self::METHOD_POST);
$this->setHeader('Content-type: text/xml; charset=utf-8');
$this->setUrl($this->url);
}
示例10: __construct
public function __construct($account_id, $auth_token)
{
$this->account_id = $account_id;
$this->auth_token = $auth_token;
parent::__construct();
}
示例11: __construct
public function __construct(Am_Newsletter_Plugin_Sendgrid $plugin)
{
$this->plugin = $plugin;
parent::__construct();
$this->setMethod(self::METHOD_POST);
}