本文整理汇总了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();
}