03-31-2009, 04:57 PM
|
#25 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Quote:
|
define will *not* emit an error, plus many SAPI's will not define PATH_INFO (for example Apache2 must have AcceptPathInfo = On)
|
The '@' is there to prevent an error from $_SERER['PATH_INFO'] which, oddly, sometimes gives an error even whe it is present.
PHP Code:
if(!empty($route[preg_replace('/^(\/)/','',$url)]))
Does not produce an E_NOTICE error.
PHP Code:
eval("\$_controller->{$url[1]}($arguments);");
Quote:
|
this can be very very dangerous, php already supports variable functions, functors and so on, use the call_user_func[_array] functions and don't build arguments in a string but rather an array and run it like:
|
PHP Code:
call_user_func_array(Array($_controller, $url[1]), $arguments);
Thanks, I'll try that
Quote:
|
ps. your changelog is a .ini, but its not a real ini file?
|
Lol, actually I did that because it is easier to read in my text editor. I should probably change that! I'll also see about little performance enhancements like changing double quotes to single quotes.
So, any thoughts on the the framework from a application developers perspective? Like, how controllers work, how you access views, ect...
|
|
|
|