} session_start(); //print_r($GLOBALS); //print_r($_REQUEST); //print_r($_SERVER); //print_r($qs); //echo $_SERVER['REQUEST_URI']; require_once 'conf.php'; require_once 'router.php'; $req_uri = filter_input(INPUT_SERVER, 'REQUEST_URI'); //echo $req_uri; //$post_get = (filter_input_array(INPUT_POST) ?: array()) + (filter_input_array(INPUT_GET) ?: array()); $post = filter_input_array(INPUT_POST); if (isset($post)) { foreach ($post as $k => $zzz) { tester::TEST($k . "=>" . $zzz); } } /* if (isset($_POST["test_zzz"])) tester::TEST("____hura"); else tester::TEST("____QQQ");*/ $router = new Router($req_uri, $post); $ctrl = $router->Controller() ?: DEFAULT_CTRL; if (strtolower($ctrl) == 'index.php') { $ctrl = DEFAULT_CTRL; } $ctrl_php = 'controller_' . strtolower($ctrl) . '.php'; $ctrl_class = 'Controller' . $ctrl; $action = $router->Action() ?: DEFAULT_ACTION; $params = $router->Params();
{ echo "__isset called for [{$a}]\n"; } public function __unset($a) { echo "__unset called for [{$a}]\n"; } public function testFromClass() { echo 'ic1: ' . isset($this->a) . "\n"; echo 'ic2: ' . isset($this->b) . "\n"; echo 'ic3: ' . isset($this->c) . "\n"; echo 'ic4: ' . isset($this->notHere) . "\n"; } } $a = new tester(); echo 'i1: ' . isset($a) . "\n"; echo 'i2: ' . isset($a->a) . "\n"; echo 'i3: ' . isset($a->b) . "\n"; echo 'i4: ' . isset($a->c) . "\n"; echo 'i5: ' . isset($a->notThere) . "\n"; $a->testFromClass(); echo 'u1: '; unset($a->a); echo "\n"; echo 'u2: '; unset($a->b); echo "\n"; echo 'u3: '; unset($a->c); echo "\n";