-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dispatch
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* Created by lyx. | ||
* User: [email protected] | ||
* Date: 14-7-9 | ||
* Time: 下午5:54 | ||
*/ | ||
namespace Tiny; | ||
|
||
class Dispatch | ||
{ | ||
public $routes; | ||
|
||
public function __construct(array $routes) | ||
{ | ||
$this->routes = $routes; | ||
} | ||
|
||
public function controller($path) | ||
{ | ||
|
||
} | ||
|
||
|
||
/** | ||
* Parse the given URL path and return the correct controller and parameters. | ||
* | ||
* @param string $path segment of URL | ||
* @param array $routes to test against | ||
* @return array | ||
*/ | ||
public function route($path) | ||
{ | ||
|
||
} | ||
} |