Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -0,0 +1,36 @@
<?php
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2015 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Cmf\Component\Routing\Event;
final class Events
{
/**
* Fired before a path is matched in \Symfony\Cmf\Component\Routing\DynamicRouter#match.
*
* The event object is RouterMatchEvent.
*/
const PRE_DYNAMIC_MATCH = 'cmf_routing.pre_dynamic_match';
/**
* Fired before a Request is matched in \Symfony\Cmf\Component\Routing\DynamicRouter#match.
*
* The event object is RouterMatchEvent.
*/
const PRE_DYNAMIC_MATCH_REQUEST = 'cmf_routing.pre_dynamic_match_request';
/**
* Fired before a route is generated in \Symfony\Cmf\Component\Routing\DynamicRouter#generate.
*
* The event object is RouterGenerateEvent.
*/
const PRE_DYNAMIC_GENERATE = 'cmf_routing.pre_dynamic_generate';
}

View file

@ -0,0 +1,142 @@
<?php
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2015 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Cmf\Component\Routing\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Routing\Route;
/**
* Event fired before the dynamic router generates a url for a route.
*
* The name, parameters and absolute properties have the semantics of
* UrlGeneratorInterface::generate()
*
* @author Ben Glassman
*
* @see \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate()
*/
class RouterGenerateEvent extends Event
{
/**
* The name of the route or the Route instance to generate.
*
* @var string|Route
*/
private $route;
/**
* The parameters to use when generating the url.
*
* @var array
*/
private $parameters;
/**
* The type of reference to be generated (one of the constants in UrlGeneratorInterface).
*
* @var bool|string
*/
private $referenceType;
/**
* @param string|Route $route The route name or object
* @param array $parameters The parameters to use
* @param bool|string $referenceType The type of reference to be generated
*/
public function __construct($route, $parameters, $referenceType)
{
$this->route = $route;
$this->parameters = $parameters;
$this->referenceType = $referenceType;
}
/**
* Get route name or object.
*
* @return string|Route
*/
public function getRoute()
{
return $this->route;
}
/**
* Set route name or object.
*
* @param string|Route $route
*/
public function setRoute($route)
{
$this->route = $route;
}
/**
* Get route parameters.
*
* @return array
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Set the route parameters.
*
* @param array $parameters
*/
public function setParameters(array $parameters)
{
$this->parameters = $parameters;
}
/**
* Set a route parameter.
*
* @param string $key
* @param mixed $value
*/
public function setParameter($key, $value)
{
$this->parameters[$key] = $value;
}
/**
* Remove a route parameter by key.
*
* @param string $key
*/
public function removeParameter($key)
{
unset($this->parameters[$key]);
}
/**
* The type of reference to be generated (one of the constants in UrlGeneratorInterface).
*
* @return bool|string
*/
public function getReferenceType()
{
return $this->referenceType;
}
/**
* The type of reference to be generated (one of the constants in UrlGeneratorInterface).
*
* @param bool|string $referenceType
*/
public function setReferenceType($referenceType)
{
$this->referenceType = $referenceType;
}
}

View file

@ -0,0 +1,39 @@
<?php
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2015 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Cmf\Component\Routing\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\HttpFoundation\Request;
class RouterMatchEvent extends Event
{
/**
* @var Request
*/
protected $request;
/**
* @param Request $request
*/
public function __construct(Request $request = null)
{
$this->request = $request;
}
/**
* @return Request | null
*/
public function getRequest()
{
return $this->request;
}
}