gyro/modules/console/controller/base/consolerouter.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Router for route invoked in Console 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Console 00007 */ 00008 class ConsoleRouter extends RouterBase { 00009 protected $path; 00010 00011 public function __construct($path, $class_instantiater) { 00012 $this->path = $path; 00013 parent::__construct($class_instantiater); 00014 } 00015 00016 00017 /** 00018 * Returns the current path, preprocessed 00019 * 00020 * If index page is invoked, '.' is returned 00021 * 00022 * @return string The current path, e.g. path/to/page 00023 */ 00024 protected function get_path() { 00025 $path = $this->path; 00026 if (empty($path) || $path == '/') { 00027 $path = '.'; 00028 } 00029 return $path; 00030 } 00031 }