当前位置: 首页>>代码示例>>PHP>>正文


PHP RequestUtil::GetRemoteHost方法代码示例

本文整理汇总了PHP中RequestUtil::GetRemoteHost方法的典型用法代码示例。如果您正苦于以下问题:PHP RequestUtil::GetRemoteHost方法的具体用法?PHP RequestUtil::GetRemoteHost怎么用?PHP RequestUtil::GetRemoteHost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RequestUtil的用法示例。


在下文中一共展示了RequestUtil::GetRemoteHost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor initializes the controller.  This method cannot be overriden.  If you need
  * to do something during construction, add it to Init
  *
  * @param Phreezer $phreezer Object persistance engine
  * @param IRenderEngine $renderEngine rendering engine
  * @param Context (optional) a context object for persisting the state of the current page
  * @param Router (optional) a custom writer for URL formatting
  */
 final function __construct(Phreezer $phreezer, $renderEngine, $context = null, IRouter $router = null)
 {
     $this->Phreezer =& $phreezer;
     $this->RenderEngine =& $renderEngine;
     // for backwards compatibility
     $this->Smarty =& $renderEngine;
     $ra = RequestUtil::GetRemoteHost();
     $this->GUID = $this->Phreezer->DataAdapter->GetDBName() . "_" . str_replace(".", "_", $ra);
     $this->_router = $router ? $router : new GenericRouter();
     if ($context) {
         $this->Context =& $context;
     } else {
         $this->Context = new Context();
         $this->Context->GUID = "CTX_" . $this->GUID;
     }
     if ($this->RenderEngine) {
         // assign some variables globally for the views
         $this->Assign("CURRENT_USER", $this->GetCurrentUser());
         $this->Assign("URL", $this->GetRouter());
         $this->Assign("BROWSER_DEVICE", $this->GetDevice());
         // if feedback was persisted, set it
         $feedback = $this->Context->Get("feedback");
         // print_r($feedback); die('feedback');
         if (is_array($feedback)) {
             foreach ($feedback as $key => $val) {
                 $this->Assign($key, $val);
             }
         } else {
             $this->Assign("feedback", $feedback);
         }
         $this->Context->Set("feedback", null);
     }
     $this->Init();
 }
开发者ID:stevetx30,项目名称:phreeze,代码行数:43,代码来源:Controller.php


注:本文中的RequestUtil::GetRemoteHost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。