| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace Heanup\Frame;
- class Router
- {
- protected static $list = array();
- /**
- * 添加路由
- * @param $key
- * @param $value
- */
- public static function add($key, $value)
- {
- self::$list[$key] = $value;
- }
- /**
- * 移除路由
- * @param $key
- */
- public static function remove($key)
- {
- if (isset(self::$list[$key])) {
- unset(self::$list[$key]);
- }
- }
- /**
- * 获取路由列表
- * @return array
- */
- public static function getList()
- {
- return self::$list;
- }
- }
|