function test() { D::show($this->__pull, 'pull'); D::show(($this->__data), 'first data'); }
{ echo "in SE: accessing SC\n"; var_dump(get_class_vars('SC')); echo "in SE: accessing SD\n"; var_dump(get_class_vars('SD')); echo "in SE: accessing SE\n"; var_dump(get_class_vars('SE')); } } echo ">>> testing instance variables from global scope\n"; echo "accessing C\n"; var_dump(get_class_vars('C')); echo "accessing D\n"; var_dump(get_class_vars('D')); echo "accessing E\n"; var_dump(get_class_vars('E')); echo ">>> testing instance variables from class scope\n"; C::show(); D::show(); E::show(); echo ">>> testing static variables from global scope\n"; echo "accessing SC\n"; var_dump(get_class_vars('SC')); echo "accessing SD\n"; var_dump(get_class_vars('SD')); echo "accessing SE\n"; var_dump(get_class_vars('SE')); echo ">>> testing static variables from class scope\n"; SC::show(); SD::show(); SE::show();
static function warn($warning='Warning') { //D::show('WHAT'); if(self::$config['warnings']) { if(!extension_loaded('xdebug')) { D::show(D::stack(), $warning); } trigger_error($warning); } }
function redirect($uri = '', $http_response_code = 302) { if(substr($uri, 0, 7) != 'http://') { //@todo fix this so it works with https /* $this->callRoute($uri); exit; */ if($uri == '/') { $uri = SITE_URL; } else { $uri = SITE_URL . $uri; } } //@todo make this be set off with the debug switch. and if debugging is on it should show a link to the page it would have forwarded to. if(headers_sent()) { D::show('Headers already sent.', B::a(array('href' => $uri), $uri)); } else { header('Location: ' . $uri, TRUE, $http_response_code); /* @todo you should call an app end event here.*/ SweetFramework::end(true); } }