Added Phpdoc to the Route::add method

For easier understanding of accepted types and better code validation support
This commit is contained in:
Sander A 2019-02-22 01:08:36 +02:00
parent 33c54c8511
commit 4322382046

View File

@ -6,6 +6,13 @@ class Route{
private static $pathNotFound = null;
private static $methodNotAllowed = null;
/**
* Function used to add a new route
* @param string $expression Route string or expression
* @param callable $function Function to call when route with allowed method is found
* @param string|array $method Either a string of allowed method or an array with string values
*
*/
public static function add($expression, $function, $method = 'get'){
array_push(self::$routes,Array(
'expression' => $expression,