本文整理匯總了PHP中http::getInstance方法的典型用法代碼示例。如果您正苦於以下問題:PHP http::getInstance方法的具體用法?PHP http::getInstance怎麽用?PHP http::getInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類http
的用法示例。
在下文中一共展示了http::getInstance方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
function __construct()
{
$this->session = session::getInstance();
$this->post = post::getInstance();
$this->get = get::getInstance();
$this->http = http::getInstance();
$this->file = new file();
$this->cookie = new cookie(config('cookie'));
}
示例2: __construct
function __construct()
{
$this->session = session::getInstance();
$this->post = post::getInstance();
$this->get = get::getInstance();
$this->http = http::getInstance();
$this->file = file::getInstance();
$this->cookie = cookie::getInstance();
}
示例3: url
/**
* url生成
* @param unknown $parameter
* @return mixed
*/
function url($parameter)
{
$http = http::getInstance();
$c = isset($parameter['c']) ? $parameter['c'] : '';
$a = isset($parameter['a']) ? $parameter['a'] : '';
$urlencode = false;
if (isset($parameter['urlencode'])) {
$urlencode = $parameter['urlencode'];
unset($parameter['urlencode']);
}
unset($parameter['c']);
unset($parameter['a']);
$array = array('c' => $c, 'a' => $a, 'array' => $parameter);
if (!$urlencode) {
return call_user_func_array(array($http, 'url'), $array);
} else {
return urlencode(call_user_func_array(array($http, 'url'), $array));
}
}
示例4: __construct
function __construct()
{
$this->_config = config('system');
$this->_http = http::getInstance();
$this->_log = new log();
}