php5/__autoload
| 3510 | no demo link | [ code ] | 2007-04-04 08:40:00 |
This simple function check valid fileclass and include_once them if it's a file.
Update:
now this function allows user to manage multiple Exceptions:
try {
$test = new Test;
$test->Add(new Pippo);
$test->Get(new Pluto);
}
catch(Test $e) {
exit($e->getMessage());
}
catch(Pippo $e) {
exit($e->getMessage());
}
catch(Exception $e) {
exit($e->getMessage());
}
Update:
now this function allows user to manage multiple Exceptions:
try {
$test = new Test;
$test->Add(new Pippo);
$test->Get(new Pluto);
}
catch(Test $e) {
exit($e->getMessage());
}
catch(Pippo $e) {
exit($e->getMessage());
}
catch(Exception $e) {
exit($e->getMessage());
}