Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • ArgvInput
  • ArrayInput
  • Input
  • InputArgument
  • InputDefinition
  • InputOption
  • StringInput

Interfaces

  • InputAwareInterface
  • InputInterface
  • Overview
  • Namespace
  • Class

Class ArrayInput

ArrayInput represents an input provided as an array.

Usage: $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar'));

Symfony\Component\Console\Input\Input implements Symfony\Component\Console\Input\InputInterface
Extended by Symfony\Component\Console\Input\ArrayInput
Namespace: Symfony\Component\Console\Input
Author: Fabien Potencier fabien@symfony.com
Located at Input/ArrayInput.php
Methods summary
public
# __construct( array $parameters, Symfony\Component\Console\Input\InputDefinition $definition = null )

Constructor.

Constructor.

Parameters

$parameters
An array of parameters
$definition
A InputDefinition instance

Overrides

Symfony\Component\Console\Input\Input::__construct()
public string
# getFirstArgument( )

Returns the first argument from the raw parameters (not parsed).

Returns the first argument from the raw parameters (not parsed).

Returns

string
The value of the first argument or null otherwise
public boolean
# hasParameterOption( string|array $values )

Returns true if the raw parameters (not parsed) contain a value.

Returns true if the raw parameters (not parsed) contain a value.

Parameters

$values
The values to look for in the raw parameters (can be an array)

Returns

boolean
true if the value is contained in the raw parameters
public mixed
# getParameterOption( string|array $values, mixed $default = false )

Returns the value of a raw option (not parsed).

Returns the value of a raw option (not parsed).

Parameters

$values
The value(s) to look for in the raw parameters (can be an array)
$default
The default value to return if no result is found

Returns

mixed
The option value
public string
# __toString( )

Returns a stringified representation of the args passed to the command.

Returns a stringified representation of the args passed to the command.

Returns

string
protected
# parse( )

Processes command line arguments.

Processes command line arguments.

Methods inherited from Symfony\Component\Console\Input\Input
bind(), escapeToken(), getArgument(), getArguments(), getOption(), getOptions(), hasArgument(), hasOption(), isInteractive(), setArgument(), setInteractive(), setOption(), validate()
Properties inherited from Symfony\Component\Console\Input\Input
$arguments, $definition, $interactive, $options
Peridot API documentation generated by ApiGen