本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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]);
}
}
示例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);
示例6: decode
public function decode($segments)
{
Req::set('GET', 'view', 'script');
return parent::decode($segments);
}
示例7: decode
public function decode($segments)
{
if (empty($segments[0])) {
Req::set('GET', 'view', 'index');
}
}