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
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)
|
||||
{
|
||||
|
|
Reference in a new issue