example:
Code: Select all
<?php
class Core
{
/* ... */
static function _include($path)
{
try {
if(!empty($path) && file_exists($path))
include($path);
else
throw new Exception("Unable to include file at location: {$path}. File does not exist.");
} catch(Exception $e) {
//TODO: Register Error and Log to Syslog
exit($e->getMessage());
}
}
/* ... */
}
?>
This is tricky where I include a "config" file for a static menu contents, and then include the decorator object.
Has anyone come up with any slick solutions to this problem?