mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-10 22:22:29 +00:00
Added support for PHP7
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Pecee\SimpleRouter\Route;
|
||||
|
||||
use Pecee\Http\Request;
|
||||
@@ -14,7 +15,7 @@ interface ILoadableRoute extends IRoute
|
||||
* @param string|null $name
|
||||
* @return string
|
||||
*/
|
||||
public function findUrl($method = null, $parameters = null, $name = null);
|
||||
public function findUrl($method = null, $parameters = null, $name = null): string;
|
||||
|
||||
/**
|
||||
* Loads and renders middlewares-classes
|
||||
@@ -30,9 +31,9 @@ interface ILoadableRoute extends IRoute
|
||||
/**
|
||||
* Returns the provided name for the router.
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName();
|
||||
public function getName(): string;
|
||||
|
||||
/**
|
||||
* Check if route has given name.
|
||||
@@ -40,22 +41,22 @@ interface ILoadableRoute extends IRoute
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function hasName($name);
|
||||
public function hasName($name): bool;
|
||||
|
||||
/**
|
||||
* Sets the router name, which makes it easier to obtain the url or router at a later point.
|
||||
*
|
||||
* @param string $name
|
||||
* @return static $this
|
||||
* @return static
|
||||
*/
|
||||
public function setName($name);
|
||||
public function setName($name): self;
|
||||
|
||||
/**
|
||||
* Get regular expression match used for matching route (if defined).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMatch();
|
||||
public function getMatch(): string;
|
||||
|
||||
/**
|
||||
* Add regular expression match for the entire route.
|
||||
@@ -63,6 +64,6 @@ interface ILoadableRoute extends IRoute
|
||||
* @param string $regex
|
||||
* @return static
|
||||
*/
|
||||
public function setMatch($regex);
|
||||
public function setMatch($regex): self;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user