for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kambo\Router\Route;
/**
* Class representing the Route
*
* @author Bohuslav Simek <[email protected]>
* @license Apache-2.0
* @package Kambo\Router\Route
*/
class Route
{
private $method = null;
private $handler = null;
private $url = null;
* Route constructor
* @param String $method
* @param String $url
* @param Mixed $handler
public function __construct($method, $url, $handler)
$this->method = $method;
$this->handler = $handler;
$this->url = $url;
}
* Sets route method
* @param string $method route method
* @return self for fluent interface
public function setMethod($method)
return $this;
* Get route method
* @return string
public function getMethod()
return $this->method;
* Sets URL for route
* @param mixed $url route url
public function setUrl($url)
* Get URL of route
public function getUrl()
return $this->url;
* Sets handler that will be executed if the url will match the route.
* @param mixed $handler handler which will be executed if the url will
* match the route
public function setHandler($handler)
* Get handler
* @return mixed
public function getHandler()
return $this->handler;