本文整理匯總了PHP中router::get_protocol方法的典型用法代碼示例。如果您正苦於以下問題:PHP router::get_protocol方法的具體用法?PHP router::get_protocol怎麽用?PHP router::get_protocol使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類router
的用法示例。
在下文中一共展示了router::get_protocol方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct($object = false)
{
if (!$object) {
return;
}
$this->controller = $object->controller;
$this->data = new view\data();
$this->data->url = object();
$this->data->include = object();
$this->data->global = object();
$this->url = $this->data->url;
$this->global = $this->data->global;
$this->include = $this->data->include;
// default data property
$this->data->macro['forms'] = 'includes/macro/forms.html';
// default display value
$this->data->display['mvc'] = "includes/mvc/display.html";
$myurl = router::get_protocol() . '://' . router::get_domain() . $_SERVER['REQUEST_URI'];
if (isset($_SERVER['HTTP_REFERER']) && isset($_SESSION['debug'][md5($_SERVER['HTTP_REFERER'])])) {
$myurl = $_SERVER['HTTP_REFERER'];
}
if (isset($_SESSION['debug'][md5($myurl)])) {
$this->data->debug = $_SESSION['debug'][md5($myurl)];
// if(isset($_SESSION['debug'][md5($myurl)]['show']))
unset($_SESSION['debug'][md5($myurl)]);
// else
// $_SESSION['debug'][md5($myurl)]['show'] = true;
}
array_push($this->twig_include_path, root);
if (method_exists($this, 'mvc_construct')) {
$this->mvc_construct();
}
}
示例2: __construct
/**
* constructor
* @param boolean $object controller
*/
public function __construct($object = false)
{
if (!$object) {
return;
}
$this->controller = $object->controller;
$this->data = new view\data();
$this->data->url = object();
$this->data->include = object();
$this->data->global = object();
$this->url = $this->data->url;
$this->global = $this->data->global;
$this->include = $this->data->include;
// default data property
$this->data->macro['forms'] = 'includes/macro/forms.html';
$this->data->display['mvc'] = "includes/mvc/display.html";
$this->data->display['main'] = "content/main/layout.html";
$this->data->display['home'] = "content/home/display.html";
$this->data->display['cp'] = "content_cp/home/layout.html";
$this->data->display['account'] = "content_account/home/layout.html";
$this->data->template['header'] = 'content/template/header.html';
$this->data->template['sidebar'] = 'content/template/sidebar.html';
$this->data->template['footer'] = 'content/template/footer.html';
$this->data->saloos['version'] = \lib\saloos::getLastVersion();
$this->data->saloos['lastUpdate'] = \lib\saloos::getLastUpdate();
$this->data->saloos['langlist'] = ['fa_IR' => 'Persian - فارسی', 'en_US' => 'English', 'ar_SU' => 'Arabic - العربية'];
$myurl = router::get_protocol() . '://' . router::get_domain() . $_SERVER['REQUEST_URI'];
if (isset($_SERVER['HTTP_REFERER']) && isset($_SESSION['debug'][md5($_SERVER['HTTP_REFERER'])])) {
$myurl = $_SERVER['HTTP_REFERER'];
}
if (isset($_SESSION['debug'][md5($myurl)])) {
$this->data->debug = $_SESSION['debug'][md5($myurl)];
// if(isset($_SESSION['debug'][md5($myurl)]['show']))
unset($_SESSION['debug'][md5($myurl)]);
// else
// $_SESSION['debug'][md5($myurl)]['show'] = true;
}
if (method_exists($this, 'mvc_construct')) {
$this->mvc_construct();
}
}