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