function fileActionPhase() { $dispatcher =& CSR::get('dispatcher'); $target = $dispatcher->getTarget(); if (!file_exists($target)) { return CSR::triggerEvent(EVENT_DISPATCH_ERROR, array('status' => 404, 'message' => 'File action missing.', 'type' => 'FILE_ACTION_MISSING')); } ob_start(); require $target; CSR::set('content', ob_get_clean()); CSR::phaseTo(PHASE_OUTPUT); }