2 Star 2 Fork 0

纸喵软件 / frame-php

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Route.php 714 Bytes
Copy Edit Web IDE Raw Blame History
倒霉狐狸(公司PC) authored 2018-11-27 09:28 . feat: 提交纸喵框架
<?php
/**
* 路由解析
* Created by PhpStorm.
* User: 倒霉狐狸
* Date: 2018-08-07
* Time: 11:54
*/
namespace zhimiao;
class Route {
public static $c = null, $a = null;
/**
* 初始化路由解析
* @throws \Exception
*/
public static function init()
{
self::$c = Request::get('c', 'index');
self::$a = Request::get('a', 'index');
$class = self::$c = "app\\api\\". self::$c;
unset($_GET['c']);
unset($_GET['a']);
}
/**
* 获取解析的控制器/操作
* @return array
*/
public static function getMeta()
{
return [
'c' => self::$c,
'a' => self::$a
];
}
}

Comment ( 0 )

Sign in for post a comment

PHP
1
https://gitee.com/zhimiao/frame-php.git
git@gitee.com:zhimiao/frame-php.git
zhimiao
frame-php
frame-php
master

Search

103611 48b8ff67 1899542 103622 4d02230c 1899542