function loadInputData($params = null) { if ($params === null) { Params::importFromPost(); Params::importFromGet(true); } else { Params::importFromArray($params); } }
function testParamsNotset() { $_POST["__not_set_hello"] = 5; Params::clear(); Params::importFromPost(); $this->assertTrue(Params::is_set("hello"), "Il parametro hello non e' stato caricato!!"); $this->assertEqual(Params::get("hello"), "5", "Il parametro hello non e' stato caricato!!"); unset($_POST["__not_set_hello"]); }
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. }
function loadInputData($params = null) { Params::importFromPost(); Params::importFromGet(); }