本文整理汇总了PHP中Params::importFromGet方法的典型用法代码示例。如果您正苦于以下问题:PHP Params::importFromGet方法的具体用法?PHP Params::importFromGet怎么用?PHP Params::importFromGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::importFromGet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadInputData
function loadInputData($params = null)
{
if ($params === null) {
Params::importFromPost();
Params::importFromGet(true);
} else {
Params::importFromArray($params);
}
}
示例2: testParamsImportFromGet
function testParamsImportFromGet()
{
$_GET["hello"] = 5;
$_GET["ciccia"] = "prova";
Params::clear();
Params::importFromGet();
$this->assertTrue(Params::is_set("hello"), "Il parametro hello non e' stato importato correttamente!!");
$this->assertEqual(Params::get("hello"), 5, "Il valore non e' stato importato correttamente!!");
unset($_GET["hello"]);
unset($_GET["ciccia"]);
}
示例3: renderResult
public function renderResult()
{
$request_part = Request::getRequestPart();
$dot_pos = strpos($request_part, ".");
$page_name = substr($request_part, 1, $dot_pos - 1);
$page = PageFactory::create($page_name, new DataHolder());
Params::push();
Params::importFromPost(false);
Params::importFromGet(true);
ob_start();
$page->render();
$page_result = ob_get_contents();
ob_end_clean();
Params::pop();
PageData::instance()->set(Html::get_default_content_save_path(), $page_result);
render(PageData::instance()->get("/"));
//trova il layout e renderizza il tutto.
}
示例4: loadInputData
function loadInputData($params = null)
{
Params::importFromPost();
Params::importFromGet();
}