Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
43
vendor/symfony/browser-kit/Client.php
vendored
43
vendor/symfony/browser-kit/Client.php
vendored
|
@ -25,8 +25,6 @@ use Symfony\Component\Process\PhpProcess;
|
|||
* you need to also implement the getScript() method.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
abstract class Client
|
||||
{
|
||||
|
@ -52,8 +50,6 @@ abstract class Client
|
|||
* @param array $server The server parameters (equivalent of $_SERVER)
|
||||
* @param History $history A History instance to store the browser history
|
||||
* @param CookieJar $cookieJar A CookieJar instance to store the cookies
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $server = array(), History $history = null, CookieJar $cookieJar = null)
|
||||
{
|
||||
|
@ -66,8 +62,6 @@ abstract class Client
|
|||
* Sets whether to automatically follow redirects or not.
|
||||
*
|
||||
* @param bool $followRedirect Whether to follow redirects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function followRedirects($followRedirect = true)
|
||||
{
|
||||
|
@ -91,8 +85,6 @@ abstract class Client
|
|||
* @param bool $insulated Whether to insulate the requests or not
|
||||
*
|
||||
* @throws \RuntimeException When Symfony Process Component is not installed
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function insulate($insulated = true)
|
||||
{
|
||||
|
@ -107,8 +99,6 @@ abstract class Client
|
|||
* Sets server parameters.
|
||||
*
|
||||
* @param array $server An array of server parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setServerParameters(array $server)
|
||||
{
|
||||
|
@ -146,8 +136,6 @@ abstract class Client
|
|||
* Returns the History instance.
|
||||
*
|
||||
* @return History A History instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHistory()
|
||||
{
|
||||
|
@ -158,8 +146,6 @@ abstract class Client
|
|||
* Returns the CookieJar instance.
|
||||
*
|
||||
* @return CookieJar A CookieJar instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCookieJar()
|
||||
{
|
||||
|
@ -170,8 +156,6 @@ abstract class Client
|
|||
* Returns the current Crawler instance.
|
||||
*
|
||||
* @return Crawler|null A Crawler instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCrawler()
|
||||
{
|
||||
|
@ -182,8 +166,6 @@ abstract class Client
|
|||
* Returns the current BrowserKit Response instance.
|
||||
*
|
||||
* @return Response|null A BrowserKit Response instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getInternalResponse()
|
||||
{
|
||||
|
@ -199,8 +181,6 @@ abstract class Client
|
|||
* @return object|null A response instance
|
||||
*
|
||||
* @see doRequest()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
|
@ -211,8 +191,6 @@ abstract class Client
|
|||
* Returns the current BrowserKit Request instance.
|
||||
*
|
||||
* @return Request|null A BrowserKit Request instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getInternalRequest()
|
||||
{
|
||||
|
@ -228,8 +206,6 @@ abstract class Client
|
|||
* @return object|null A Request instance
|
||||
*
|
||||
* @see doRequest()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRequest()
|
||||
{
|
||||
|
@ -242,8 +218,6 @@ abstract class Client
|
|||
* @param Link $link A Link instance
|
||||
*
|
||||
* @return Crawler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function click(Link $link)
|
||||
{
|
||||
|
@ -261,8 +235,6 @@ abstract class Client
|
|||
* @param array $values An array of form field values
|
||||
*
|
||||
* @return Crawler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function submit(Form $form, array $values = array())
|
||||
{
|
||||
|
@ -283,8 +255,6 @@ abstract class Client
|
|||
* @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload())
|
||||
*
|
||||
* @return Crawler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true)
|
||||
{
|
||||
|
@ -357,8 +327,7 @@ abstract class Client
|
|||
*/
|
||||
protected function doRequestInProcess($request)
|
||||
{
|
||||
// We set the TMPDIR (for Macs) and TEMP (for Windows), because on these platforms the temp directory changes based on the user.
|
||||
$process = new PhpProcess($this->getScript($request), null, array('TMPDIR' => sys_get_temp_dir(), 'TEMP' => sys_get_temp_dir()));
|
||||
$process = new PhpProcess($this->getScript($request), null, null);
|
||||
$process->run();
|
||||
|
||||
if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) {
|
||||
|
@ -440,8 +409,6 @@ abstract class Client
|
|||
* Goes back in the browser history.
|
||||
*
|
||||
* @return Crawler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function back()
|
||||
{
|
||||
|
@ -452,8 +419,6 @@ abstract class Client
|
|||
* Goes forward in the browser history.
|
||||
*
|
||||
* @return Crawler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function forward()
|
||||
{
|
||||
|
@ -464,8 +429,6 @@ abstract class Client
|
|||
* Reloads the current browser.
|
||||
*
|
||||
* @return Crawler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function reload()
|
||||
{
|
||||
|
@ -478,8 +441,6 @@ abstract class Client
|
|||
* @return Crawler
|
||||
*
|
||||
* @throws \LogicException If request was not a redirect
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function followRedirect()
|
||||
{
|
||||
|
@ -528,8 +489,6 @@ abstract class Client
|
|||
* Restarts the client.
|
||||
*
|
||||
* It flushes history and all cookies.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function restart()
|
||||
{
|
||||
|
|
26
vendor/symfony/browser-kit/Cookie.php
vendored
26
vendor/symfony/browser-kit/Cookie.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\BrowserKit;
|
|||
* Cookie represents an HTTP cookie.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Cookie
|
||||
{
|
||||
|
@ -56,8 +54,6 @@ class Cookie
|
|||
* @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client
|
||||
* @param bool $httponly The cookie httponly flag
|
||||
* @param bool $encodedValue Whether the value is encoded or not
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name, $value, $expires = null, $path = null, $domain = '', $secure = false, $httponly = true, $encodedValue = false)
|
||||
{
|
||||
|
@ -90,8 +86,6 @@ class Cookie
|
|||
* @return string The HTTP representation of the Cookie
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
|
@ -130,8 +124,6 @@ class Cookie
|
|||
* @return Cookie A Cookie instance
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function fromString($cookie, $url = null)
|
||||
{
|
||||
|
@ -229,8 +221,6 @@ class Cookie
|
|||
* Gets the name of the cookie.
|
||||
*
|
||||
* @return string The cookie name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@ -241,8 +231,6 @@ class Cookie
|
|||
* Gets the value of the cookie.
|
||||
*
|
||||
* @return string The cookie value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
|
@ -253,8 +241,6 @@ class Cookie
|
|||
* Gets the raw value of the cookie.
|
||||
*
|
||||
* @return string The cookie value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRawValue()
|
||||
{
|
||||
|
@ -265,8 +251,6 @@ class Cookie
|
|||
* Gets the expires time of the cookie.
|
||||
*
|
||||
* @return string The cookie expires time
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExpiresTime()
|
||||
{
|
||||
|
@ -277,8 +261,6 @@ class Cookie
|
|||
* Gets the path of the cookie.
|
||||
*
|
||||
* @return string The cookie path
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
|
@ -289,8 +271,6 @@ class Cookie
|
|||
* Gets the domain of the cookie.
|
||||
*
|
||||
* @return string The cookie domain
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDomain()
|
||||
{
|
||||
|
@ -301,8 +281,6 @@ class Cookie
|
|||
* Returns the secure flag of the cookie.
|
||||
*
|
||||
* @return bool The cookie secure flag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSecure()
|
||||
{
|
||||
|
@ -313,8 +291,6 @@ class Cookie
|
|||
* Returns the httponly flag of the cookie.
|
||||
*
|
||||
* @return bool The cookie httponly flag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isHttpOnly()
|
||||
{
|
||||
|
@ -325,8 +301,6 @@ class Cookie
|
|||
* Returns true if the cookie has expired.
|
||||
*
|
||||
* @return bool true if the cookie has expired, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isExpired()
|
||||
{
|
||||
|
|
10
vendor/symfony/browser-kit/CookieJar.php
vendored
10
vendor/symfony/browser-kit/CookieJar.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\BrowserKit;
|
|||
* CookieJar.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class CookieJar
|
||||
{
|
||||
|
@ -26,8 +24,6 @@ class CookieJar
|
|||
* Sets a cookie.
|
||||
*
|
||||
* @param Cookie $cookie A Cookie instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set(Cookie $cookie)
|
||||
{
|
||||
|
@ -47,8 +43,6 @@ class CookieJar
|
|||
* @param string $domain The cookie domain
|
||||
*
|
||||
* @return Cookie|null A Cookie instance or null if the cookie does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name, $path = '/', $domain = null)
|
||||
{
|
||||
|
@ -94,8 +88,6 @@ class CookieJar
|
|||
* @param string $name The cookie name
|
||||
* @param string $path The cookie path
|
||||
* @param string $domain The cookie domain
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function expire($name, $path = '/', $domain = null)
|
||||
{
|
||||
|
@ -126,8 +118,6 @@ class CookieJar
|
|||
|
||||
/**
|
||||
* Removes all the cookies from the jar.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
|
2
vendor/symfony/browser-kit/README.md
vendored
2
vendor/symfony/browser-kit/README.md
vendored
|
@ -3,7 +3,7 @@ BrowserKit Component
|
|||
|
||||
BrowserKit simulates the behavior of a web browser.
|
||||
|
||||
The component only provide an abstract client and does not provide any
|
||||
The component only provides an abstract client and does not provide any
|
||||
"default" backend for the HTTP layer.
|
||||
|
||||
Resources
|
||||
|
|
18
vendor/symfony/browser-kit/Request.php
vendored
18
vendor/symfony/browser-kit/Request.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\BrowserKit;
|
|||
* Request object.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Request
|
||||
{
|
||||
|
@ -38,8 +36,6 @@ class Request
|
|||
* @param array $cookies An array of cookies
|
||||
* @param array $server An array of server parameters
|
||||
* @param string $content The raw body data
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($uri, $method, array $parameters = array(), array $files = array(), array $cookies = array(), array $server = array(), $content = null)
|
||||
{
|
||||
|
@ -56,8 +52,6 @@ class Request
|
|||
* Gets the request URI.
|
||||
*
|
||||
* @return string The request URI
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUri()
|
||||
{
|
||||
|
@ -68,8 +62,6 @@ class Request
|
|||
* Gets the request HTTP method.
|
||||
*
|
||||
* @return string The request HTTP method
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMethod()
|
||||
{
|
||||
|
@ -80,8 +72,6 @@ class Request
|
|||
* Gets the request parameters.
|
||||
*
|
||||
* @return array The request parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getParameters()
|
||||
{
|
||||
|
@ -92,8 +82,6 @@ class Request
|
|||
* Gets the request server files.
|
||||
*
|
||||
* @return array The request files
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
|
@ -104,8 +92,6 @@ class Request
|
|||
* Gets the request cookies.
|
||||
*
|
||||
* @return array The request cookies
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCookies()
|
||||
{
|
||||
|
@ -116,8 +102,6 @@ class Request
|
|||
* Gets the request server parameters.
|
||||
*
|
||||
* @return array The request server parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getServer()
|
||||
{
|
||||
|
@ -128,8 +112,6 @@ class Request
|
|||
* Gets the request raw body data.
|
||||
*
|
||||
* @return string The request raw body data.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
|
|
10
vendor/symfony/browser-kit/Response.php
vendored
10
vendor/symfony/browser-kit/Response.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\BrowserKit;
|
|||
* Response object.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Response
|
||||
{
|
||||
|
@ -33,8 +31,6 @@ class Response
|
|||
* @param string $content The content of the response
|
||||
* @param int $status The response status code
|
||||
* @param array $headers An array of headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($content = '', $status = 200, array $headers = array())
|
||||
{
|
||||
|
@ -81,8 +77,6 @@ class Response
|
|||
* Gets the response content.
|
||||
*
|
||||
* @return string The response content
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
|
@ -93,8 +87,6 @@ class Response
|
|||
* Gets the response status code.
|
||||
*
|
||||
* @return int The response status code
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
|
@ -105,8 +97,6 @@ class Response
|
|||
* Gets the response headers.
|
||||
*
|
||||
* @return array The response headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHeaders()
|
||||
{
|
||||
|
|
3
vendor/symfony/browser-kit/composer.json
vendored
3
vendor/symfony/browser-kit/composer.json
vendored
|
@ -20,8 +20,7 @@
|
|||
"symfony/dom-crawler": "~2.0,>=2.0.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/process": "~2.0,>=2.0.5",
|
||||
"symfony/process": "~2.3.34|~2.7,>=2.7.6",
|
||||
"symfony/css-selector": "~2.0,>=2.0.5"
|
||||
},
|
||||
"suggest": {
|
||||
|
|
|
@ -44,8 +44,6 @@ namespace Symfony\Component\ClassLoader;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ApcClassLoader
|
||||
{
|
||||
|
@ -66,8 +64,6 @@ class ApcClassLoader
|
|||
*
|
||||
* @throws \RuntimeException
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($prefix, $decorated)
|
||||
{
|
||||
|
|
|
@ -60,8 +60,6 @@ namespace Symfony\Component\ClassLoader;
|
|||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0.
|
||||
* Use the {@link ClassLoader} class instead.
|
||||
*/
|
||||
|
@ -75,8 +73,6 @@ class ApcUniversalClassLoader extends UniversalClassLoader
|
|||
* @param string $prefix A prefix to create a namespace in APC
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($prefix)
|
||||
{
|
||||
|
|
|
@ -283,7 +283,7 @@ class ClassCollectionLoader
|
|||
|
||||
$traits = array();
|
||||
|
||||
if (function_exists('get_declared_traits')) {
|
||||
if (method_exists('ReflectionClass', 'getTraits')) {
|
||||
foreach ($classes as $c) {
|
||||
foreach (self::resolveDependencies(self::computeTraitDeps($c), $c) as $trait) {
|
||||
if ($trait !== $c) {
|
||||
|
|
14
vendor/symfony/class-loader/ClassLoader.php
vendored
14
vendor/symfony/class-loader/ClassLoader.php
vendored
|
@ -91,12 +91,16 @@ class ClassLoader
|
|||
return;
|
||||
}
|
||||
if (isset($this->prefixes[$prefix])) {
|
||||
$this->prefixes[$prefix] = array_merge(
|
||||
$this->prefixes[$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
if (is_array($paths)) {
|
||||
$this->prefixes[$prefix] = array_unique(array_merge(
|
||||
$this->prefixes[$prefix],
|
||||
$paths
|
||||
));
|
||||
} elseif (!in_array($paths, $this->prefixes[$prefix])) {
|
||||
$this->prefixes[$prefix][] = $paths;
|
||||
}
|
||||
} else {
|
||||
$this->prefixes[$prefix] = (array) $paths;
|
||||
$this->prefixes[$prefix] = array_unique((array) $paths);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@ namespace Symfony\Component\ClassLoader;
|
|||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Christophe Coevoet <stof@notk.org>
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0.
|
||||
* Use {@link \Symfony\Component\Debug\DebugClassLoader} instead.
|
||||
*/
|
||||
|
@ -36,8 +34,6 @@ class DebugClassLoader
|
|||
* Constructor.
|
||||
*
|
||||
* @param object $classFinder
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($classFinder)
|
||||
{
|
||||
|
|
|
@ -58,8 +58,6 @@ namespace Symfony\Component\ClassLoader;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0.
|
||||
* Use the {@link ClassLoader} class instead.
|
||||
*/
|
||||
|
@ -137,8 +135,6 @@ class UniversalClassLoader
|
|||
* Registers the directory to use as a fallback for namespaces.
|
||||
*
|
||||
* @param array $dirs An array of directories
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerNamespaceFallbacks(array $dirs)
|
||||
{
|
||||
|
@ -159,8 +155,6 @@ class UniversalClassLoader
|
|||
* Registers directories to use as a fallback for class prefixes.
|
||||
*
|
||||
* @param array $dirs An array of directories
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerPrefixFallbacks(array $dirs)
|
||||
{
|
||||
|
@ -181,8 +175,6 @@ class UniversalClassLoader
|
|||
* Registers an array of namespaces.
|
||||
*
|
||||
* @param array $namespaces An array of namespaces (namespaces as keys and locations as values)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerNamespaces(array $namespaces)
|
||||
{
|
||||
|
@ -196,8 +188,6 @@ class UniversalClassLoader
|
|||
*
|
||||
* @param string $namespace The namespace
|
||||
* @param array|string $paths The location(s) of the namespace
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerNamespace($namespace, $paths)
|
||||
{
|
||||
|
@ -208,8 +198,6 @@ class UniversalClassLoader
|
|||
* Registers an array of classes using the PEAR naming convention.
|
||||
*
|
||||
* @param array $classes An array of classes (prefixes as keys and locations as values)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerPrefixes(array $classes)
|
||||
{
|
||||
|
@ -223,8 +211,6 @@ class UniversalClassLoader
|
|||
*
|
||||
* @param string $prefix The classes prefix
|
||||
* @param array|string $paths The location(s) of the classes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerPrefix($prefix, $paths)
|
||||
{
|
||||
|
@ -235,8 +221,6 @@ class UniversalClassLoader
|
|||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
|
|
|
@ -45,8 +45,6 @@ namespace Symfony\Component\ClassLoader;
|
|||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class XcacheClassLoader
|
||||
{
|
||||
|
@ -67,8 +65,6 @@ class XcacheClassLoader
|
|||
*
|
||||
* @throws \RuntimeException
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($prefix, $decorated)
|
||||
{
|
||||
|
|
1
vendor/symfony/class-loader/composer.json
vendored
1
vendor/symfony/class-loader/composer.json
vendored
|
@ -20,7 +20,6 @@
|
|||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/finder": "~2.0,>=2.0.5"
|
||||
},
|
||||
"autoload": {
|
||||
|
|
40
vendor/symfony/console/Application.php
vendored
40
vendor/symfony/console/Application.php
vendored
|
@ -54,8 +54,6 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|||
* $app->run();
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Application
|
||||
{
|
||||
|
@ -77,8 +75,6 @@ class Application
|
|||
*
|
||||
* @param string $name The name of the application
|
||||
* @param string $version The version of the application
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
|
||||
{
|
||||
|
@ -107,8 +103,6 @@ class Application
|
|||
* @return int 0 if everything went fine, or an error code
|
||||
*
|
||||
* @throws \Exception When doRun returns Exception
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function run(InputInterface $input = null, OutputInterface $output = null)
|
||||
{
|
||||
|
@ -202,8 +196,6 @@ class Application
|
|||
* Set a helper set to be used with the command.
|
||||
*
|
||||
* @param HelperSet $helperSet The helper set
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setHelperSet(HelperSet $helperSet)
|
||||
{
|
||||
|
@ -214,8 +206,6 @@ class Application
|
|||
* Get the helper set associated with the command.
|
||||
*
|
||||
* @return HelperSet The HelperSet instance associated with this command
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHelperSet()
|
||||
{
|
||||
|
@ -226,8 +216,6 @@ class Application
|
|||
* Set an input definition set to be used with this application.
|
||||
*
|
||||
* @param InputDefinition $definition The input definition
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefinition(InputDefinition $definition)
|
||||
{
|
||||
|
@ -258,8 +246,6 @@ class Application
|
|||
* Sets whether to catch exceptions or not during commands execution.
|
||||
*
|
||||
* @param bool $boolean Whether to catch exceptions or not during commands execution
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCatchExceptions($boolean)
|
||||
{
|
||||
|
@ -270,8 +256,6 @@ class Application
|
|||
* Sets whether to automatically exit after a command execution or not.
|
||||
*
|
||||
* @param bool $boolean Whether to automatically exit after a command execution or not
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setAutoExit($boolean)
|
||||
{
|
||||
|
@ -282,8 +266,6 @@ class Application
|
|||
* Gets the name of the application.
|
||||
*
|
||||
* @return string The application name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@ -294,8 +276,6 @@ class Application
|
|||
* Sets the application name.
|
||||
*
|
||||
* @param string $name The application name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
|
@ -306,8 +286,6 @@ class Application
|
|||
* Gets the application version.
|
||||
*
|
||||
* @return string The application version
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
|
@ -318,8 +296,6 @@ class Application
|
|||
* Sets the application version.
|
||||
*
|
||||
* @param string $version The application version
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setVersion($version)
|
||||
{
|
||||
|
@ -330,8 +306,6 @@ class Application
|
|||
* Returns the long version of the application.
|
||||
*
|
||||
* @return string The long application version
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getLongVersion()
|
||||
{
|
||||
|
@ -348,8 +322,6 @@ class Application
|
|||
* @param string $name The command name
|
||||
*
|
||||
* @return Command The newly created command
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function register($name)
|
||||
{
|
||||
|
@ -360,8 +332,6 @@ class Application
|
|||
* Adds an array of command objects.
|
||||
*
|
||||
* @param Command[] $commands An array of commands
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addCommands(array $commands)
|
||||
{
|
||||
|
@ -378,8 +348,6 @@ class Application
|
|||
* @param Command $command A Command object
|
||||
*
|
||||
* @return Command The registered command
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(Command $command)
|
||||
{
|
||||
|
@ -412,8 +380,6 @@ class Application
|
|||
* @return Command A Command object
|
||||
*
|
||||
* @throws \InvalidArgumentException When command name given does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
|
@ -441,8 +407,6 @@ class Application
|
|||
* @param string $name The command name or alias
|
||||
*
|
||||
* @return bool true if the command exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
|
@ -520,8 +484,6 @@ class Application
|
|||
* @return Command A Command instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When command name is incorrect or ambiguous
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function find($name)
|
||||
{
|
||||
|
@ -577,8 +539,6 @@ class Application
|
|||
* @param string $namespace A namespace name
|
||||
*
|
||||
* @return Command[] An array of Command instances
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all($namespace = null)
|
||||
{
|
||||
|
|
49
vendor/symfony/console/Command/Command.php
vendored
49
vendor/symfony/console/Command/Command.php
vendored
|
@ -26,8 +26,6 @@ use Symfony\Component\Console\Helper\HelperSet;
|
|||
* Base class for all commands.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Command
|
||||
{
|
||||
|
@ -52,8 +50,6 @@ class Command
|
|||
* @param string|null $name The name of the command; passing null means it must be set in configure()
|
||||
*
|
||||
* @throws \LogicException When the command name is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name = null)
|
||||
{
|
||||
|
@ -84,8 +80,6 @@ class Command
|
|||
* Sets the application instance for this command.
|
||||
*
|
||||
* @param Application $application An Application instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setApplication(Application $application = null)
|
||||
{
|
||||
|
@ -121,8 +115,6 @@ class Command
|
|||
* Gets the application instance for this command.
|
||||
*
|
||||
* @return Application An Application instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getApplication()
|
||||
{
|
||||
|
@ -214,8 +206,6 @@ class Command
|
|||
*
|
||||
* @see setCode()
|
||||
* @see execute()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function run(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
|
@ -251,6 +241,13 @@ class Command
|
|||
$this->interact($input, $output);
|
||||
}
|
||||
|
||||
// The command name argument is often omitted when a command is executed directly with its run() method.
|
||||
// It would fail the validation if we didn't make sure the command argument is present,
|
||||
// since it's required by the application.
|
||||
if ($input->hasArgument('command') && null === $input->getArgument('command')) {
|
||||
$input->setArgument('command', $this->getName());
|
||||
}
|
||||
|
||||
$input->validate();
|
||||
|
||||
if ($this->code) {
|
||||
|
@ -275,8 +272,6 @@ class Command
|
|||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @see execute()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
|
@ -322,8 +317,6 @@ class Command
|
|||
* @param array|InputDefinition $definition An array of argument and option instances or a definition instance
|
||||
*
|
||||
* @return Command The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefinition($definition)
|
||||
{
|
||||
|
@ -342,8 +335,6 @@ class Command
|
|||
* Gets the InputDefinition attached to this Command.
|
||||
*
|
||||
* @return InputDefinition An InputDefinition instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDefinition()
|
||||
{
|
||||
|
@ -374,8 +365,6 @@ class Command
|
|||
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
|
||||
*
|
||||
* @return Command The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addArgument($name, $mode = null, $description = '', $default = null)
|
||||
{
|
||||
|
@ -394,8 +383,6 @@ class Command
|
|||
* @param mixed $default The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE)
|
||||
*
|
||||
* @return Command The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
|
||||
{
|
||||
|
@ -417,8 +404,6 @@ class Command
|
|||
* @return Command The current instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When the name is invalid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
|
@ -452,8 +437,6 @@ class Command
|
|||
* Returns the command name.
|
||||
*
|
||||
* @return string The command name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@ -466,8 +449,6 @@ class Command
|
|||
* @param string $description The description for the command
|
||||
*
|
||||
* @return Command The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
|
@ -480,8 +461,6 @@ class Command
|
|||
* Returns the description for the command.
|
||||
*
|
||||
* @return string The description for the command
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
|
@ -494,8 +473,6 @@ class Command
|
|||
* @param string $help The help for the command
|
||||
*
|
||||
* @return Command The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setHelp($help)
|
||||
{
|
||||
|
@ -508,12 +485,10 @@ class Command
|
|||
* Returns the help for the command.
|
||||
*
|
||||
* @return string The help for the command
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHelp()
|
||||
{
|
||||
return $this->help ?: $this->description;
|
||||
return $this->help;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -535,7 +510,7 @@ class Command
|
|||
$_SERVER['PHP_SELF'].' '.$name,
|
||||
);
|
||||
|
||||
return str_replace($placeholders, $replacements, $this->getHelp());
|
||||
return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -546,8 +521,6 @@ class Command
|
|||
* @return Command The current instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When an alias is invalid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setAliases($aliases)
|
||||
{
|
||||
|
@ -568,8 +541,6 @@ class Command
|
|||
* Returns the aliases for the command.
|
||||
*
|
||||
* @return array An array of aliases for the command
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAliases()
|
||||
{
|
||||
|
@ -628,8 +599,6 @@ class Command
|
|||
* @return mixed The helper value
|
||||
*
|
||||
* @throws \InvalidArgumentException if the helper is not defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHelper($name)
|
||||
{
|
||||
|
|
|
@ -136,15 +136,17 @@ class ApplicationDescription
|
|||
private function sortCommands(array $commands)
|
||||
{
|
||||
$namespacedCommands = array();
|
||||
$globalCommands = array();
|
||||
foreach ($commands as $name => $command) {
|
||||
$key = $this->application->extractNamespace($name, 1);
|
||||
if (!$key) {
|
||||
$key = '_global';
|
||||
$globalCommands['_global'][$name] = $command;
|
||||
} else {
|
||||
$namespacedCommands[$key][$name] = $command;
|
||||
}
|
||||
|
||||
$namespacedCommands[$key][$name] = $command;
|
||||
}
|
||||
ksort($namespacedCommands);
|
||||
$namespacedCommands = array_merge($globalCommands, $namespacedCommands);
|
||||
|
||||
foreach ($namespacedCommands as &$commandsSet) {
|
||||
ksort($commandsSet);
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Formatter;
|
|||
* Formatter class for console output.
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class OutputFormatter implements OutputFormatterInterface
|
||||
{
|
||||
|
@ -41,8 +39,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
*
|
||||
* @param bool $decorated Whether this formatter should actually decorate strings
|
||||
* @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($decorated = false, array $styles = array())
|
||||
{
|
||||
|
@ -64,8 +60,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
* Sets the decorated flag.
|
||||
*
|
||||
* @param bool $decorated Whether to decorate the messages or not
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDecorated($decorated)
|
||||
{
|
||||
|
@ -76,8 +70,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
* Gets the decorated flag.
|
||||
*
|
||||
* @return bool true if the output will decorate messages, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isDecorated()
|
||||
{
|
||||
|
@ -89,8 +81,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
*
|
||||
* @param string $name The style name
|
||||
* @param OutputFormatterStyleInterface $style The style instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setStyle($name, OutputFormatterStyleInterface $style)
|
||||
{
|
||||
|
@ -103,8 +93,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasStyle($name)
|
||||
{
|
||||
|
@ -119,8 +107,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
* @return OutputFormatterStyleInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException When style isn't defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getStyle($name)
|
||||
{
|
||||
|
@ -137,8 +123,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|||
* @param string $message The message to style
|
||||
*
|
||||
* @return string The styled message
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function format($message)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Formatter;
|
|||
* Formatter interface for console output.
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface OutputFormatterInterface
|
||||
{
|
||||
|
@ -24,8 +22,6 @@ interface OutputFormatterInterface
|
|||
* Sets the decorated flag.
|
||||
*
|
||||
* @param bool $decorated Whether to decorate the messages or not
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDecorated($decorated);
|
||||
|
||||
|
@ -33,8 +29,6 @@ interface OutputFormatterInterface
|
|||
* Gets the decorated flag.
|
||||
*
|
||||
* @return bool true if the output will decorate messages, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isDecorated();
|
||||
|
||||
|
@ -43,8 +37,6 @@ interface OutputFormatterInterface
|
|||
*
|
||||
* @param string $name The style name
|
||||
* @param OutputFormatterStyleInterface $style The style instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setStyle($name, OutputFormatterStyleInterface $style);
|
||||
|
||||
|
@ -54,8 +46,6 @@ interface OutputFormatterInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasStyle($name);
|
||||
|
||||
|
@ -65,8 +55,6 @@ interface OutputFormatterInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return OutputFormatterStyleInterface
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getStyle($name);
|
||||
|
||||
|
@ -76,8 +64,6 @@ interface OutputFormatterInterface
|
|||
* @param string $message The message to style
|
||||
*
|
||||
* @return string The styled message
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function format($message);
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Formatter;
|
|||
* Formatter style class for defining styles.
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class OutputFormatterStyle implements OutputFormatterStyleInterface
|
||||
{
|
||||
|
@ -60,8 +58,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|||
* @param string|null $foreground The style foreground color name
|
||||
* @param string|null $background The style background color name
|
||||
* @param array $options The style options
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($foreground = null, $background = null, array $options = array())
|
||||
{
|
||||
|
@ -82,8 +78,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|||
* @param string|null $color The color name
|
||||
*
|
||||
* @throws \InvalidArgumentException When the color name isn't defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setForeground($color = null)
|
||||
{
|
||||
|
@ -110,8 +104,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|||
* @param string|null $color The color name
|
||||
*
|
||||
* @throws \InvalidArgumentException When the color name isn't defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setBackground($color = null)
|
||||
{
|
||||
|
@ -138,8 +130,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|||
* @param string $option The option name
|
||||
*
|
||||
* @throws \InvalidArgumentException When the option name isn't defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setOption($option)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Formatter;
|
|||
* Formatter style interface for defining styles.
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface OutputFormatterStyleInterface
|
||||
{
|
||||
|
@ -24,8 +22,6 @@ interface OutputFormatterStyleInterface
|
|||
* Sets style foreground color.
|
||||
*
|
||||
* @param string $color The color name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setForeground($color = null);
|
||||
|
||||
|
@ -33,8 +29,6 @@ interface OutputFormatterStyleInterface
|
|||
* Sets style background color.
|
||||
*
|
||||
* @param string $color The color name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setBackground($color = null);
|
||||
|
||||
|
@ -42,8 +36,6 @@ interface OutputFormatterStyleInterface
|
|||
* Sets some specific style option.
|
||||
*
|
||||
* @param string $option The option name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setOption($option);
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Helper;
|
|||
* HelperInterface is the interface all helpers must implement.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface HelperInterface
|
||||
{
|
||||
|
@ -24,8 +22,6 @@ interface HelperInterface
|
|||
* Sets the helper set associated with this helper.
|
||||
*
|
||||
* @param HelperSet $helperSet A HelperSet instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setHelperSet(HelperSet $helperSet = null);
|
||||
|
||||
|
@ -33,8 +29,6 @@ interface HelperInterface
|
|||
* Gets the helper set associated with this helper.
|
||||
*
|
||||
* @return HelperSet A HelperSet instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHelperSet();
|
||||
|
||||
|
@ -42,8 +36,6 @@ interface HelperInterface
|
|||
* Returns the canonical name of this helper.
|
||||
*
|
||||
* @return string The canonical name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName();
|
||||
}
|
||||
|
|
44
vendor/symfony/console/Helper/ProgressBar.php
vendored
44
vendor/symfony/console/Helper/ProgressBar.php
vendored
|
@ -27,7 +27,8 @@ class ProgressBar
|
|||
private $barChar;
|
||||
private $emptyBarChar = '-';
|
||||
private $progressChar = '>';
|
||||
private $format = null;
|
||||
private $format;
|
||||
private $internalFormat;
|
||||
private $redrawFreq = 1;
|
||||
|
||||
/**
|
||||
|
@ -72,8 +73,6 @@ class ProgressBar
|
|||
}
|
||||
}
|
||||
|
||||
$this->setFormat($this->determineBestFormat());
|
||||
|
||||
$this->startTime = time();
|
||||
}
|
||||
|
||||
|
@ -310,16 +309,8 @@ class ProgressBar
|
|||
*/
|
||||
public function setFormat($format)
|
||||
{
|
||||
// try to use the _nomax variant if available
|
||||
if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
|
||||
$this->format = self::getFormatDefinition($format.'_nomax');
|
||||
} elseif (null !== self::getFormatDefinition($format)) {
|
||||
$this->format = self::getFormatDefinition($format);
|
||||
} else {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
$this->formatLineCount = substr_count($this->format, "\n");
|
||||
$this->format = null;
|
||||
$this->internalFormat = $format;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -441,6 +432,10 @@ class ProgressBar
|
|||
return;
|
||||
}
|
||||
|
||||
if (null === $this->format) {
|
||||
$this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
|
||||
}
|
||||
|
||||
// these 3 variables can be removed in favor of using $this in the closure when support for PHP 5.3 will be dropped.
|
||||
$self = $this;
|
||||
$output = $this->output;
|
||||
|
@ -475,9 +470,32 @@ class ProgressBar
|
|||
return;
|
||||
}
|
||||
|
||||
if (null === $this->format) {
|
||||
$this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
|
||||
}
|
||||
|
||||
$this->overwrite(str_repeat("\n", $this->formatLineCount));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the progress bar format.
|
||||
*
|
||||
* @param string $format The format
|
||||
*/
|
||||
private function setRealFormat($format)
|
||||
{
|
||||
// try to use the _nomax variant if available
|
||||
if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
|
||||
$this->format = self::getFormatDefinition($format.'_nomax');
|
||||
} elseif (null !== self::getFormatDefinition($format)) {
|
||||
$this->format = self::getFormatDefinition($format);
|
||||
} else {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
$this->formatLineCount = substr_count($this->format, "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the progress bar maximal steps.
|
||||
*
|
||||
|
|
4
vendor/symfony/console/Input/ArgvInput.php
vendored
4
vendor/symfony/console/Input/ArgvInput.php
vendored
|
@ -35,8 +35,6 @@ namespace Symfony\Component\Console\Input;
|
|||
*
|
||||
* @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
|
||||
* @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ArgvInput extends Input
|
||||
{
|
||||
|
@ -48,8 +46,6 @@ class ArgvInput extends Input
|
|||
*
|
||||
* @param array $argv An array of parameters from the CLI (in the argv format)
|
||||
* @param InputDefinition $definition A InputDefinition instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $argv = null, InputDefinition $definition = null)
|
||||
{
|
||||
|
|
4
vendor/symfony/console/Input/ArrayInput.php
vendored
4
vendor/symfony/console/Input/ArrayInput.php
vendored
|
@ -19,8 +19,6 @@ namespace Symfony\Component\Console\Input;
|
|||
* $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar'));
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ArrayInput extends Input
|
||||
{
|
||||
|
@ -31,8 +29,6 @@ class ArrayInput extends Input
|
|||
*
|
||||
* @param array $parameters An array of parameters
|
||||
* @param InputDefinition $definition A InputDefinition instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters, InputDefinition $definition = null)
|
||||
{
|
||||
|
|
11
vendor/symfony/console/Input/Input.php
vendored
11
vendor/symfony/console/Input/Input.php
vendored
|
@ -73,8 +73,15 @@ abstract class Input implements InputInterface
|
|||
*/
|
||||
public function validate()
|
||||
{
|
||||
if (count($this->arguments) < $this->definition->getArgumentRequiredCount()) {
|
||||
throw new \RuntimeException('Not enough arguments.');
|
||||
$definition = $this->definition;
|
||||
$givenArguments = $this->arguments;
|
||||
|
||||
$missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) {
|
||||
return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
|
||||
});
|
||||
|
||||
if (count($missingArguments) > 0) {
|
||||
throw new \RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Input;
|
|||
* Represents a command line argument.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class InputArgument
|
||||
{
|
||||
|
@ -38,8 +36,6 @@ class InputArgument
|
|||
* @param mixed $default The default value (for self::OPTIONAL mode only)
|
||||
*
|
||||
* @throws \InvalidArgumentException When argument mode is not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name, $mode = null, $description = '', $default = null)
|
||||
{
|
||||
|
|
30
vendor/symfony/console/Input/InputDefinition.php
vendored
30
vendor/symfony/console/Input/InputDefinition.php
vendored
|
@ -26,8 +26,6 @@ use Symfony\Component\Console\Output\BufferedOutput;
|
|||
* ));
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class InputDefinition
|
||||
{
|
||||
|
@ -42,8 +40,6 @@ class InputDefinition
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $definition An array of InputArgument and InputOption instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $definition = array())
|
||||
{
|
||||
|
@ -54,8 +50,6 @@ class InputDefinition
|
|||
* Sets the definition of the input.
|
||||
*
|
||||
* @param array $definition The definition array
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefinition(array $definition)
|
||||
{
|
||||
|
@ -77,8 +71,6 @@ class InputDefinition
|
|||
* Sets the InputArgument objects.
|
||||
*
|
||||
* @param InputArgument[] $arguments An array of InputArgument objects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setArguments($arguments = array())
|
||||
{
|
||||
|
@ -93,8 +85,6 @@ class InputDefinition
|
|||
* Adds an array of InputArgument objects.
|
||||
*
|
||||
* @param InputArgument[] $arguments An array of InputArgument objects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addArguments($arguments = array())
|
||||
{
|
||||
|
@ -111,8 +101,6 @@ class InputDefinition
|
|||
* @param InputArgument $argument An InputArgument object
|
||||
*
|
||||
* @throws \LogicException When incorrect argument is given
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addArgument(InputArgument $argument)
|
||||
{
|
||||
|
@ -149,8 +137,6 @@ class InputDefinition
|
|||
* @return InputArgument An InputArgument object
|
||||
*
|
||||
* @throws \InvalidArgumentException When argument given doesn't exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getArgument($name)
|
||||
{
|
||||
|
@ -169,8 +155,6 @@ class InputDefinition
|
|||
* @param string|int $name The InputArgument name or position
|
||||
*
|
||||
* @return bool true if the InputArgument object exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasArgument($name)
|
||||
{
|
||||
|
@ -183,8 +167,6 @@ class InputDefinition
|
|||
* Gets the array of InputArgument objects.
|
||||
*
|
||||
* @return InputArgument[] An array of InputArgument objects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getArguments()
|
||||
{
|
||||
|
@ -230,8 +212,6 @@ class InputDefinition
|
|||
* Sets the InputOption objects.
|
||||
*
|
||||
* @param InputOption[] $options An array of InputOption objects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setOptions($options = array())
|
||||
{
|
||||
|
@ -244,8 +224,6 @@ class InputDefinition
|
|||
* Adds an array of InputOption objects.
|
||||
*
|
||||
* @param InputOption[] $options An array of InputOption objects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addOptions($options = array())
|
||||
{
|
||||
|
@ -260,8 +238,6 @@ class InputDefinition
|
|||
* @param InputOption $option An InputOption object
|
||||
*
|
||||
* @throws \LogicException When option given already exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addOption(InputOption $option)
|
||||
{
|
||||
|
@ -293,8 +269,6 @@ class InputDefinition
|
|||
* @return InputOption A InputOption object
|
||||
*
|
||||
* @throws \InvalidArgumentException When option given doesn't exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getOption($name)
|
||||
{
|
||||
|
@ -311,8 +285,6 @@ class InputDefinition
|
|||
* @param string $name The InputOption name
|
||||
*
|
||||
* @return bool true if the InputOption object exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasOption($name)
|
||||
{
|
||||
|
@ -323,8 +295,6 @@ class InputDefinition
|
|||
* Gets the array of InputOption objects.
|
||||
*
|
||||
* @return InputOption[] An array of InputOption objects
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
|
|
4
vendor/symfony/console/Input/InputOption.php
vendored
4
vendor/symfony/console/Input/InputOption.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Console\Input;
|
|||
* Represents a command line option.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class InputOption
|
||||
{
|
||||
|
@ -41,8 +39,6 @@ class InputOption
|
|||
* @param mixed $default The default value (must be null for self::VALUE_REQUIRED or self::VALUE_NONE)
|
||||
*
|
||||
* @throws \InvalidArgumentException If option mode is invalid or incompatible
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null)
|
||||
{
|
||||
|
|
4
vendor/symfony/console/Input/StringInput.php
vendored
4
vendor/symfony/console/Input/StringInput.php
vendored
|
@ -19,8 +19,6 @@ namespace Symfony\Component\Console\Input;
|
|||
* $input = new StringInput('foo --bar="foobar"');
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class StringInput extends ArgvInput
|
||||
{
|
||||
|
@ -34,8 +32,6 @@ class StringInput extends ArgvInput
|
|||
* @param InputDefinition $definition A InputDefinition instance
|
||||
*
|
||||
* @deprecated The second argument is deprecated as it does not work (will be removed in 3.0), use 'bind' method instead
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($input, InputDefinition $definition = null)
|
||||
{
|
||||
|
|
12
vendor/symfony/console/Output/ConsoleOutput.php
vendored
12
vendor/symfony/console/Output/ConsoleOutput.php
vendored
|
@ -25,8 +25,6 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|||
* $output = new StreamOutput(fopen('php://stdout', 'w'));
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
||||
{
|
||||
|
@ -41,8 +39,6 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
|||
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
|
||||
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
|
||||
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
|
||||
{
|
||||
|
@ -129,7 +125,13 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
|||
*/
|
||||
private function isRunningOS400()
|
||||
{
|
||||
return 'OS400' === php_uname('s');
|
||||
$checks = array(
|
||||
function_exists('php_uname') ? php_uname('s') : '',
|
||||
getenv('OSTYPE'),
|
||||
PHP_OS,
|
||||
);
|
||||
|
||||
return false !== stristr(implode(';', $checks), 'OS400');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
2
vendor/symfony/console/Output/NullOutput.php
vendored
2
vendor/symfony/console/Output/NullOutput.php
vendored
|
@ -21,8 +21,6 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Tobias Schultze <http://tobion.de>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class NullOutput implements OutputInterface
|
||||
{
|
||||
|
|
4
vendor/symfony/console/Output/Output.php
vendored
4
vendor/symfony/console/Output/Output.php
vendored
|
@ -26,8 +26,6 @@ use Symfony\Component\Console\Formatter\OutputFormatter;
|
|||
* * quiet: -q (no output)
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
abstract class Output implements OutputInterface
|
||||
{
|
||||
|
@ -40,8 +38,6 @@ abstract class Output implements OutputInterface
|
|||
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
|
||||
* @param bool $decorated Whether to decorate messages
|
||||
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null)
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|||
* OutputInterface is the interface implemented by all Output classes.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface OutputInterface
|
||||
{
|
||||
|
@ -40,8 +38,6 @@ interface OutputInterface
|
|||
* @param int $type The type of output (one of the OUTPUT constants)
|
||||
*
|
||||
* @throws \InvalidArgumentException When unknown output type is given
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL);
|
||||
|
||||
|
@ -52,8 +48,6 @@ interface OutputInterface
|
|||
* @param int $type The type of output (one of the OUTPUT constants)
|
||||
*
|
||||
* @throws \InvalidArgumentException When unknown output type is given
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function writeln($messages, $type = self::OUTPUT_NORMAL);
|
||||
|
||||
|
@ -61,8 +55,6 @@ interface OutputInterface
|
|||
* Sets the verbosity of the output.
|
||||
*
|
||||
* @param int $level The level of verbosity (one of the VERBOSITY constants)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setVerbosity($level);
|
||||
|
||||
|
@ -70,8 +62,6 @@ interface OutputInterface
|
|||
* Gets the current verbosity of the output.
|
||||
*
|
||||
* @return int The current level of verbosity (one of the VERBOSITY constants)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getVerbosity();
|
||||
|
||||
|
@ -79,8 +69,6 @@ interface OutputInterface
|
|||
* Sets the decorated flag.
|
||||
*
|
||||
* @param bool $decorated Whether to decorate the messages
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDecorated($decorated);
|
||||
|
||||
|
@ -88,8 +76,6 @@ interface OutputInterface
|
|||
* Gets the decorated flag.
|
||||
*
|
||||
* @return bool true if the output will decorate messages, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isDecorated();
|
||||
|
||||
|
@ -97,8 +83,6 @@ interface OutputInterface
|
|||
* Sets output formatter.
|
||||
*
|
||||
* @param OutputFormatterInterface $formatter
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFormatter(OutputFormatterInterface $formatter);
|
||||
|
||||
|
@ -106,8 +90,6 @@ interface OutputInterface
|
|||
* Returns current output formatter instance.
|
||||
*
|
||||
* @return OutputFormatterInterface
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getFormatter();
|
||||
}
|
||||
|
|
|
@ -25,8 +25,6 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|||
* $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class StreamOutput extends Output
|
||||
{
|
||||
|
@ -41,8 +39,6 @@ class StreamOutput extends Output
|
|||
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
|
||||
*
|
||||
* @throws \InvalidArgumentException When first argument is not a real stream
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
|
||||
{
|
||||
|
@ -87,7 +83,7 @@ class StreamOutput extends Output
|
|||
*
|
||||
* Colorization is disabled if not supported by the stream:
|
||||
*
|
||||
* - Windows without Ansicon and ConEmu
|
||||
* - Windows without Ansicon, ConEmu or Mintty
|
||||
* - non tty consoles
|
||||
*
|
||||
* @return bool true if the stream supports colorization, false otherwise
|
||||
|
@ -95,7 +91,7 @@ class StreamOutput extends Output
|
|||
protected function hasColorSupport()
|
||||
{
|
||||
if (DIRECTORY_SEPARATOR === '\\') {
|
||||
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
|
||||
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM');
|
||||
}
|
||||
|
||||
return function_exists('posix_isatty') && @posix_isatty($this->stream);
|
||||
|
|
4
vendor/symfony/console/Question/Question.php
vendored
4
vendor/symfony/console/Question/Question.php
vendored
|
@ -217,7 +217,7 @@ class Question
|
|||
*
|
||||
* The normalizer can be a callable (a string), a closure or a class implementing __invoke.
|
||||
*
|
||||
* @param string|\Closure $normalizer
|
||||
* @param callable $normalizer
|
||||
*
|
||||
* @return Question The current instance
|
||||
*/
|
||||
|
@ -233,7 +233,7 @@ class Question
|
|||
*
|
||||
* The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
|
||||
*
|
||||
* @return string|\Closure
|
||||
* @return callable
|
||||
*/
|
||||
public function getNormalizer()
|
||||
{
|
||||
|
|
|
@ -164,7 +164,7 @@ class SymfonyStyle extends OutputStyle
|
|||
*/
|
||||
public function success($message)
|
||||
{
|
||||
$this->block($message, 'OK', 'fg=white;bg=green', ' ', true);
|
||||
$this->block($message, 'OK', 'fg=black;bg=green', ' ', true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
1
vendor/symfony/console/composer.json
vendored
1
vendor/symfony/console/composer.json
vendored
|
@ -19,7 +19,6 @@
|
|||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/event-dispatcher": "~2.1",
|
||||
"symfony/process": "~2.1",
|
||||
"psr/log": "~1.0"
|
||||
|
|
4
vendor/symfony/css-selector/CssSelector.php
vendored
4
vendor/symfony/css-selector/CssSelector.php
vendored
|
@ -61,8 +61,6 @@ use Symfony\Component\CssSelector\XPath\Translator;
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class CssSelector
|
||||
{
|
||||
|
@ -77,8 +75,6 @@ class CssSelector
|
|||
* @param string $prefix An optional prefix for the XPath expression.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function toXPath($cssExpr, $prefix = 'descendant-or-self::')
|
||||
{
|
||||
|
|
3
vendor/symfony/css-selector/composer.json
vendored
3
vendor/symfony/css-selector/composer.json
vendored
|
@ -22,9 +22,6 @@
|
|||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Component\\CssSelector\\": "" }
|
||||
},
|
||||
|
|
4
vendor/symfony/debug/DebugClassLoader.php
vendored
4
vendor/symfony/debug/DebugClassLoader.php
vendored
|
@ -21,8 +21,6 @@ namespace Symfony\Component\Debug;
|
|||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Christophe Coevoet <stof@notk.org>
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class DebugClassLoader
|
||||
{
|
||||
|
@ -38,8 +36,6 @@ class DebugClassLoader
|
|||
* Constructor.
|
||||
*
|
||||
* @param callable|object $classLoader Passing an object is @deprecated since version 2.5 and support for it will be removed in 3.0
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($classLoader)
|
||||
{
|
||||
|
|
1
vendor/symfony/debug/composer.json
vendored
1
vendor/symfony/debug/composer.json
vendored
|
@ -23,7 +23,6 @@
|
|||
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/class-loader": "~2.2",
|
||||
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2"
|
||||
},
|
||||
|
|
11
vendor/symfony/dependency-injection/Alias.php
vendored
11
vendor/symfony/dependency-injection/Alias.php
vendored
|
@ -11,9 +11,6 @@
|
|||
|
||||
namespace Symfony\Component\DependencyInjection;
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
class Alias
|
||||
{
|
||||
private $id;
|
||||
|
@ -24,8 +21,6 @@ class Alias
|
|||
*
|
||||
* @param string $id Alias identifier
|
||||
* @param bool $public If this alias is public
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($id, $public = true)
|
||||
{
|
||||
|
@ -37,8 +32,6 @@ class Alias
|
|||
* Checks if this DI Alias should be public or not.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isPublic()
|
||||
{
|
||||
|
@ -49,8 +42,6 @@ class Alias
|
|||
* Sets if this Alias is public.
|
||||
*
|
||||
* @param bool $boolean If this Alias should be public
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPublic($boolean)
|
||||
{
|
||||
|
@ -61,8 +52,6 @@ class Alias
|
|||
* Returns the Id of this alias.
|
||||
*
|
||||
* @return string The alias id
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
|
|
|
@ -64,7 +64,6 @@ class CheckReferenceValidityPass implements CompilerPassInterface
|
|||
}
|
||||
|
||||
$this->currentId = $id;
|
||||
$this->currentDefinition = $definition;
|
||||
$this->currentScope = $scope = $definition->getScope();
|
||||
|
||||
if (ContainerInterface::SCOPE_CONTAINER === $scope) {
|
||||
|
|
|
@ -17,8 +17,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||
* This class is used to remove circular dependencies between individual passes.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Compiler
|
||||
{
|
||||
|
@ -41,8 +39,6 @@ class Compiler
|
|||
* Returns the PassConfig.
|
||||
*
|
||||
* @return PassConfig The PassConfig instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPassConfig()
|
||||
{
|
||||
|
@ -53,8 +49,6 @@ class Compiler
|
|||
* Returns the ServiceReferenceGraph.
|
||||
*
|
||||
* @return ServiceReferenceGraph The ServiceReferenceGraph instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getServiceReferenceGraph()
|
||||
{
|
||||
|
@ -76,8 +70,6 @@ class Compiler
|
|||
*
|
||||
* @param CompilerPassInterface $pass A compiler pass
|
||||
* @param string $type The type of the pass
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
|
||||
{
|
||||
|
@ -108,8 +100,6 @@ class Compiler
|
|||
* Run the Compiler and process all Passes.
|
||||
*
|
||||
* @param ContainerBuilder $container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function compile(ContainerBuilder $container)
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||
* Interface that must be implemented by compilation passes.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface CompilerPassInterface
|
||||
{
|
||||
|
@ -26,8 +24,6 @@ interface CompilerPassInterface
|
|||
* You can modify the container here before it is dumped to PHP code.
|
||||
*
|
||||
* @param ContainerBuilder $container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function process(ContainerBuilder $container);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
|
|
@ -19,8 +19,6 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|||
* This class has a default configuration embedded.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class PassConfig
|
||||
{
|
||||
|
@ -75,8 +73,6 @@ class PassConfig
|
|||
* Returns all passes in order to be processed.
|
||||
*
|
||||
* @return array An array of all passes to process
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPasses()
|
||||
{
|
||||
|
@ -97,8 +93,6 @@ class PassConfig
|
|||
* @param string $type The pass type
|
||||
*
|
||||
* @throws InvalidArgumentException when a pass type doesn't exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION)
|
||||
{
|
||||
|
@ -115,8 +109,6 @@ class PassConfig
|
|||
* Gets all passes for the AfterRemoving pass.
|
||||
*
|
||||
* @return array An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAfterRemovingPasses()
|
||||
{
|
||||
|
@ -127,8 +119,6 @@ class PassConfig
|
|||
* Gets all passes for the BeforeOptimization pass.
|
||||
*
|
||||
* @return array An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getBeforeOptimizationPasses()
|
||||
{
|
||||
|
@ -139,8 +129,6 @@ class PassConfig
|
|||
* Gets all passes for the BeforeRemoving pass.
|
||||
*
|
||||
* @return array An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getBeforeRemovingPasses()
|
||||
{
|
||||
|
@ -151,8 +139,6 @@ class PassConfig
|
|||
* Gets all passes for the Optimization pass.
|
||||
*
|
||||
* @return array An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getOptimizationPasses()
|
||||
{
|
||||
|
@ -163,8 +149,6 @@ class PassConfig
|
|||
* Gets all passes for the Removing pass.
|
||||
*
|
||||
* @return array An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRemovingPasses()
|
||||
{
|
||||
|
@ -175,8 +159,6 @@ class PassConfig
|
|||
* Gets all passes for the Merge pass.
|
||||
*
|
||||
* @return array An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMergePass()
|
||||
{
|
||||
|
@ -187,8 +169,6 @@ class PassConfig
|
|||
* Sets the Merge Pass.
|
||||
*
|
||||
* @param CompilerPassInterface $pass The merge pass
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setMergePass(CompilerPassInterface $pass)
|
||||
{
|
||||
|
@ -199,8 +179,6 @@ class PassConfig
|
|||
* Sets the AfterRemoving passes.
|
||||
*
|
||||
* @param array $passes An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setAfterRemovingPasses(array $passes)
|
||||
{
|
||||
|
@ -211,8 +189,6 @@ class PassConfig
|
|||
* Sets the BeforeOptimization passes.
|
||||
*
|
||||
* @param array $passes An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setBeforeOptimizationPasses(array $passes)
|
||||
{
|
||||
|
@ -223,8 +199,6 @@ class PassConfig
|
|||
* Sets the BeforeRemoving passes.
|
||||
*
|
||||
* @param array $passes An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setBeforeRemovingPasses(array $passes)
|
||||
{
|
||||
|
@ -235,8 +209,6 @@ class PassConfig
|
|||
* Sets the Optimization passes.
|
||||
*
|
||||
* @param array $passes An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setOptimizationPasses(array $passes)
|
||||
{
|
||||
|
@ -247,8 +219,6 @@ class PassConfig
|
|||
* Sets the Removing passes.
|
||||
*
|
||||
* @param array $passes An array of passes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setRemovingPasses(array $passes)
|
||||
{
|
||||
|
|
|
@ -57,8 +57,6 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Container implements IntrospectableContainerInterface
|
||||
{
|
||||
|
@ -82,8 +80,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* Constructor.
|
||||
*
|
||||
* @param ParameterBagInterface $parameterBag A ParameterBagInterface instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(ParameterBagInterface $parameterBag = null)
|
||||
{
|
||||
|
@ -97,8 +93,6 @@ class Container implements IntrospectableContainerInterface
|
|||
*
|
||||
* * Parameter values are resolved;
|
||||
* * The parameter bag is frozen.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function compile()
|
||||
{
|
||||
|
@ -111,8 +105,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* Returns true if the container parameter bag are frozen.
|
||||
*
|
||||
* @return bool true if the container parameter bag are frozen, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isFrozen()
|
||||
{
|
||||
|
@ -123,8 +115,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* Gets the service container parameter bag.
|
||||
*
|
||||
* @return ParameterBagInterface A ParameterBagInterface instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getParameterBag()
|
||||
{
|
||||
|
@ -139,8 +129,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @return mixed The parameter value
|
||||
*
|
||||
* @throws InvalidArgumentException if the parameter is not defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getParameter($name)
|
||||
{
|
||||
|
@ -153,8 +141,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @param string $name The parameter name
|
||||
*
|
||||
* @return bool The presence of parameter in container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasParameter($name)
|
||||
{
|
||||
|
@ -166,8 +152,6 @@ class Container implements IntrospectableContainerInterface
|
|||
*
|
||||
* @param string $name The parameter name
|
||||
* @param mixed $value The parameter value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setParameter($name, $value)
|
||||
{
|
||||
|
@ -186,8 +170,6 @@ class Container implements IntrospectableContainerInterface
|
|||
*
|
||||
* @throws RuntimeException When trying to set a service in an inactive scope
|
||||
* @throws InvalidArgumentException When trying to set a service in the prototype scope
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($id, $service, $scope = self::SCOPE_CONTAINER)
|
||||
{
|
||||
|
@ -232,8 +214,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @param string $id The service identifier
|
||||
*
|
||||
* @return bool true if the service is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($id)
|
||||
{
|
||||
|
@ -269,8 +249,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @throws \Exception if an exception has been thrown when the service has been resolved
|
||||
*
|
||||
* @see Reference
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
|
||||
{
|
||||
|
@ -395,8 +373,6 @@ class Container implements IntrospectableContainerInterface
|
|||
*
|
||||
* @throws RuntimeException When the parent scope is inactive
|
||||
* @throws InvalidArgumentException When the scope does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function enterScope($name)
|
||||
{
|
||||
|
@ -443,8 +419,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @param string $name The name of the scope to leave
|
||||
*
|
||||
* @throws InvalidArgumentException if the scope is not active
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function leaveScope($name)
|
||||
{
|
||||
|
@ -490,8 +464,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @param ScopeInterface $scope
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addScope(ScopeInterface $scope)
|
||||
{
|
||||
|
@ -524,8 +496,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @param string $name The name of the scope
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasScope($name)
|
||||
{
|
||||
|
@ -540,8 +510,6 @@ class Container implements IntrospectableContainerInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isScopeActive($name)
|
||||
{
|
||||
|
|
|
@ -15,15 +15,11 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* A simple implementation of ContainerAwareInterface.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
abstract class ContainerAware implements ContainerAwareInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
|
@ -31,8 +27,6 @@ abstract class ContainerAware implements ContainerAwareInterface
|
|||
* Sets the Container associated with this Controller.
|
||||
*
|
||||
* @param ContainerInterface $container A ContainerInterface instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* ContainerAwareInterface should be implemented by classes that depends on a Container.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface ContainerAwareInterface
|
||||
{
|
||||
|
@ -24,8 +22,6 @@ interface ContainerAwareInterface
|
|||
* Sets the Container.
|
||||
*
|
||||
* @param ContainerInterface|null $container A ContainerInterface instance or null
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container = null);
|
||||
}
|
||||
|
|
|
@ -31,8 +31,6 @@ use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
|
|||
* ContainerBuilder is a DI container that provides an API to easily describe services.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
{
|
||||
|
@ -127,8 +125,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Registers an extension.
|
||||
*
|
||||
* @param ExtensionInterface $extension An extension instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function registerExtension(ExtensionInterface $extension)
|
||||
{
|
||||
|
@ -147,8 +143,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @return ExtensionInterface An extension instance
|
||||
*
|
||||
* @throws LogicException if the extension is not registered
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExtension($name)
|
||||
{
|
||||
|
@ -167,8 +161,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Returns all registered extensions.
|
||||
*
|
||||
* @return ExtensionInterface[] An array of ExtensionInterface
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExtensions()
|
||||
{
|
||||
|
@ -181,8 +173,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $name The name of the extension
|
||||
*
|
||||
* @return bool If the extension exists
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasExtension($name)
|
||||
{
|
||||
|
@ -193,8 +183,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Returns an array of resources loaded to build this configuration.
|
||||
*
|
||||
* @return ResourceInterface[] An array of resources
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getResources()
|
||||
{
|
||||
|
@ -207,8 +195,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param ResourceInterface $resource A resource instance
|
||||
*
|
||||
* @return ContainerBuilder The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addResource(ResourceInterface $resource)
|
||||
{
|
||||
|
@ -227,8 +213,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param ResourceInterface[] $resources An array of resources
|
||||
*
|
||||
* @return ContainerBuilder The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setResources(array $resources)
|
||||
{
|
||||
|
@ -247,8 +231,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param object $object An object instance
|
||||
*
|
||||
* @return ContainerBuilder The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addObjectResource($object)
|
||||
{
|
||||
|
@ -289,8 +271,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
*
|
||||
* @throws BadMethodCallException When this ContainerBuilder is frozen
|
||||
* @throws \LogicException if the container is frozen
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function loadFromExtension($extension, array $values = array())
|
||||
{
|
||||
|
@ -312,8 +292,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $type The type of compiler pass
|
||||
*
|
||||
* @return ContainerBuilder The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
|
||||
{
|
||||
|
@ -328,8 +306,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Returns the compiler pass config which can then be modified.
|
||||
*
|
||||
* @return PassConfig The compiler pass config
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCompilerPassConfig()
|
||||
{
|
||||
|
@ -340,8 +316,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Returns the compiler.
|
||||
*
|
||||
* @return Compiler The compiler
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCompiler()
|
||||
{
|
||||
|
@ -356,8 +330,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Returns all Scopes.
|
||||
*
|
||||
* @return array An array of scopes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScopes()
|
||||
{
|
||||
|
@ -368,8 +340,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Returns all Scope children.
|
||||
*
|
||||
* @return array An array of scope children.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScopeChildren()
|
||||
{
|
||||
|
@ -384,8 +354,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $scope The scope
|
||||
*
|
||||
* @throws BadMethodCallException When this ContainerBuilder is frozen
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($id, $service, $scope = self::SCOPE_CONTAINER)
|
||||
{
|
||||
|
@ -421,8 +389,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Removes a service definition.
|
||||
*
|
||||
* @param string $id The service identifier
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function removeDefinition($id)
|
||||
{
|
||||
|
@ -435,8 +401,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $id The service identifier
|
||||
*
|
||||
* @return bool true if the service is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($id)
|
||||
{
|
||||
|
@ -459,8 +423,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @throws \Exception
|
||||
*
|
||||
* @see Reference
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
|
||||
{
|
||||
|
@ -524,8 +486,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param ContainerBuilder $container The ContainerBuilder instance to merge.
|
||||
*
|
||||
* @throws BadMethodCallException When this ContainerBuilder is frozen
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function merge(ContainerBuilder $container)
|
||||
{
|
||||
|
@ -558,8 +518,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $name The name of the extension
|
||||
*
|
||||
* @return array An array of configuration
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExtensionConfig($name)
|
||||
{
|
||||
|
@ -598,8 +556,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* * Parameter values are resolved;
|
||||
* * The parameter bag is frozen;
|
||||
* * Extension loading is disabled.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function compile()
|
||||
{
|
||||
|
@ -640,8 +596,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Adds the service aliases.
|
||||
*
|
||||
* @param array $aliases An array of aliases
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addAliases(array $aliases)
|
||||
{
|
||||
|
@ -654,8 +608,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Sets the service aliases.
|
||||
*
|
||||
* @param array $aliases An array of aliases
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setAliases(array $aliases)
|
||||
{
|
||||
|
@ -671,8 +623,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
*
|
||||
* @throws InvalidArgumentException if the id is not a string or an Alias
|
||||
* @throws InvalidArgumentException if the alias is for itself
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setAlias($alias, $id)
|
||||
{
|
||||
|
@ -697,8 +647,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Removes an alias.
|
||||
*
|
||||
* @param string $alias The alias to remove
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function removeAlias($alias)
|
||||
{
|
||||
|
@ -711,8 +659,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $id The service identifier
|
||||
*
|
||||
* @return bool true if the alias exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasAlias($id)
|
||||
{
|
||||
|
@ -723,8 +669,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Gets all defined aliases.
|
||||
*
|
||||
* @return Alias[] An array of aliases
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAliases()
|
||||
{
|
||||
|
@ -739,8 +683,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @return Alias An Alias instance
|
||||
*
|
||||
* @throws InvalidArgumentException if the alias does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAlias($id)
|
||||
{
|
||||
|
@ -763,8 +705,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $class The service class
|
||||
*
|
||||
* @return Definition A Definition instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function register($id, $class = null)
|
||||
{
|
||||
|
@ -775,8 +715,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Adds the service definitions.
|
||||
*
|
||||
* @param Definition[] $definitions An array of service definitions
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addDefinitions(array $definitions)
|
||||
{
|
||||
|
@ -789,8 +727,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Sets the service definitions.
|
||||
*
|
||||
* @param Definition[] $definitions An array of service definitions
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefinitions(array $definitions)
|
||||
{
|
||||
|
@ -802,8 +738,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* Gets all service definitions.
|
||||
*
|
||||
* @return Definition[] An array of Definition instances
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDefinitions()
|
||||
{
|
||||
|
@ -819,8 +753,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @return Definition the service definition
|
||||
*
|
||||
* @throws BadMethodCallException When this ContainerBuilder is frozen
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefinition($id, Definition $definition)
|
||||
{
|
||||
|
@ -841,8 +773,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $id The service identifier
|
||||
*
|
||||
* @return bool true if the service definition exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasDefinition($id)
|
||||
{
|
||||
|
@ -857,8 +787,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @return Definition A Definition instance
|
||||
*
|
||||
* @throws InvalidArgumentException if the service definition does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDefinition($id)
|
||||
{
|
||||
|
@ -881,8 +809,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @return Definition A Definition instance
|
||||
*
|
||||
* @throws InvalidArgumentException if the service definition does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function findDefinition($id)
|
||||
{
|
||||
|
@ -1012,7 +938,9 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
public function resolveServices($value)
|
||||
{
|
||||
if (is_array($value)) {
|
||||
$value = array_map(array($this, 'resolveServices'), $value);
|
||||
foreach ($value as $k => $v) {
|
||||
$value[$k] = $this->resolveServices($v);
|
||||
}
|
||||
} elseif ($value instanceof Reference) {
|
||||
$value = $this->get((string) $value, $value->getInvalidBehavior());
|
||||
} elseif ($value instanceof Definition) {
|
||||
|
@ -1041,8 +969,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
* @param string $name The tag name
|
||||
*
|
||||
* @return array An array of tags with the tagged service as key, holding a list of attribute arrays.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function findTaggedServiceIds($name)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,6 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface ContainerInterface
|
||||
{
|
||||
|
@ -37,8 +35,6 @@ interface ContainerInterface
|
|||
* @param string $id The service identifier
|
||||
* @param object $service The service instance
|
||||
* @param string $scope The scope of the service
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($id, $service, $scope = self::SCOPE_CONTAINER);
|
||||
|
||||
|
@ -54,8 +50,6 @@ interface ContainerInterface
|
|||
* @throws ServiceNotFoundException When the service is not defined
|
||||
*
|
||||
* @see Reference
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
|
||||
|
||||
|
@ -65,8 +59,6 @@ interface ContainerInterface
|
|||
* @param string $id The service identifier
|
||||
*
|
||||
* @return bool true if the service is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($id);
|
||||
|
||||
|
@ -78,8 +70,6 @@ interface ContainerInterface
|
|||
* @return mixed The parameter value
|
||||
*
|
||||
* @throws InvalidArgumentException if the parameter is not defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getParameter($name);
|
||||
|
||||
|
@ -89,8 +79,6 @@ interface ContainerInterface
|
|||
* @param string $name The parameter name
|
||||
*
|
||||
* @return bool The presence of parameter in container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasParameter($name);
|
||||
|
||||
|
@ -99,8 +87,6 @@ interface ContainerInterface
|
|||
*
|
||||
* @param string $name The parameter name
|
||||
* @param mixed $value The parameter value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setParameter($name, $value);
|
||||
|
||||
|
@ -108,8 +94,6 @@ interface ContainerInterface
|
|||
* Enters the given scope.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function enterScope($name);
|
||||
|
||||
|
@ -117,8 +101,6 @@ interface ContainerInterface
|
|||
* Leaves the current scope, and re-enters the parent scope.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function leaveScope($name);
|
||||
|
||||
|
@ -126,8 +108,6 @@ interface ContainerInterface
|
|||
* Adds a scope to the container.
|
||||
*
|
||||
* @param ScopeInterface $scope
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addScope(ScopeInterface $scope);
|
||||
|
||||
|
@ -137,8 +117,6 @@ interface ContainerInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasScope($name);
|
||||
|
||||
|
@ -150,8 +128,6 @@ interface ContainerInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isScopeActive($name);
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
|
|||
* Definition represents a service definition.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Definition
|
||||
{
|
||||
|
@ -48,8 +46,6 @@ class Definition
|
|||
*
|
||||
* @param string|null $class The service class
|
||||
* @param array $arguments An array of arguments to pass to the service constructor
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($class = null, array $arguments = array())
|
||||
{
|
||||
|
@ -93,8 +89,6 @@ class Definition
|
|||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function setFactoryClass($factoryClass)
|
||||
|
@ -111,8 +105,6 @@ class Definition
|
|||
*
|
||||
* @return string|null The factory class name
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function getFactoryClass($triggerDeprecationError = true)
|
||||
|
@ -131,8 +123,6 @@ class Definition
|
|||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function setFactoryMethod($factoryMethod)
|
||||
|
@ -184,8 +174,6 @@ class Definition
|
|||
*
|
||||
* @return string|null The factory method name
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function getFactoryMethod($triggerDeprecationError = true)
|
||||
|
@ -204,8 +192,6 @@ class Definition
|
|||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function setFactoryService($factoryService)
|
||||
|
@ -222,8 +208,6 @@ class Definition
|
|||
*
|
||||
* @return string|null The factory service id
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function getFactoryService($triggerDeprecationError = true)
|
||||
|
@ -241,8 +225,6 @@ class Definition
|
|||
* @param string $class The service class
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setClass($class)
|
||||
{
|
||||
|
@ -255,8 +237,6 @@ class Definition
|
|||
* Gets the service class.
|
||||
*
|
||||
* @return string|null The service class
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
|
@ -269,8 +249,6 @@ class Definition
|
|||
* @param array $arguments An array of arguments
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
|
@ -279,9 +257,6 @@ class Definition
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function setProperties(array $properties)
|
||||
{
|
||||
$this->properties = $properties;
|
||||
|
@ -289,17 +264,11 @@ class Definition
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function getProperties()
|
||||
{
|
||||
return $this->properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function setProperty($name, $value)
|
||||
{
|
||||
$this->properties[$name] = $value;
|
||||
|
@ -313,8 +282,6 @@ class Definition
|
|||
* @param mixed $argument An argument
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addArgument($argument)
|
||||
{
|
||||
|
@ -332,8 +299,6 @@ class Definition
|
|||
* @return Definition The current instance
|
||||
*
|
||||
* @throws OutOfBoundsException When the replaced argument does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replaceArgument($index, $argument)
|
||||
{
|
||||
|
@ -350,8 +315,6 @@ class Definition
|
|||
* Gets the arguments to pass to the service constructor/factory method.
|
||||
*
|
||||
* @return array The array of arguments
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getArguments()
|
||||
{
|
||||
|
@ -366,8 +329,6 @@ class Definition
|
|||
* @return mixed The argument value
|
||||
*
|
||||
* @throws OutOfBoundsException When the argument does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getArgument($index)
|
||||
{
|
||||
|
@ -384,8 +345,6 @@ class Definition
|
|||
* @param array $calls An array of method calls
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setMethodCalls(array $calls = array())
|
||||
{
|
||||
|
@ -406,8 +365,6 @@ class Definition
|
|||
* @return Definition The current instance
|
||||
*
|
||||
* @throws InvalidArgumentException on empty $method param
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addMethodCall($method, array $arguments = array())
|
||||
{
|
||||
|
@ -425,8 +382,6 @@ class Definition
|
|||
* @param string $method The method name to remove
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function removeMethodCall($method)
|
||||
{
|
||||
|
@ -446,8 +401,6 @@ class Definition
|
|||
* @param string $method The method name to search for
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasMethodCall($method)
|
||||
{
|
||||
|
@ -464,8 +417,6 @@ class Definition
|
|||
* Gets the methods to call after service initialization.
|
||||
*
|
||||
* @return array An array of method calls
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMethodCalls()
|
||||
{
|
||||
|
@ -478,8 +429,6 @@ class Definition
|
|||
* @param array $tags
|
||||
*
|
||||
* @return Definition the current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setTags(array $tags)
|
||||
{
|
||||
|
@ -492,8 +441,6 @@ class Definition
|
|||
* Returns all tags.
|
||||
*
|
||||
* @return array An array of tags
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
|
@ -506,8 +453,6 @@ class Definition
|
|||
* @param string $name The tag name
|
||||
*
|
||||
* @return array An array of attributes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getTag($name)
|
||||
{
|
||||
|
@ -521,8 +466,6 @@ class Definition
|
|||
* @param array $attributes An array of attributes
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addTag($name, array $attributes = array())
|
||||
{
|
||||
|
@ -537,8 +480,6 @@ class Definition
|
|||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasTag($name)
|
||||
{
|
||||
|
@ -565,8 +506,6 @@ class Definition
|
|||
* Clears the tags for this definition.
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clearTags()
|
||||
{
|
||||
|
@ -581,8 +520,6 @@ class Definition
|
|||
* @param string $file A full pathname to include
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFile($file)
|
||||
{
|
||||
|
@ -595,8 +532,6 @@ class Definition
|
|||
* Gets the file to require before creating the service.
|
||||
*
|
||||
* @return string|null The full pathname to include
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getFile()
|
||||
{
|
||||
|
@ -609,8 +544,6 @@ class Definition
|
|||
* @param string $scope Whether the service must be shared or not
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setScope($scope)
|
||||
{
|
||||
|
@ -623,8 +556,6 @@ class Definition
|
|||
* Returns the scope of the service.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScope()
|
||||
{
|
||||
|
@ -637,8 +568,6 @@ class Definition
|
|||
* @param bool $boolean
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPublic($boolean)
|
||||
{
|
||||
|
@ -651,8 +580,6 @@ class Definition
|
|||
* Whether this service is public facing.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isPublic()
|
||||
{
|
||||
|
@ -666,8 +593,6 @@ class Definition
|
|||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.7, will be removed in 3.0.
|
||||
*/
|
||||
public function setSynchronized($boolean, $triggerDeprecationError = true)
|
||||
|
@ -686,8 +611,6 @@ class Definition
|
|||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @deprecated since version 2.7, will be removed in 3.0.
|
||||
*/
|
||||
public function isSynchronized($triggerDeprecationError = true)
|
||||
|
@ -730,8 +653,6 @@ class Definition
|
|||
* @param bool $boolean
|
||||
*
|
||||
* @return Definition the current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setSynthetic($boolean)
|
||||
{
|
||||
|
@ -745,8 +666,6 @@ class Definition
|
|||
* container, but dynamically injected.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSynthetic()
|
||||
{
|
||||
|
@ -760,8 +679,6 @@ class Definition
|
|||
* @param bool $boolean
|
||||
*
|
||||
* @return Definition the current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setAbstract($boolean)
|
||||
{
|
||||
|
@ -775,8 +692,6 @@ class Definition
|
|||
* template for other definitions.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isAbstract()
|
||||
{
|
||||
|
@ -789,8 +704,6 @@ class Definition
|
|||
* @param callable $callable A PHP callable
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setConfigurator($callable)
|
||||
{
|
||||
|
@ -803,8 +716,6 @@ class Definition
|
|||
* Gets the configurator to call after the service is fully initialized.
|
||||
*
|
||||
* @return callable|null The PHP callable to call
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getConfigurator()
|
||||
{
|
||||
|
|
|
@ -18,8 +18,6 @@ use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
|
|||
* This definition decorates another definition.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class DefinitionDecorator extends Definition
|
||||
{
|
||||
|
@ -30,8 +28,6 @@ class DefinitionDecorator extends Definition
|
|||
* Constructor.
|
||||
*
|
||||
* @param string $parent The id of Definition instance to decorate.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($parent)
|
||||
{
|
||||
|
@ -44,8 +40,6 @@ class DefinitionDecorator extends Definition
|
|||
* Returns the Definition being decorated.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
|
@ -56,8 +50,6 @@ class DefinitionDecorator extends Definition
|
|||
* Returns all changes tracked for the Definition object.
|
||||
*
|
||||
* @return array An array of changes for this Definition
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getChanges()
|
||||
{
|
||||
|
@ -66,8 +58,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setClass($class)
|
||||
{
|
||||
|
@ -89,7 +79,6 @@ class DefinitionDecorator extends Definition
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFactoryClass($class)
|
||||
{
|
||||
|
@ -100,8 +89,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFactoryMethod($method)
|
||||
{
|
||||
|
@ -112,8 +99,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFactoryService($service)
|
||||
{
|
||||
|
@ -124,8 +109,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setConfigurator($callable)
|
||||
{
|
||||
|
@ -136,8 +119,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFile($file)
|
||||
{
|
||||
|
@ -148,8 +129,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPublic($boolean)
|
||||
{
|
||||
|
@ -160,8 +139,6 @@ class DefinitionDecorator extends Definition
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setLazy($boolean)
|
||||
{
|
||||
|
@ -191,8 +168,6 @@ class DefinitionDecorator extends Definition
|
|||
* @return mixed The argument value
|
||||
*
|
||||
* @throws OutOfBoundsException When the argument does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getArgument($index)
|
||||
{
|
||||
|
@ -223,8 +198,6 @@ class DefinitionDecorator extends Definition
|
|||
* @return DefinitionDecorator the current instance
|
||||
*
|
||||
* @throws InvalidArgumentException when $index isn't an integer
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replaceArgument($index, $value)
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||
* Dumper is the abstract class for all built-in dumpers.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
abstract class Dumper implements DumperInterface
|
||||
{
|
||||
|
@ -28,8 +26,6 @@ abstract class Dumper implements DumperInterface
|
|||
* Constructor.
|
||||
*
|
||||
* @param ContainerBuilder $container The service container to dump
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(ContainerBuilder $container)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DependencyInjection\Dumper;
|
|||
* DumperInterface is the interface implemented by service container dumper classes.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface DumperInterface
|
||||
{
|
||||
|
@ -26,8 +24,6 @@ interface DumperInterface
|
|||
* @param array $options An array of options
|
||||
*
|
||||
* @return string The representation of the service container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function dump(array $options = array());
|
||||
}
|
||||
|
|
|
@ -32,8 +32,6 @@ use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class PhpDumper extends Dumper
|
||||
{
|
||||
|
@ -72,8 +70,6 @@ class PhpDumper extends Dumper
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(ContainerBuilder $container)
|
||||
{
|
||||
|
@ -104,8 +100,6 @@ class PhpDumper extends Dumper
|
|||
* @param array $options An array of options
|
||||
*
|
||||
* @return string A PHP class representing of the service container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function dump(array $options = array())
|
||||
{
|
||||
|
|
|
@ -24,8 +24,6 @@ use Symfony\Component\ExpressionLanguage\Expression;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Martin Hasoň <martin.hason@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class XmlDumper extends Dumper
|
||||
{
|
||||
|
@ -40,8 +38,6 @@ class XmlDumper extends Dumper
|
|||
* @param array $options An array of options
|
||||
*
|
||||
* @return string An xml string representing of the service container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function dump(array $options = array())
|
||||
{
|
||||
|
|
|
@ -24,8 +24,6 @@ use Symfony\Component\ExpressionLanguage\Expression;
|
|||
* YamlDumper dumps a service container as a YAML string.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class YamlDumper extends Dumper
|
||||
{
|
||||
|
@ -37,8 +35,6 @@ class YamlDumper extends Dumper
|
|||
* @param array $options An array of options
|
||||
*
|
||||
* @return string A YAML string representing of the service container
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function dump(array $options = array())
|
||||
{
|
||||
|
@ -166,10 +162,10 @@ class YamlDumper extends Dumper
|
|||
private function addServiceAlias($alias, $id)
|
||||
{
|
||||
if ($id->isPublic()) {
|
||||
return sprintf(" %s: @%s\n", $alias, $id);
|
||||
} else {
|
||||
return sprintf(" %s:\n alias: %s\n public: false", $alias, $id);
|
||||
return sprintf(" %s: '@%s'\n", $alias, $id);
|
||||
}
|
||||
|
||||
return sprintf(" %s:\n alias: %s\n public: false", $alias, $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,8 +17,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||
* ExtensionInterface is the interface implemented by container extension classes.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface ExtensionInterface
|
||||
{
|
||||
|
@ -29,8 +27,6 @@ interface ExtensionInterface
|
|||
* @param ContainerBuilder $container A ContainerBuilder instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When provided tag is not defined in this extension
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function load(array $config, ContainerBuilder $container);
|
||||
|
||||
|
@ -38,8 +34,6 @@ interface ExtensionInterface
|
|||
* Returns the namespace to be used for this extension (XML namespace).
|
||||
*
|
||||
* @return string The XML namespace
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getNamespace();
|
||||
|
||||
|
@ -47,8 +41,6 @@ interface ExtensionInterface
|
|||
* Returns the base path for the XSD files.
|
||||
*
|
||||
* @return string The XSD base path
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getXsdValidationBasePath();
|
||||
|
||||
|
@ -58,8 +50,6 @@ interface ExtensionInterface
|
|||
* This alias is also the mandatory prefix to use when using YAML.
|
||||
*
|
||||
* @return string The alias
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAlias();
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* Parameter represents a parameter reference.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Parameter
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ use Symfony\Component\DependencyInjection\Exception\LogicException;
|
|||
* Holds read-only parameters.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class FrozenParameterBag extends ParameterBag
|
||||
{
|
||||
|
@ -31,8 +29,6 @@ class FrozenParameterBag extends ParameterBag
|
|||
* This is always the case when used internally.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters = array())
|
||||
{
|
||||
|
@ -42,8 +38,6 @@ class FrozenParameterBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
@ -52,8 +46,6 @@ class FrozenParameterBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $parameters)
|
||||
{
|
||||
|
@ -62,8 +54,6 @@ class FrozenParameterBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($name, $value)
|
||||
{
|
||||
|
@ -72,8 +62,6 @@ class FrozenParameterBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($name)
|
||||
{
|
||||
|
|
|
@ -19,8 +19,6 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
|||
* Holds parameters.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ParameterBag implements ParameterBagInterface
|
||||
{
|
||||
|
@ -31,8 +29,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters = array())
|
||||
{
|
||||
|
@ -41,8 +37,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
|
||||
/**
|
||||
* Clears all parameters.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
@ -53,8 +47,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
* Adds parameters to the service container parameters.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $parameters)
|
||||
{
|
||||
|
@ -67,8 +59,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
* Gets the service container parameters.
|
||||
*
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
|
@ -83,8 +73,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
* @return mixed The parameter value
|
||||
*
|
||||
* @throws ParameterNotFoundException if the parameter is not defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
|
@ -114,8 +102,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
*
|
||||
* @param string $name The parameter name
|
||||
* @param mixed $value The parameter value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($name, $value)
|
||||
{
|
||||
|
@ -128,8 +114,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
* @param string $name The parameter name
|
||||
*
|
||||
* @return bool true if the parameter name is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
|
@ -140,8 +124,6 @@ class ParameterBag implements ParameterBagInterface
|
|||
* Removes a parameter.
|
||||
*
|
||||
* @param string $name The parameter name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($name)
|
||||
{
|
||||
|
|
|
@ -18,8 +18,6 @@ use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
|
|||
* ParameterBagInterface.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface ParameterBagInterface
|
||||
{
|
||||
|
@ -27,8 +25,6 @@ interface ParameterBagInterface
|
|||
* Clears all parameters.
|
||||
*
|
||||
* @throws LogicException if the ParameterBagInterface can not be cleared
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear();
|
||||
|
||||
|
@ -38,8 +34,6 @@ interface ParameterBagInterface
|
|||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @throws LogicException if the parameter can not be added
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $parameters);
|
||||
|
||||
|
@ -47,8 +41,6 @@ interface ParameterBagInterface
|
|||
* Gets the service container parameters.
|
||||
*
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all();
|
||||
|
||||
|
@ -60,8 +52,6 @@ interface ParameterBagInterface
|
|||
* @return mixed The parameter value
|
||||
*
|
||||
* @throws ParameterNotFoundException if the parameter is not defined
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name);
|
||||
|
||||
|
@ -72,8 +62,6 @@ interface ParameterBagInterface
|
|||
* @param mixed $value The parameter value
|
||||
*
|
||||
* @throws LogicException if the parameter can not be set
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($name, $value);
|
||||
|
||||
|
@ -83,8 +71,6 @@ interface ParameterBagInterface
|
|||
* @param string $name The parameter name
|
||||
*
|
||||
* @return bool true if the parameter name is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($name);
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* Reference represents a service reference.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Reference
|
||||
{
|
||||
|
|
11
vendor/symfony/dependency-injection/Scope.php
vendored
11
vendor/symfony/dependency-injection/Scope.php
vendored
|
@ -15,34 +15,23 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* Scope class.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Scope implements ScopeInterface
|
||||
{
|
||||
private $name;
|
||||
private $parentName;
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->parentName = $parentName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function getParentName()
|
||||
{
|
||||
return $this->parentName;
|
||||
|
|
|
@ -15,18 +15,10 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* Scope Interface.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface ScopeInterface
|
||||
{
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function getParentName();
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DependencyInjection;
|
|||
* TaggedContainerInterface is the interface implemented when a container knows how to deals with tags.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface TaggedContainerInterface extends ContainerInterface
|
||||
{
|
||||
|
@ -26,8 +24,6 @@ interface TaggedContainerInterface extends ContainerInterface
|
|||
* @param string $name The tag name
|
||||
*
|
||||
* @return array An array of tags
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function findTaggedServiceIds($name);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/yaml": "~2.1",
|
||||
"symfony/config": "~2.2",
|
||||
"symfony/expression-language": "~2.6"
|
||||
|
|
111
vendor/symfony/dom-crawler/Crawler.php
vendored
111
vendor/symfony/dom-crawler/Crawler.php
vendored
|
@ -17,8 +17,6 @@ use Symfony\Component\CssSelector\CssSelector;
|
|||
* Crawler eases navigation of a list of \DOMElement objects.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Crawler extends \SplObjectStorage
|
||||
{
|
||||
|
@ -48,8 +46,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @param mixed $node A Node to use as the base for the crawling
|
||||
* @param string $currentUri The current URI
|
||||
* @param string $baseHref The base href value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($node = null, $currentUri = null, $baseHref = null)
|
||||
{
|
||||
|
@ -61,8 +57,6 @@ class Crawler extends \SplObjectStorage
|
|||
|
||||
/**
|
||||
* Removes all the nodes.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
@ -78,8 +72,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @param \DOMNodeList|\DOMNode|array|string|null $node A node
|
||||
*
|
||||
* @throws \InvalidArgumentException When node is not the expected type.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add($node)
|
||||
{
|
||||
|
@ -155,8 +147,6 @@ class Crawler extends \SplObjectStorage
|
|||
*
|
||||
* @param string $content The HTML content
|
||||
* @param string $charset The charset
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addHtmlContent($content, $charset = 'UTF-8')
|
||||
{
|
||||
|
@ -239,8 +229,6 @@ class Crawler extends \SplObjectStorage
|
|||
*
|
||||
* @param string $content The XML content
|
||||
* @param string $charset The charset
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addXmlContent($content, $charset = 'UTF-8')
|
||||
{
|
||||
|
@ -269,8 +257,6 @@ class Crawler extends \SplObjectStorage
|
|||
* Adds a \DOMDocument to the list of nodes.
|
||||
*
|
||||
* @param \DOMDocument $dom A \DOMDocument instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addDocument(\DOMDocument $dom)
|
||||
{
|
||||
|
@ -283,8 +269,6 @@ class Crawler extends \SplObjectStorage
|
|||
* Adds a \DOMNodeList to the list of nodes.
|
||||
*
|
||||
* @param \DOMNodeList $nodes A \DOMNodeList instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addNodeList(\DOMNodeList $nodes)
|
||||
{
|
||||
|
@ -299,8 +283,6 @@ class Crawler extends \SplObjectStorage
|
|||
* Adds an array of \DOMNode instances to the list of nodes.
|
||||
*
|
||||
* @param \DOMNode[] $nodes An array of \DOMNode instances
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addNodes(array $nodes)
|
||||
{
|
||||
|
@ -313,8 +295,6 @@ class Crawler extends \SplObjectStorage
|
|||
* Adds a \DOMNode instance to the list of nodes.
|
||||
*
|
||||
* @param \DOMNode $node A \DOMNode instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addNode(\DOMNode $node)
|
||||
{
|
||||
|
@ -325,24 +305,33 @@ class Crawler extends \SplObjectStorage
|
|||
}
|
||||
}
|
||||
|
||||
// Serializing and unserializing a crawler creates DOM objects in a corrupted state. DOM elements are not properly serializable.
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
throw new \BadMethodCallException('A Crawler cannot be serialized.');
|
||||
}
|
||||
|
||||
public function serialize()
|
||||
{
|
||||
throw new \BadMethodCallException('A Crawler cannot be serialized.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a node given its position in the node list.
|
||||
*
|
||||
* @param int $position The position
|
||||
*
|
||||
* @return Crawler A new instance of the Crawler with the selected node, or an empty Crawler if it does not exist.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function eq($position)
|
||||
{
|
||||
foreach ($this as $i => $node) {
|
||||
if ($i == $position) {
|
||||
return new static($node, $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($node);
|
||||
}
|
||||
}
|
||||
|
||||
return new static(null, $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -360,14 +349,12 @@ class Crawler extends \SplObjectStorage
|
|||
* @param \Closure $closure An anonymous function
|
||||
*
|
||||
* @return array An array of values returned by the anonymous function
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function each(\Closure $closure)
|
||||
{
|
||||
$data = array();
|
||||
foreach ($this as $i => $node) {
|
||||
$data[] = $closure(new static($node, $this->uri, $this->baseHref), $i);
|
||||
$data[] = $closure($this->createSubCrawler($node), $i);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
@ -383,7 +370,7 @@ class Crawler extends \SplObjectStorage
|
|||
*/
|
||||
public function slice($offset = 0, $length = -1)
|
||||
{
|
||||
return new static(iterator_to_array(new \LimitIterator($this, $offset, $length)), $this->uri);
|
||||
return $this->createSubCrawler(iterator_to_array(new \LimitIterator($this, $offset, $length)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -394,27 +381,23 @@ class Crawler extends \SplObjectStorage
|
|||
* @param \Closure $closure An anonymous function
|
||||
*
|
||||
* @return Crawler A Crawler instance with the selected nodes.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function reduce(\Closure $closure)
|
||||
{
|
||||
$nodes = array();
|
||||
foreach ($this as $i => $node) {
|
||||
if (false !== $closure(new static($node, $this->uri, $this->baseHref), $i)) {
|
||||
if (false !== $closure($this->createSubCrawler($node), $i)) {
|
||||
$nodes[] = $node;
|
||||
}
|
||||
}
|
||||
|
||||
return new static($nodes, $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the first node of the current selection.
|
||||
*
|
||||
* @return Crawler A Crawler instance with the first selected node
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function first()
|
||||
{
|
||||
|
@ -425,8 +408,6 @@ class Crawler extends \SplObjectStorage
|
|||
* Returns the last node of the current selection.
|
||||
*
|
||||
* @return Crawler A Crawler instance with the last selected node
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function last()
|
||||
{
|
||||
|
@ -439,8 +420,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Crawler A Crawler instance with the sibling nodes
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function siblings()
|
||||
{
|
||||
|
@ -448,7 +427,7 @@ class Crawler extends \SplObjectStorage
|
|||
throw new \InvalidArgumentException('The current node list is empty.');
|
||||
}
|
||||
|
||||
return new static($this->sibling($this->getNode(0)->parentNode->firstChild), $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($this->sibling($this->getNode(0)->parentNode->firstChild));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -457,8 +436,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Crawler A Crawler instance with the next sibling nodes
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function nextAll()
|
||||
{
|
||||
|
@ -466,7 +443,7 @@ class Crawler extends \SplObjectStorage
|
|||
throw new \InvalidArgumentException('The current node list is empty.');
|
||||
}
|
||||
|
||||
return new static($this->sibling($this->getNode(0)), $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($this->sibling($this->getNode(0)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -475,8 +452,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Crawler A Crawler instance with the previous sibling nodes
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function previousAll()
|
||||
{
|
||||
|
@ -484,7 +459,7 @@ class Crawler extends \SplObjectStorage
|
|||
throw new \InvalidArgumentException('The current node list is empty.');
|
||||
}
|
||||
|
||||
return new static($this->sibling($this->getNode(0), 'previousSibling'), $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($this->sibling($this->getNode(0), 'previousSibling'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -493,8 +468,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Crawler A Crawler instance with the parents nodes of the current selection
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function parents()
|
||||
{
|
||||
|
@ -511,7 +484,7 @@ class Crawler extends \SplObjectStorage
|
|||
}
|
||||
}
|
||||
|
||||
return new static($nodes, $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -520,8 +493,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Crawler A Crawler instance with the children nodes
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
|
@ -531,7 +502,7 @@ class Crawler extends \SplObjectStorage
|
|||
|
||||
$node = $this->getNode(0)->firstChild;
|
||||
|
||||
return new static($node ? $this->sibling($node) : array(), $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler($node ? $this->sibling($node) : array());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -542,8 +513,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return string|null The attribute value or null if the attribute does not exist
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function attr($attribute)
|
||||
{
|
||||
|
@ -578,8 +547,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return string The node value
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function text()
|
||||
{
|
||||
|
@ -623,8 +590,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @param array $attributes An array of attributes
|
||||
*
|
||||
* @return array An array of extracted values
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function extract($attributes)
|
||||
{
|
||||
|
@ -659,8 +624,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @param string $xpath An XPath expression
|
||||
*
|
||||
* @return Crawler A new instance of Crawler with the filtered list of nodes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function filterXPath($xpath)
|
||||
{
|
||||
|
@ -668,7 +631,7 @@ class Crawler extends \SplObjectStorage
|
|||
|
||||
// If we dropped all expressions in the XPath while preparing it, there would be no match
|
||||
if ('' === $xpath) {
|
||||
return new static(null, $this->uri, $this->baseHref);
|
||||
return $this->createSubCrawler(null);
|
||||
}
|
||||
|
||||
return $this->filterRelativeXPath($xpath);
|
||||
|
@ -684,8 +647,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Crawler A new instance of Crawler with the filtered list of nodes
|
||||
*
|
||||
* @throws \RuntimeException if the CssSelector Component is not available
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function filter($selector)
|
||||
{
|
||||
|
@ -703,8 +664,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @param string $value The link text
|
||||
*
|
||||
* @return Crawler A new instance of Crawler with the filtered list of nodes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function selectLink($value)
|
||||
{
|
||||
|
@ -720,8 +679,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @param string $value The button text
|
||||
*
|
||||
* @return Crawler A new instance of Crawler with the filtered list of nodes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function selectButton($value)
|
||||
{
|
||||
|
@ -741,8 +698,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Link A Link instance
|
||||
*
|
||||
* @throws \InvalidArgumentException If the current node list is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function link($method = 'get')
|
||||
{
|
||||
|
@ -759,8 +714,6 @@ class Crawler extends \SplObjectStorage
|
|||
* Returns an array of Link objects for the nodes in the list.
|
||||
*
|
||||
* @return Link[] An array of Link instances
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function links()
|
||||
{
|
||||
|
@ -781,8 +734,6 @@ class Crawler extends \SplObjectStorage
|
|||
* @return Form A Form instance
|
||||
*
|
||||
* @throws \InvalidArgumentException If the current node list is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function form(array $values = null, $method = null)
|
||||
{
|
||||
|
@ -878,7 +829,7 @@ class Crawler extends \SplObjectStorage
|
|||
{
|
||||
$prefixes = $this->findNamespacePrefixes($xpath);
|
||||
|
||||
$crawler = new static(null, $this->uri, $this->baseHref);
|
||||
$crawler = $this->createSubCrawler(null);
|
||||
|
||||
foreach ($this as $node) {
|
||||
$domxpath = $this->createDOMXPath($node->ownerDocument, $prefixes);
|
||||
|
@ -1048,4 +999,18 @@ class Crawler extends \SplObjectStorage
|
|||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a crawler for some subnodes.
|
||||
*
|
||||
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
private function createSubCrawler($nodes)
|
||||
{
|
||||
$crawler = new static($nodes, $this->uri, $this->baseHref);
|
||||
|
||||
return $crawler;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,6 @@ namespace Symfony\Component\DomCrawler\Field;
|
|||
* It is constructed from a HTML select tag, or a HTML checkbox, or radio inputs.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ChoiceFormField extends FormField
|
||||
{
|
||||
|
@ -74,8 +72,6 @@ class ChoiceFormField extends FormField
|
|||
* Sets the value of the field.
|
||||
*
|
||||
* @param string $value The value of the field
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function select($value)
|
||||
{
|
||||
|
@ -86,8 +82,6 @@ class ChoiceFormField extends FormField
|
|||
* Ticks a checkbox.
|
||||
*
|
||||
* @throws \LogicException When the type provided is not correct
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function tick()
|
||||
{
|
||||
|
@ -102,8 +96,6 @@ class ChoiceFormField extends FormField
|
|||
* Ticks a checkbox.
|
||||
*
|
||||
* @throws \LogicException When the type provided is not correct
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function untick()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DomCrawler\Field;
|
|||
* FileFormField represents a file form field (an HTML file input tag).
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class FileFormField extends FormField
|
||||
{
|
||||
|
@ -41,8 +39,6 @@ class FileFormField extends FormField
|
|||
* Sets the value of the field.
|
||||
*
|
||||
* @param string $value The value of the field
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function upload($value)
|
||||
{
|
||||
|
|
|
@ -81,8 +81,6 @@ abstract class FormField
|
|||
* Sets the value of the field.
|
||||
*
|
||||
* @param string $value The value of the field
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
|
|
|
@ -18,8 +18,6 @@ namespace Symfony\Component\DomCrawler\Field;
|
|||
* specialized classes (cf. FileFormField and ChoiceFormField).
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class InputFormField extends FormField
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DomCrawler\Field;
|
|||
* TextareaFormField represents a textarea form field (an HTML textarea tag).
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class TextareaFormField extends FormField
|
||||
{
|
||||
|
|
28
vendor/symfony/dom-crawler/Form.php
vendored
28
vendor/symfony/dom-crawler/Form.php
vendored
|
@ -18,8 +18,6 @@ use Symfony\Component\DomCrawler\Field\FormField;
|
|||
* Form represents an HTML form.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Form extends Link implements \ArrayAccess
|
||||
{
|
||||
|
@ -47,8 +45,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* @param string $baseHref The URI of the <base> used for relative links, but not for empty action
|
||||
*
|
||||
* @throws \LogicException if the node is not a button inside a form tag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(\DOMElement $node, $currentUri, $method = null, $baseHref = null)
|
||||
{
|
||||
|
@ -74,8 +70,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* @param array $values An array of field values
|
||||
*
|
||||
* @return Form
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setValues(array $values)
|
||||
{
|
||||
|
@ -92,8 +86,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* The returned array does not include file fields (@see getFiles).
|
||||
*
|
||||
* @return array An array of field values.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getValues()
|
||||
{
|
||||
|
@ -115,8 +107,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* Gets the file field values.
|
||||
*
|
||||
* @return array An array of file field values.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
|
@ -146,8 +136,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* (like foo[bar] to arrays) like PHP does.
|
||||
*
|
||||
* @return array An array of field values.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPhpValues()
|
||||
{
|
||||
|
@ -171,8 +159,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* (like foo[bar] to arrays) like PHP does.
|
||||
*
|
||||
* @return array An array of field values.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPhpFiles()
|
||||
{
|
||||
|
@ -197,8 +183,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* browser behavior.
|
||||
*
|
||||
* @return string The URI
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUri()
|
||||
{
|
||||
|
@ -232,8 +216,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* If no method is defined in the form, GET is returned.
|
||||
*
|
||||
* @return string The method
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMethod()
|
||||
{
|
||||
|
@ -250,8 +232,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* @param string $name The field name
|
||||
*
|
||||
* @return bool true if the field exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
|
@ -264,8 +244,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* @param string $name The field name
|
||||
*
|
||||
* @throws \InvalidArgumentException when the name is malformed
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($name)
|
||||
{
|
||||
|
@ -280,8 +258,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* @return FormField The field instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When field is not present in this form
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
|
@ -292,8 +268,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* Sets a named field.
|
||||
*
|
||||
* @param FormField $field The field
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set(FormField $field)
|
||||
{
|
||||
|
@ -304,8 +278,6 @@ class Form extends Link implements \ArrayAccess
|
|||
* Gets all fields.
|
||||
*
|
||||
* @return FormField[] An array of fields
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
|
|
8
vendor/symfony/dom-crawler/Link.php
vendored
8
vendor/symfony/dom-crawler/Link.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\DomCrawler;
|
|||
* Link represents an HTML link (an HTML a, area or link tag).
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Link
|
||||
{
|
||||
|
@ -43,8 +41,6 @@ class Link
|
|||
* @param string $method The method to use for the link (get by default)
|
||||
*
|
||||
* @throws \InvalidArgumentException if the node is not a link
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(\DOMElement $node, $currentUri, $method = 'GET')
|
||||
{
|
||||
|
@ -71,8 +67,6 @@ class Link
|
|||
* Gets the method associated with this link.
|
||||
*
|
||||
* @return string The method
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMethod()
|
||||
{
|
||||
|
@ -83,8 +77,6 @@ class Link
|
|||
* Gets the URI associated with this link.
|
||||
*
|
||||
* @return string The URI
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUri()
|
||||
{
|
||||
|
|
1
vendor/symfony/dom-crawler/composer.json
vendored
1
vendor/symfony/dom-crawler/composer.json
vendored
|
@ -19,7 +19,6 @@
|
|||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/css-selector": "~2.3"
|
||||
},
|
||||
"suggest": {
|
||||
|
|
14
vendor/symfony/event-dispatcher/Event.php
vendored
14
vendor/symfony/event-dispatcher/Event.php
vendored
|
@ -24,8 +24,6 @@ namespace Symfony\Component\EventDispatcher;
|
|||
* @author Jonathan Wage <jonwage@gmail.com>
|
||||
* @author Roman Borschel <roman@code-factory.org>
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Event
|
||||
{
|
||||
|
@ -50,8 +48,6 @@ class Event
|
|||
* @see Event::stopPropagation()
|
||||
*
|
||||
* @return bool Whether propagation was already stopped for this event.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isPropagationStopped()
|
||||
{
|
||||
|
@ -64,8 +60,6 @@ class Event
|
|||
* If multiple event listeners are connected to the same event, no
|
||||
* further event listener will be triggered once any trigger calls
|
||||
* stopPropagation().
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function stopPropagation()
|
||||
{
|
||||
|
@ -78,8 +72,6 @@ class Event
|
|||
* @param EventDispatcherInterface $dispatcher
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDispatcher(EventDispatcherInterface $dispatcher)
|
||||
{
|
||||
|
@ -92,8 +84,6 @@ class Event
|
|||
* @return EventDispatcherInterface
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDispatcher()
|
||||
{
|
||||
|
@ -108,8 +98,6 @@ class Event
|
|||
* @return string
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@ -124,8 +112,6 @@ class Event
|
|||
* @param string $name The event name.
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
|
|
|
@ -24,8 +24,6 @@ namespace Symfony\Component\EventDispatcher;
|
|||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @author Jordan Alliot <jordan.alliot@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class EventDispatcher implements EventDispatcherInterface
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ namespace Symfony\Component\EventDispatcher;
|
|||
* manager.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface EventDispatcherInterface
|
||||
{
|
||||
|
@ -32,8 +30,6 @@ interface EventDispatcherInterface
|
|||
* If not supplied, an empty Event instance is created.
|
||||
*
|
||||
* @return Event
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function dispatch($eventName, Event $event = null);
|
||||
|
||||
|
@ -44,8 +40,6 @@ interface EventDispatcherInterface
|
|||
* @param callable $listener The listener
|
||||
* @param int $priority The higher this value, the earlier an event
|
||||
* listener will be triggered in the chain (defaults to 0)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addListener($eventName, $listener, $priority = 0);
|
||||
|
||||
|
@ -56,8 +50,6 @@ interface EventDispatcherInterface
|
|||
* interested in and added as a listener for these events.
|
||||
*
|
||||
* @param EventSubscriberInterface $subscriber The subscriber.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function addSubscriber(EventSubscriberInterface $subscriber);
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ namespace Symfony\Component\EventDispatcher;
|
|||
* @author Jonathan Wage <jonwage@gmail.com>
|
||||
* @author Roman Borschel <roman@code-factory.org>
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface EventSubscriberInterface
|
||||
{
|
||||
|
@ -43,8 +41,6 @@ interface EventSubscriberInterface
|
|||
* * array('eventName' => array(array('methodName1', $priority), array('methodName2'))
|
||||
*
|
||||
* @return array The event names to listen to
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function getSubscribedEvents();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/dependency-injection": "~2.6",
|
||||
"symfony/expression-language": "~2.6",
|
||||
"symfony/config": "~2.0,>=2.0.5",
|
||||
|
|
20
vendor/symfony/http-foundation/Cookie.php
vendored
20
vendor/symfony/http-foundation/Cookie.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* Represents a cookie.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Cookie
|
||||
{
|
||||
|
@ -40,8 +38,6 @@ class Cookie
|
|||
* @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true)
|
||||
{
|
||||
|
@ -116,8 +112,6 @@ class Cookie
|
|||
* Gets the name of the cookie.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@ -128,8 +122,6 @@ class Cookie
|
|||
* Gets the value of the cookie.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
|
@ -140,8 +132,6 @@ class Cookie
|
|||
* Gets the domain that the cookie is available to.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDomain()
|
||||
{
|
||||
|
@ -152,8 +142,6 @@ class Cookie
|
|||
* Gets the time the cookie expires.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExpiresTime()
|
||||
{
|
||||
|
@ -164,8 +152,6 @@ class Cookie
|
|||
* Gets the path on the server in which the cookie will be available on.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
|
@ -176,8 +162,6 @@ class Cookie
|
|||
* Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSecure()
|
||||
{
|
||||
|
@ -188,8 +172,6 @@ class Cookie
|
|||
* Checks whether the cookie will be made accessible only through the HTTP protocol.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isHttpOnly()
|
||||
{
|
||||
|
@ -200,8 +182,6 @@ class Cookie
|
|||
* Whether this cookie is about to be cleared.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isCleared()
|
||||
{
|
||||
|
|
10
vendor/symfony/http-foundation/File/File.php
vendored
10
vendor/symfony/http-foundation/File/File.php
vendored
|
@ -20,8 +20,6 @@ use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
|
|||
* A file in the file system.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class File extends \SplFileInfo
|
||||
{
|
||||
|
@ -32,8 +30,6 @@ class File extends \SplFileInfo
|
|||
* @param bool $checkPath Whether to check the path or not
|
||||
*
|
||||
* @throws FileNotFoundException If the given path is not a file
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($path, $checkPath = true)
|
||||
{
|
||||
|
@ -54,8 +50,6 @@ class File extends \SplFileInfo
|
|||
*
|
||||
* @return string|null The guessed extension or null if it cannot be guessed
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @see ExtensionGuesser
|
||||
* @see getMimeType()
|
||||
*/
|
||||
|
@ -77,8 +71,6 @@ class File extends \SplFileInfo
|
|||
* @return string|null The guessed mime type (i.e. "application/pdf")
|
||||
*
|
||||
* @see MimeTypeGuesser
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMimeType()
|
||||
{
|
||||
|
@ -96,8 +88,6 @@ class File extends \SplFileInfo
|
|||
* @return File A File object representing the new file
|
||||
*
|
||||
* @throws FileException if the target file could not be created
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function move($directory, $name = null)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,6 @@ use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
|
|||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class UploadedFile extends File
|
||||
{
|
||||
|
@ -86,8 +84,6 @@ class UploadedFile extends File
|
|||
*
|
||||
* @throws FileException If file_uploads is disabled
|
||||
* @throws FileNotFoundException If the file does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($path, $originalName, $mimeType = null, $size = null, $error = null, $test = false)
|
||||
{
|
||||
|
@ -107,8 +103,6 @@ class UploadedFile extends File
|
|||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return string|null The original name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientOriginalName()
|
||||
{
|
||||
|
@ -140,8 +134,6 @@ class UploadedFile extends File
|
|||
* @return string|null The mime type
|
||||
*
|
||||
* @see getMimeType()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientMimeType()
|
||||
{
|
||||
|
@ -180,8 +172,6 @@ class UploadedFile extends File
|
|||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return int|null The file size
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientSize()
|
||||
{
|
||||
|
@ -195,8 +185,6 @@ class UploadedFile extends File
|
|||
* Otherwise one of the other UPLOAD_ERR_XXX constants is returned.
|
||||
*
|
||||
* @return int The upload error
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getError()
|
||||
{
|
||||
|
@ -207,8 +195,6 @@ class UploadedFile extends File
|
|||
* Returns whether the file was uploaded successfully.
|
||||
*
|
||||
* @return bool True if the file has been uploaded with HTTP and no error occurred.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isValid()
|
||||
{
|
||||
|
@ -226,8 +212,6 @@ class UploadedFile extends File
|
|||
* @return File A File object representing the new file
|
||||
*
|
||||
* @throws FileException if, for any reason, the file could not have been moved
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function move($directory, $name = null)
|
||||
{
|
||||
|
|
10
vendor/symfony/http-foundation/FileBag.php
vendored
10
vendor/symfony/http-foundation/FileBag.php
vendored
|
@ -18,8 +18,6 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Bulat Shakirzyanov <mallluhuct@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class FileBag extends ParameterBag
|
||||
{
|
||||
|
@ -29,8 +27,6 @@ class FileBag extends ParameterBag
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $parameters An array of HTTP files
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters = array())
|
||||
{
|
||||
|
@ -39,8 +35,6 @@ class FileBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $files = array())
|
||||
{
|
||||
|
@ -50,8 +44,6 @@ class FileBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $value)
|
||||
{
|
||||
|
@ -64,8 +56,6 @@ class FileBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $files = array())
|
||||
{
|
||||
|
|
24
vendor/symfony/http-foundation/HeaderBag.php
vendored
24
vendor/symfony/http-foundation/HeaderBag.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* HeaderBag is a container for HTTP headers.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class HeaderBag implements \IteratorAggregate, \Countable
|
||||
{
|
||||
|
@ -27,8 +25,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $headers = array())
|
||||
{
|
||||
|
@ -65,8 +61,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Returns the headers.
|
||||
*
|
||||
* @return array An array of headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
|
@ -77,8 +71,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Returns the parameter keys.
|
||||
*
|
||||
* @return array An array of parameter keys
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function keys()
|
||||
{
|
||||
|
@ -89,8 +81,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Replaces the current HTTP headers by a new set.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $headers = array())
|
||||
{
|
||||
|
@ -102,8 +92,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Adds new headers the current HTTP headers set.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $headers)
|
||||
{
|
||||
|
@ -120,8 +108,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $first Whether to return the first value or all header values
|
||||
*
|
||||
* @return string|array The first header value if $first is true, an array of values otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($key, $default = null, $first = true)
|
||||
{
|
||||
|
@ -148,8 +134,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param string $key The key
|
||||
* @param string|array $values The value or an array of values
|
||||
* @param bool $replace Whether to replace the actual value or not (true by default)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $values, $replace = true)
|
||||
{
|
||||
|
@ -174,8 +158,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param string $key The HTTP header
|
||||
*
|
||||
* @return bool true if the parameter exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
|
@ -189,8 +171,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param string $value The HTTP value
|
||||
*
|
||||
* @return bool true if the value is contained in the header, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function contains($key, $value)
|
||||
{
|
||||
|
@ -201,8 +181,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Removes a header.
|
||||
*
|
||||
* @param string $key The HTTP header name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
|
@ -224,8 +202,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @return null|\DateTime The parsed DateTime or the default value if the header does not exist
|
||||
*
|
||||
* @throws \RuntimeException When the HTTP header is not parseable
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDate($key, \DateTime $default = null)
|
||||
{
|
||||
|
|
13
vendor/symfony/http-foundation/IpUtils.php
vendored
13
vendor/symfony/http-foundation/IpUtils.php
vendored
|
@ -57,18 +57,19 @@ class IpUtils
|
|||
* @param string $requestIp IPv4 address to check
|
||||
* @param string $ip IPv4 address or subnet in CIDR notation
|
||||
*
|
||||
* @return bool Whether the IP is valid
|
||||
* @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet.
|
||||
*/
|
||||
public static function checkIp4($requestIp, $ip)
|
||||
{
|
||||
if (false !== strpos($ip, '/')) {
|
||||
if ('0.0.0.0/0' === $ip) {
|
||||
return true;
|
||||
}
|
||||
|
||||
list($address, $netmask) = explode('/', $ip, 2);
|
||||
|
||||
if ($netmask < 1 || $netmask > 32) {
|
||||
if ($netmask === '0') {
|
||||
// Ensure IP is valid - using ip2long below implicitly validates, but we need to do it manually here
|
||||
return filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
|
||||
}
|
||||
|
||||
if ($netmask < 0 || $netmask > 32) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
28
vendor/symfony/http-foundation/ParameterBag.php
vendored
28
vendor/symfony/http-foundation/ParameterBag.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* ParameterBag is a container for key/value pairs.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ParameterBag implements \IteratorAggregate, \Countable
|
||||
{
|
||||
|
@ -31,8 +29,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters = array())
|
||||
{
|
||||
|
@ -43,8 +39,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Returns the parameters.
|
||||
*
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
|
@ -55,8 +49,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Returns the parameter keys.
|
||||
*
|
||||
* @return array An array of parameter keys
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function keys()
|
||||
{
|
||||
|
@ -67,8 +59,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Replaces the current parameters by a new set.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $parameters = array())
|
||||
{
|
||||
|
@ -79,8 +69,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Adds parameters.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $parameters = array())
|
||||
{
|
||||
|
@ -97,8 +85,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @return mixed
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($path, $default = null, $deep = false)
|
||||
{
|
||||
|
@ -154,8 +140,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
*
|
||||
* @param string $key The key
|
||||
* @param mixed $value The value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $value)
|
||||
{
|
||||
|
@ -168,8 +152,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param string $key The key
|
||||
*
|
||||
* @return bool true if the parameter exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
|
@ -180,8 +162,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Removes a parameter.
|
||||
*
|
||||
* @param string $key The key
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
|
@ -196,8 +176,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return string The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAlpha($key, $default = '', $deep = false)
|
||||
{
|
||||
|
@ -212,8 +190,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return string The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAlnum($key, $default = '', $deep = false)
|
||||
{
|
||||
|
@ -228,8 +204,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return string The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDigits($key, $default = '', $deep = false)
|
||||
{
|
||||
|
@ -245,8 +219,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return int The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getInt($key, $default = 0, $deep = false)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* RedirectResponse represents an HTTP response doing a redirect.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class RedirectResponse extends Response
|
||||
{
|
||||
|
@ -32,8 +30,6 @@ class RedirectResponse extends Response
|
|||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @see http://tools.ietf.org/html/rfc2616#section-10.3
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($url, $status = 302, $headers = array())
|
||||
{
|
||||
|
|
102
vendor/symfony/http-foundation/Request.php
vendored
102
vendor/symfony/http-foundation/Request.php
vendored
|
@ -25,8 +25,6 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
|||
* * getUriForPath
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Request
|
||||
{
|
||||
|
@ -85,8 +83,6 @@ class Request
|
|||
* Custom parameters.
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $attributes;
|
||||
|
||||
|
@ -94,8 +90,6 @@ class Request
|
|||
* Request body parameters ($_POST).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $request;
|
||||
|
||||
|
@ -103,8 +97,6 @@ class Request
|
|||
* Query string parameters ($_GET).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $query;
|
||||
|
||||
|
@ -112,8 +104,6 @@ class Request
|
|||
* Server and execution environment parameters ($_SERVER).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ServerBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $server;
|
||||
|
||||
|
@ -121,8 +111,6 @@ class Request
|
|||
* Uploaded files ($_FILES).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\FileBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $files;
|
||||
|
||||
|
@ -130,8 +118,6 @@ class Request
|
|||
* Cookies ($_COOKIE).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $cookies;
|
||||
|
||||
|
@ -139,8 +125,6 @@ class Request
|
|||
* Headers (taken from the $_SERVER).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\HeaderBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $headers;
|
||||
|
||||
|
@ -231,8 +215,6 @@ class Request
|
|||
* @param array $files The FILES parameters
|
||||
* @param array $server The SERVER parameters
|
||||
* @param string|resource $content The raw body data
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
|
||||
{
|
||||
|
@ -251,8 +233,6 @@ class Request
|
|||
* @param array $files The FILES parameters
|
||||
* @param array $server The SERVER parameters
|
||||
* @param string|resource $content The raw body data
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
|
||||
{
|
||||
|
@ -281,8 +261,6 @@ class Request
|
|||
* Creates a new request with values from PHP's super globals.
|
||||
*
|
||||
* @return Request A new request
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function createFromGlobals()
|
||||
{
|
||||
|
@ -326,8 +304,6 @@ class Request
|
|||
* @param string $content The raw body data
|
||||
*
|
||||
* @return Request A Request instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null)
|
||||
{
|
||||
|
@ -446,8 +422,6 @@ class Request
|
|||
* @param array $server The SERVER parameters
|
||||
*
|
||||
* @return Request The duplicated request
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
|
||||
{
|
||||
|
@ -534,8 +508,6 @@ class Request
|
|||
*
|
||||
* It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
|
||||
* $_FILES is never overridden, see rfc1867
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function overrideGlobals()
|
||||
{
|
||||
|
@ -572,8 +544,6 @@ class Request
|
|||
* You should only list the reverse proxies that you manage directly.
|
||||
*
|
||||
* @param array $proxies A list of trusted proxies
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function setTrustedProxies(array $proxies)
|
||||
{
|
||||
|
@ -771,8 +741,6 @@ class Request
|
|||
* Gets the Session.
|
||||
*
|
||||
* @return SessionInterface|null The session
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
|
@ -784,8 +752,6 @@ class Request
|
|||
* previous requests.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasPreviousSession()
|
||||
{
|
||||
|
@ -801,8 +767,6 @@ class Request
|
|||
* is associated with a Session instance.
|
||||
*
|
||||
* @return bool true when the Request contains a Session object, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasSession()
|
||||
{
|
||||
|
@ -813,8 +777,6 @@ class Request
|
|||
* Sets the Session.
|
||||
*
|
||||
* @param SessionInterface $session The Session
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setSession(SessionInterface $session)
|
||||
{
|
||||
|
@ -886,8 +848,6 @@ class Request
|
|||
*
|
||||
* @see getClientIps()
|
||||
* @see http://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientIp()
|
||||
{
|
||||
|
@ -900,8 +860,6 @@ class Request
|
|||
* Returns current script name.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScriptName()
|
||||
{
|
||||
|
@ -921,8 +879,6 @@ class Request
|
|||
* * http://localhost/mysite/about?var=1 returns '/about'
|
||||
*
|
||||
* @return string The raw path (i.e. not urldecoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPathInfo()
|
||||
{
|
||||
|
@ -944,8 +900,6 @@ class Request
|
|||
* * http://localhost/we%20b/index.php returns '/we%20b'
|
||||
*
|
||||
* @return string The raw path (i.e. not urldecoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getBasePath()
|
||||
{
|
||||
|
@ -965,8 +919,6 @@ class Request
|
|||
* script filename (e.g. index.php) if one exists.
|
||||
*
|
||||
* @return string The raw URL (i.e. not urldecoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getBaseUrl()
|
||||
{
|
||||
|
@ -981,8 +933,6 @@ class Request
|
|||
* Gets the request's scheme.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScheme()
|
||||
{
|
||||
|
@ -1001,8 +951,6 @@ class Request
|
|||
* configure it via "setTrustedHeaderName()" with the "client-port" key.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPort()
|
||||
{
|
||||
|
@ -1076,8 +1024,6 @@ class Request
|
|||
* The port name will be appended to the host if it's non-standard.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHttpHost()
|
||||
{
|
||||
|
@ -1095,8 +1041,6 @@ class Request
|
|||
* Returns the requested URI (path and query string).
|
||||
*
|
||||
* @return string The raw URI (i.e. not URI decoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRequestUri()
|
||||
{
|
||||
|
@ -1126,8 +1070,6 @@ class Request
|
|||
* @return string A normalized URI (URL) for the Request
|
||||
*
|
||||
* @see getQueryString()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUri()
|
||||
{
|
||||
|
@ -1144,8 +1086,6 @@ class Request
|
|||
* @param string $path A path to use instead of the current one
|
||||
*
|
||||
* @return string The normalized URI for the path
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUriForPath($path)
|
||||
{
|
||||
|
@ -1214,8 +1154,6 @@ class Request
|
|||
* and have consistent escaping.
|
||||
*
|
||||
* @return string|null A normalized query string for the Request
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getQueryString()
|
||||
{
|
||||
|
@ -1227,7 +1165,7 @@ class Request
|
|||
/**
|
||||
* Checks whether the request is secure or not.
|
||||
*
|
||||
* This method can read the client port from the "X-Forwarded-Proto" header
|
||||
* This method can read the client protocol from the "X-Forwarded-Proto" header
|
||||
* when trusted proxies were set via "setTrustedProxies()".
|
||||
*
|
||||
* The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
|
||||
|
@ -1237,8 +1175,6 @@ class Request
|
|||
* the "client-proto" key.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSecure()
|
||||
{
|
||||
|
@ -1254,7 +1190,7 @@ class Request
|
|||
/**
|
||||
* Returns the host name.
|
||||
*
|
||||
* This method can read the client port from the "X-Forwarded-Host" header
|
||||
* This method can read the client host name from the "X-Forwarded-Host" header
|
||||
* when trusted proxies were set via "setTrustedProxies()".
|
||||
*
|
||||
* The "X-Forwarded-Host" header must contain the client host name.
|
||||
|
@ -1265,8 +1201,6 @@ class Request
|
|||
* @return string
|
||||
*
|
||||
* @throws \UnexpectedValueException when the host name is invalid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHost()
|
||||
{
|
||||
|
@ -1316,8 +1250,6 @@ class Request
|
|||
* Sets the request method.
|
||||
*
|
||||
* @param string $method
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setMethod($method)
|
||||
{
|
||||
|
@ -1338,8 +1270,6 @@ class Request
|
|||
*
|
||||
* @return string The request method
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @see getRealMethod()
|
||||
*/
|
||||
public function getMethod()
|
||||
|
@ -1377,8 +1307,6 @@ class Request
|
|||
* @param string $format The format
|
||||
*
|
||||
* @return string The associated mime type (null if not found)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMimeType($format)
|
||||
{
|
||||
|
@ -1395,8 +1323,6 @@ class Request
|
|||
* @param string $mimeType The associated mime type
|
||||
*
|
||||
* @return string|null The format (null if not found)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getFormat($mimeType)
|
||||
{
|
||||
|
@ -1420,8 +1346,6 @@ class Request
|
|||
*
|
||||
* @param string $format The format
|
||||
* @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFormat($format, $mimeTypes)
|
||||
{
|
||||
|
@ -1444,8 +1368,6 @@ class Request
|
|||
* @param string $default The default format
|
||||
*
|
||||
* @return string The request format
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRequestFormat($default = 'html')
|
||||
{
|
||||
|
@ -1460,8 +1382,6 @@ class Request
|
|||
* Sets the request format.
|
||||
*
|
||||
* @param string $format The request format.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setRequestFormat($format)
|
||||
{
|
||||
|
@ -1472,8 +1392,6 @@ class Request
|
|||
* Gets the format associated with the request.
|
||||
*
|
||||
* @return string|null The format (null if no content type is present)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getContentType()
|
||||
{
|
||||
|
@ -1484,8 +1402,6 @@ class Request
|
|||
* Sets the default locale.
|
||||
*
|
||||
* @param string $locale
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefaultLocale($locale)
|
||||
{
|
||||
|
@ -1510,8 +1426,6 @@ class Request
|
|||
* Sets the locale.
|
||||
*
|
||||
* @param string $locale
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setLocale($locale)
|
||||
{
|
||||
|
@ -1544,8 +1458,6 @@ class Request
|
|||
* Checks whether the method is safe or not.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isMethodSafe()
|
||||
{
|
||||
|
@ -1626,8 +1538,6 @@ class Request
|
|||
* @param array $locales An array of ordered available locales
|
||||
*
|
||||
* @return string|null The preferred locale
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPreferredLanguage(array $locales = null)
|
||||
{
|
||||
|
@ -1661,8 +1571,6 @@ class Request
|
|||
* Gets a list of languages acceptable by the client browser.
|
||||
*
|
||||
* @return array Languages ordered in the user browser preferences
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getLanguages()
|
||||
{
|
||||
|
@ -1703,8 +1611,6 @@ class Request
|
|||
* Gets a list of charsets acceptable by the client browser.
|
||||
*
|
||||
* @return array List of charsets in preferable order
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCharsets()
|
||||
{
|
||||
|
@ -1733,8 +1639,6 @@ class Request
|
|||
* Gets a list of content types acceptable by the client browser.
|
||||
*
|
||||
* @return array List of content types in preferable order
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAcceptableContentTypes()
|
||||
{
|
||||
|
@ -1754,8 +1658,6 @@ class Request
|
|||
* @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
|
||||
*
|
||||
* @return bool true if the request is an XMLHttpRequest, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isXmlHttpRequest()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* RequestMatcher compares a pre-defined set of checks against a Request instance.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class RequestMatcher implements RequestMatcherInterface
|
||||
{
|
||||
|
@ -144,8 +142,6 @@ class RequestMatcher implements RequestMatcherInterface
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function matches(Request $request)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* RequestMatcherInterface is an interface for strategies to match a Request.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface RequestMatcherInterface
|
||||
{
|
||||
|
@ -26,8 +24,6 @@ interface RequestMatcherInterface
|
|||
* @param Request $request The request to check for a match
|
||||
*
|
||||
* @return bool true if the request matches, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function matches(Request $request);
|
||||
}
|
||||
|
|
100
vendor/symfony/http-foundation/Response.php
vendored
100
vendor/symfony/http-foundation/Response.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* Response represents an HTTP response.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Response
|
||||
{
|
||||
|
@ -193,8 +191,6 @@ class Response
|
|||
* @param array $headers An array of response headers
|
||||
*
|
||||
* @throws \InvalidArgumentException When the HTTP status code is not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($content = '', $status = 200, $headers = array())
|
||||
{
|
||||
|
@ -203,7 +199,7 @@ class Response
|
|||
$this->setStatusCode($status);
|
||||
$this->setProtocolVersion('1.0');
|
||||
if (!$this->headers->has('Date')) {
|
||||
$this->setDate(new \DateTime(null, new \DateTimeZone('UTC')));
|
||||
$this->setDate(\DateTime::createFromFormat('U', time(), new \DateTimeZone('UTC')));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,8 +363,6 @@ class Response
|
|||
* Sends HTTP headers and content.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
|
@ -394,8 +388,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setContent($content)
|
||||
{
|
||||
|
@ -412,8 +404,6 @@ class Response
|
|||
* Gets the current response content.
|
||||
*
|
||||
* @return string Content
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
|
@ -426,8 +416,6 @@ class Response
|
|||
* @param string $version The HTTP protocol version
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setProtocolVersion($version)
|
||||
{
|
||||
|
@ -440,8 +428,6 @@ class Response
|
|||
* Gets the HTTP protocol version.
|
||||
*
|
||||
* @return string The HTTP protocol version
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getProtocolVersion()
|
||||
{
|
||||
|
@ -460,8 +446,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @throws \InvalidArgumentException When the HTTP status code is not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setStatusCode($code, $text = null)
|
||||
{
|
||||
|
@ -491,8 +475,6 @@ class Response
|
|||
* Retrieves the status code for the current web response.
|
||||
*
|
||||
* @return int Status code
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getStatusCode()
|
||||
{
|
||||
|
@ -505,8 +487,6 @@ class Response
|
|||
* @param string $charset Character set
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCharset($charset)
|
||||
{
|
||||
|
@ -519,8 +499,6 @@ class Response
|
|||
* Retrieves the response charset.
|
||||
*
|
||||
* @return string Character set
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCharset()
|
||||
{
|
||||
|
@ -537,8 +515,6 @@ class Response
|
|||
* validator (Last-Modified, ETag) are considered uncacheable.
|
||||
*
|
||||
* @return bool true if the response is worth caching, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isCacheable()
|
||||
{
|
||||
|
@ -561,8 +537,6 @@ class Response
|
|||
* indicator or Expires header and the calculated age is less than the freshness lifetime.
|
||||
*
|
||||
* @return bool true if the response is fresh, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isFresh()
|
||||
{
|
||||
|
@ -574,8 +548,6 @@ class Response
|
|||
* the response with the origin server using a conditional GET request.
|
||||
*
|
||||
* @return bool true if the response is validateable, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isValidateable()
|
||||
{
|
||||
|
@ -588,8 +560,6 @@ class Response
|
|||
* It makes the response ineligible for serving other clients.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPrivate()
|
||||
{
|
||||
|
@ -605,8 +575,6 @@ class Response
|
|||
* It makes the response eligible for serving other clients.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPublic()
|
||||
{
|
||||
|
@ -625,8 +593,6 @@ class Response
|
|||
* greater than the value provided by the origin.
|
||||
*
|
||||
* @return bool true if the response must be revalidated by a cache, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function mustRevalidate()
|
||||
{
|
||||
|
@ -639,8 +605,6 @@ class Response
|
|||
* @return \DateTime A \DateTime instance
|
||||
*
|
||||
* @throws \RuntimeException When the header is not parseable
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
|
@ -653,8 +617,6 @@ class Response
|
|||
* @param \DateTime $date A \DateTime instance
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDate(\DateTime $date)
|
||||
{
|
||||
|
@ -682,8 +644,6 @@ class Response
|
|||
* Marks the response stale by setting the Age header to be equal to the maximum age of the response.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function expire()
|
||||
{
|
||||
|
@ -698,8 +658,6 @@ class Response
|
|||
* Returns the value of the Expires header as a DateTime instance.
|
||||
*
|
||||
* @return \DateTime|null A DateTime instance or null if the header does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExpires()
|
||||
{
|
||||
|
@ -719,8 +677,6 @@ class Response
|
|||
* @param \DateTime|null $date A \DateTime instance or null to remove the header
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setExpires(\DateTime $date = null)
|
||||
{
|
||||
|
@ -743,8 +699,6 @@ class Response
|
|||
* back on an expires header. It returns null when no maximum age can be established.
|
||||
*
|
||||
* @return int|null Number of seconds
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMaxAge()
|
||||
{
|
||||
|
@ -769,8 +723,6 @@ class Response
|
|||
* @param int $value Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setMaxAge($value)
|
||||
{
|
||||
|
@ -787,8 +739,6 @@ class Response
|
|||
* @param int $value Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setSharedMaxAge($value)
|
||||
{
|
||||
|
@ -807,8 +757,6 @@ class Response
|
|||
* revalidating with the origin.
|
||||
*
|
||||
* @return int|null The TTL in seconds
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getTtl()
|
||||
{
|
||||
|
@ -825,8 +773,6 @@ class Response
|
|||
* @param int $seconds Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setTtl($seconds)
|
||||
{
|
||||
|
@ -843,8 +789,6 @@ class Response
|
|||
* @param int $seconds Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setClientTtl($seconds)
|
||||
{
|
||||
|
@ -859,8 +803,6 @@ class Response
|
|||
* @return \DateTime|null A DateTime instance or null if the header does not exist
|
||||
*
|
||||
* @throws \RuntimeException When the HTTP header is not parseable
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getLastModified()
|
||||
{
|
||||
|
@ -875,8 +817,6 @@ class Response
|
|||
* @param \DateTime|null $date A \DateTime instance or null to remove the header
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setLastModified(\DateTime $date = null)
|
||||
{
|
||||
|
@ -895,8 +835,6 @@ class Response
|
|||
* Returns the literal value of the ETag HTTP header.
|
||||
*
|
||||
* @return string|null The ETag HTTP header or null if it does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getEtag()
|
||||
{
|
||||
|
@ -910,8 +848,6 @@ class Response
|
|||
* @param bool $weak Whether you want a weak ETag or not
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setEtag($etag = null, $weak = false)
|
||||
{
|
||||
|
@ -938,8 +874,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCache(array $options)
|
||||
{
|
||||
|
@ -991,8 +925,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @see http://tools.ietf.org/html/rfc2616#section-10.3.5
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setNotModified()
|
||||
{
|
||||
|
@ -1011,8 +943,6 @@ class Response
|
|||
* Returns true if the response includes a Vary header.
|
||||
*
|
||||
* @return bool true if the response includes a Vary header, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasVary()
|
||||
{
|
||||
|
@ -1023,8 +953,6 @@ class Response
|
|||
* Returns an array of header names given in the Vary header.
|
||||
*
|
||||
* @return array An array of Vary names
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getVary()
|
||||
{
|
||||
|
@ -1047,8 +975,6 @@ class Response
|
|||
* @param bool $replace Whether to replace the actual value of not (true by default)
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setVary($headers, $replace = true)
|
||||
{
|
||||
|
@ -1067,8 +993,6 @@ class Response
|
|||
* @param Request $request A Request instance
|
||||
*
|
||||
* @return bool true if the Response validators match the Request, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isNotModified(Request $request)
|
||||
{
|
||||
|
@ -1100,8 +1024,6 @@ class Response
|
|||
* Is response invalid?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isInvalid()
|
||||
{
|
||||
|
@ -1112,8 +1034,6 @@ class Response
|
|||
* Is response informative?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isInformational()
|
||||
{
|
||||
|
@ -1124,8 +1044,6 @@ class Response
|
|||
* Is response successful?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSuccessful()
|
||||
{
|
||||
|
@ -1136,8 +1054,6 @@ class Response
|
|||
* Is the response a redirect?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isRedirection()
|
||||
{
|
||||
|
@ -1148,8 +1064,6 @@ class Response
|
|||
* Is there a client error?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isClientError()
|
||||
{
|
||||
|
@ -1160,8 +1074,6 @@ class Response
|
|||
* Was there a server side error?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isServerError()
|
||||
{
|
||||
|
@ -1172,8 +1084,6 @@ class Response
|
|||
* Is the response OK?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isOk()
|
||||
{
|
||||
|
@ -1184,8 +1094,6 @@ class Response
|
|||
* Is the response forbidden?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isForbidden()
|
||||
{
|
||||
|
@ -1196,8 +1104,6 @@ class Response
|
|||
* Is the response a not found error?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isNotFound()
|
||||
{
|
||||
|
@ -1210,8 +1116,6 @@ class Response
|
|||
* @param string $location
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isRedirect($location = null)
|
||||
{
|
||||
|
@ -1222,8 +1126,6 @@ class Response
|
|||
* Is the response empty?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* ResponseHeaderBag is a container for Response HTTP headers.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ResponseHeaderBag extends HeaderBag
|
||||
{
|
||||
|
@ -45,8 +43,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $headers = array())
|
||||
{
|
||||
|
@ -84,8 +80,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $headers = array())
|
||||
{
|
||||
|
@ -100,8 +94,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $values, $replace = true)
|
||||
{
|
||||
|
@ -121,8 +113,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
|
@ -156,8 +146,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* Sets a cookie.
|
||||
*
|
||||
* @param Cookie $cookie
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCookie(Cookie $cookie)
|
||||
{
|
||||
|
@ -170,8 +158,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* @param string $name
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function removeCookie($name, $path = '/', $domain = null)
|
||||
{
|
||||
|
@ -198,8 +184,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* @throws \InvalidArgumentException When the $format is invalid
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCookies($format = self::COOKIES_FLAT)
|
||||
{
|
||||
|
@ -231,8 +215,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* @param string $domain
|
||||
* @param bool $secure
|
||||
* @param bool $httpOnly
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clearCookie($name, $path = '/', $domain = null, $secure = false, $httpOnly = true)
|
||||
{
|
||||
|
|
|
@ -23,8 +23,6 @@ use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Drak <drak@zikula.org>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Session implements SessionInterface, \IteratorAggregate, \Countable
|
||||
{
|
||||
|
|
|
@ -26,8 +26,6 @@ interface SessionInterface
|
|||
* @return bool True if session started.
|
||||
*
|
||||
* @throws \RuntimeException If session fails to start.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function start();
|
||||
|
||||
|
@ -35,8 +33,6 @@ interface SessionInterface
|
|||
* Returns the session ID.
|
||||
*
|
||||
* @return string The session ID.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getId();
|
||||
|
||||
|
@ -44,8 +40,6 @@ interface SessionInterface
|
|||
* Sets the session ID.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setId($id);
|
||||
|
||||
|
@ -53,8 +47,6 @@ interface SessionInterface
|
|||
* Returns the session name.
|
||||
*
|
||||
* @return mixed The session name.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
|
@ -62,8 +54,6 @@ interface SessionInterface
|
|||
* Sets the session name.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
|
@ -79,8 +69,6 @@ interface SessionInterface
|
|||
* not a Unix timestamp.
|
||||
*
|
||||
* @return bool True if session invalidated, false if error.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function invalidate($lifetime = null);
|
||||
|
||||
|
@ -95,8 +83,6 @@ interface SessionInterface
|
|||
* not a Unix timestamp.
|
||||
*
|
||||
* @return bool True if session migrated, false if error.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function migrate($destroy = false, $lifetime = null);
|
||||
|
||||
|
@ -115,8 +101,6 @@ interface SessionInterface
|
|||
* @param string $name The attribute name
|
||||
*
|
||||
* @return bool true if the attribute is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($name);
|
||||
|
||||
|
@ -127,8 +111,6 @@ interface SessionInterface
|
|||
* @param mixed $default The default value if not found.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name, $default = null);
|
||||
|
||||
|
@ -137,8 +119,6 @@ interface SessionInterface
|
|||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($name, $value);
|
||||
|
||||
|
@ -146,8 +126,6 @@ interface SessionInterface
|
|||
* Returns attributes.
|
||||
*
|
||||
* @return array Attributes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all();
|
||||
|
||||
|
@ -164,15 +142,11 @@ interface SessionInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return mixed The removed value or null when it does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($name);
|
||||
|
||||
/**
|
||||
* Clears all attributes.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear();
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue