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


PHP Req::set方法代码示例

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


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

示例1: decode

 public function decode($segments)
 {
     foreach ($segments as $index => $value) {
         if (empty($value) || !isset($this->segments[$index])) {
             continue;
         }
         Req::set('GET', $this->segments[$index], $value);
     }
 }
开发者ID:jasonrey,项目名称:project-test-report,代码行数:9,代码来源:router.php

示例2: decode

 public function decode($segments)
 {
     if (count($segments) >= 3) {
         $view = array_shift($segments);
         $api = array_shift($segments);
         $action = array_shift($segments);
         Req::set('GET', 'api', $api);
         Req::set('GET', 'action', $action);
     }
 }
开发者ID:jasonrey,项目名称:project-test-report,代码行数:10,代码来源:api.php

示例3: decode

 public function decode($segments = array())
 {
     $total = count($segments);
     foreach ($segments as $index => $value) {
         if (!isset($this->segments[$index])) {
             continue;
         }
         Req::set('GET', $this->segments[$index], $value);
     }
 }
开发者ID:jasonrey,项目名称:lab-page,代码行数:10,代码来源:router.php

示例4: decode

 public function decode($segments)
 {
     if (count($segments) === 1) {
         Req::set('GET', 'view', 'admin');
         return;
     }
     $systemKey = array('login', 'logout', 'create');
     if (in_array($segments[1], $systemKey)) {
         Req::set('GET', 'controller', 'admin');
     } else {
         Req::set('GET', 'view', 'admin');
     }
     Req::set('GET', 'type', $segments[1]);
     if (!empty($segments[2])) {
         Req::set('GET', 'subtype', $segments[2]);
     }
 }
开发者ID:jasonrey,项目名称:project-test-report,代码行数:17,代码来源:admin.php

示例5: array

line-height: 130%;
padding: 8px 13px 8px 10px;
text-decoration: none;
">Remove the folder ' . DIRECTORY_SEPARATOR . 'setup</a> before you start using Flyspray</p>
');
}
# load the correct $proj early also for checks on quickedit.php taskediting calls
if (BASEDIR . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'callbacks' . DIRECTORY_SEPARATOR . 'quickedit.php' == $_SERVER['SCRIPT_FILENAME'] && Post::num('task_id')) {
    $result = $db->Query('SELECT project_id FROM {tasks} WHERE task_id = ?', array(Post::num('task_id')));
    $project_id = $db->FetchOne($result);
} elseif (in_array(Req::val('do'), array('details', 'depends', 'editcomment'))) {
    if (Req::num('task_id')) {
        $result = $db->Query('SELECT project_id FROM {tasks} WHERE task_id = ?', array(Req::num('task_id')));
        $project_id = $db->FetchOne($result);
    }
}
if (Req::val('do') == 'pm' && Req::val('area') == 'editgroup') {
    if (Req::num('id')) {
        $result = $db->Query('SELECT project_id FROM {groups} WHERE group_id = ?', array(Req::num('id')));
        $project_id = $db->FetchOne($result);
    }
}
if (!isset($project_id)) {
    $project_id = $fs->prefs['default_project'];
    # Force default value if input format is not allowed
    if (is_array(Req::val('project'))) {
        Req::set('project', $fs->prefs['default_project']);
    }
    $project_id = Req::val('project', Req::val('project_id', $project_id));
}
$proj = new Project($project_id);
开发者ID:krayon,项目名称:flyspray,代码行数:31,代码来源:header.php

示例6: decode

 public function decode($segments)
 {
     Req::set('GET', 'view', 'script');
     return parent::decode($segments);
 }
开发者ID:jasonrey,项目名称:project-test-report,代码行数:5,代码来源:script.php

示例7: decode

 public function decode($segments)
 {
     if (empty($segments[0])) {
         Req::set('GET', 'view', 'index');
     }
 }
开发者ID:jasonrey,项目名称:project-test-report,代码行数:6,代码来源:index.php


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