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


PHP URI::getInstance方法代码示例

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


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

示例1: _init

 private static function _init()
 {
     self::$objs['benchmark'] = new benchmark();
     self::$objs['config'] = new Config();
     self::$objs['lang'] = new Lang();
     self::$objs['uri'] = URI::getInstance();
     self::$objs['view'] = new View();
 }
开发者ID:rushuinet,项目名称:yiee,代码行数:8,代码来源:Yiee.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->auth = Auth::getInstance();
     if (!$this->auth->hasIdentity()) {
         $this->redirect('/');
     }
     $this->session = \Uno\Session::getInstance();
     $current = \URI::getInstance()->segment(2);
     $this->template->header = new \View('header');
     $topmenu = array(array('name' => _('Dashboard'), 'link' => '/admin', 'active' => '' == $current), array('name' => _('Menus'), 'link' => '/admin/menus', 'active' => 'menus' == $current), array('name' => _('Layouts'), 'link' => '', 'active' => 'layouts' == $current), array('name' => _('Widgets'), 'link' => '', 'active' => 'widgets' == $current), array('name' => _('Modules'), 'link' => '/admin/modules', 'active' => strpos($current, 'module') !== FALSE));
     $this->template->header->topmenu = $topmenu;
     $this->template->jscript('/admin/index/resource/admin.js');
 }
开发者ID:hayate,项目名称:UnoCMS,代码行数:14,代码来源:Index.php

示例3: OpenForm

 public static function OpenForm($action = NULL, $method = 'post', $upload = FALSE, array $attribs = array())
 {
     if (NULL === $action) {
         $action = \URI::getInstance()->current();
     }
     $buf = '<form action="' . $action . '" method="' . $method . '"';
     if ($upload) {
         $buf .= ' enctype="multipart/form-data"';
     }
     foreach ($attribs as $key => $val) {
         $buf .= " {$key}=\"{$val}\"";
     }
     $buf .= '>';
     echo $buf . "\n";
 }
开发者ID:hayate,项目名称:unophp,代码行数:15,代码来源:Html.php

示例4: getUrlString

function getUrlString()
{
    $uri = URI::getInstance();
    return $uri->toString();
}
开发者ID:juslee,项目名称:e27,代码行数:5,代码来源:sidebar.php

示例5: __construct

 public function __construct()
 {
     $this->uri = URI::getInstance();
     $this->request = Request::getInstance();
     $this->input = Input::getInstance();
 }
开发者ID:hayate,项目名称:unophp,代码行数:6,代码来源:uno.php

示例6: settings

 /**
  * @menu Settings
  */
 public function settings()
 {
     var_dump(__METHOD__, \URI::getInstance()->current());
 }
开发者ID:hayate,项目名称:UnoCMS,代码行数:7,代码来源:Admin.php


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