for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MatthiasMullie\Api\Routes;
/**
* @author Matthias Mullie <[email protected]>
* @copyright Copyright (c) 2016, Matthias Mullie. All rights reserved
* @license LICENSE MIT
*/
class Route implements RouteInterface
{
* @var string[]
protected $methods;
* @var string
protected $path;
* @var callable
protected $handler;
* @param string[] $methods
* @param string $path
* @param callable $handler
public function __construct(array $methods, string $path, callable $handler)
$this->methods = $methods;
$this->path = $path;
$this->handler = $handler;
}
* @return string[]
public function getMethods(): array
return $this->methods;
* @return string
public function getPath(): string
return $this->path;
* @return callable
public function getHandler(): callable
return $this->handler;