本文整理汇总了PHP中Index::process方法的典型用法代码示例。如果您正苦于以下问题:PHP Index::process方法的具体用法?PHP Index::process怎么用?PHP Index::process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Index
的用法示例。
在下文中一共展示了Index::process方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
if ($result->num_rows > 0) {
if ($annotation->role) {
while ($row = $result->fetch_assoc()) {
if ($annotation->role != $row['role']) {
return false;
}
}
}
$db->close();
return true;
} else {
$db->close();
return false;
}
}
function extendAuthentication($ticket)
{
$db = new Database('tazapi');
$db->open();
$dateTime = new DateTime('+1 hour', new DateTimeZone('Europe/Vilnius'));
$expires = $dateTime->format('Y-m-d H:i:s');
$sql = "UPDATE tickets SET expires='" . $expires . "' WHERE ticket = '" . $ticket . "';";
$db->conn()->query($sql);
$db->close();
}
}
$indexWebscript = new Index();
$indexWebscript->process($_GET['webscript'], $_GET['method']);
?>
示例2: unset
$request_data['action'] = $args['action'];
unset($args['action']);
} else {
if (DEBUG) {
echo "Warning: No action defined. Usage: index.php --action=<action>\n";
}
}
/**
* Load the script arguments.
*/
$request_data['args'] = $args;
} else {
/**
* Has an action been defined.
*/
if (isset($_GET['action'])) {
$request_data['action'] = $_GET['action'];
} else {
if (DEBUG) {
echo "Warning: No action defined. <br/>Usage: index.php?action=<action><br/>";
}
}
/**
* Load the page data.
*/
$request_data['data']['get'] = $_GET;
$request_data['data']['post'] = $_POST;
}
$index = new Index($request_data);
$index->process();
示例3: testTemplateManagerWithDifferentTemplate
public function testTemplateManagerWithDifferentTemplate()
{
$app = new Index();
$app->controller = "index";
$app->action = "test";
$app->template = "template_2.php";
$app->process();
$this->assertTrue(is_a($app, "index"));
$this->assertEquals($app->table, "foo");
$html = $app->loadApp();
$this->assertTrue(strpos($html, "DOCTYPE html>") > 0);
$this->assertTrue(strpos($html, "<meta charset=\"UTF-8\">") > 0);
$this->assertTrue(strpos($html, "<title>A template with a different title</title>") > 0);
$this->assertTrue(strpos($html, "Some text inside the view:FooBar-foo") > 0);
$this->assertTrue(strpos($html, "</html>") > 0);
}