add composer's vendor directory
This commit is contained in:
parent
01a3860d73
commit
60b094d5fa
745 changed files with 56017 additions and 1 deletions
96
vendor/slim/slim/Slim/Routable.php
vendored
Normal file
96
vendor/slim/slim/Slim/Routable.php
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
/**
|
||||
* Slim Framework (http://slimframework.com)
|
||||
*
|
||||
* @link https://github.com/slimphp/Slim
|
||||
* @copyright Copyright (c) 2011-2016 Josh Lockhart
|
||||
* @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
|
||||
*/
|
||||
namespace Slim;
|
||||
|
||||
use Interop\Container\ContainerInterface;
|
||||
|
||||
/**
|
||||
* A routable, middleware-aware object
|
||||
*
|
||||
* @package Slim
|
||||
* @since 3.0.0
|
||||
*/
|
||||
abstract class Routable
|
||||
{
|
||||
use CallableResolverAwareTrait;
|
||||
|
||||
/**
|
||||
* Route callable
|
||||
*
|
||||
* @var callable
|
||||
*/
|
||||
protected $callable;
|
||||
|
||||
/**
|
||||
* Container
|
||||
*
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* Route middleware
|
||||
*
|
||||
* @var callable[]
|
||||
*/
|
||||
protected $middleware = [];
|
||||
|
||||
/**
|
||||
* Route pattern
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $pattern;
|
||||
|
||||
/**
|
||||
* Get the middleware registered for the group
|
||||
*
|
||||
* @return callable[]
|
||||
*/
|
||||
public function getMiddleware()
|
||||
{
|
||||
return $this->middleware;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the route pattern
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPattern()
|
||||
{
|
||||
return $this->pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set container for use with resolveCallable
|
||||
*
|
||||
* @param ContainerInterface $container
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepend middleware to the middleware collection
|
||||
*
|
||||
* @param callable|string $callable The callback routine
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function add($callable)
|
||||
{
|
||||
$this->middleware[] = new DeferredCallable($callable, $this->container);
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in a new issue