gyro/core/controller/base/routes/notfoundroute.cls.php
Go to the documentation of this file.00001 <?php 00002 require_once dirname(__FILE__) . '/routebase.cls.php'; 00003 00004 /** 00005 * A route to handle the case of no dispatch token beeing found 00006 * 00007 * @author Gerd Riesselmann 00008 * @ingroup Controller 00009 */ 00010 class NotFoundRoute extends RouteBase { 00011 /** 00012 * Constructor 00013 */ 00014 public function __construct($path) { 00015 parent::__construct( 00016 $path, 00017 null, 00018 '', 00019 new NotFoundRenderDecorator() 00020 ); 00021 } 00022 00023 /** 00024 * Return a string that identifies this Route - e.g for debug purposes 00025 */ 00026 public function identify() { 00027 return '404-Not-Found'; 00028 } 00029 00030 00031 /** 00032 * Invokes assigned controller 00033 * 00034 * @param object Page data object 00035 * @return mixed Either error code or nothing 00036 */ 00037 public function invoke($page_data) { 00038 $page_data->status_code = CONTROLLER_NOT_FOUND; 00039 $page_data->head->title = tr('Page not found', 'core'); 00040 } 00041 } 00042 ?>