Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

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

Interfaces

  • InputInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Input

Input is the base class for all concrete Input classes.

Three concrete classes are provided by default:
* ArgvInput: The input comes from the CLI arguments (argv) * StringInput: The input is provided as a string * ArrayInput: The input is provided as an array

Symfony\Component\Console\Input\Input implements Symfony\Component\Console\Input\InputInterface

Direct known subclasses

Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Input\ArrayInput

Indirect known subclasses

Symfony\Component\Console\Input\StringInput
Abstract
Namespace: Symfony\Component\Console\Input
Author: Fabien Potencier <fabien@symfony.com>
Located at console/Symfony/Component/Console/Input/Input.php
Methods summary
public
# __construct( Symfony\Component\Console\Input\InputDefinition $definition = null )

Constructor.

Constructor.

Parameters

$definition
Symfony\Component\Console\Input\InputDefinition
$definition A InputDefinition instance
public
# bind( Symfony\Component\Console\Input\InputDefinition $definition )

Binds the current Input instance with the given arguments and options.

Binds the current Input instance with the given arguments and options.

Parameters

$definition
Symfony\Component\Console\Input\InputDefinition
$definition A InputDefinition instance

Implementation of

Symfony\Component\Console\Input\InputInterface::bind()
abstract protected
# parse( )

Processes command line arguments.

Processes command line arguments.

public
# validate( )

Validates the input.

Validates the input.

Throws

RuntimeException
When not enough arguments are given

Implementation of

Symfony\Component\Console\Input\InputInterface::validate()
public Boolean
# isInteractive( )

Checks if the input is interactive.

Checks if the input is interactive.

Returns

Boolean
Returns true if the input is interactive

Implementation of

Symfony\Component\Console\Input\InputInterface::isInteractive()
public
# setInteractive( Boolean $interactive )

Sets the input interactivity.

Sets the input interactivity.

Parameters

$interactive
Boolean
$interactive If the input should be interactive

Implementation of

Symfony\Component\Console\Input\InputInterface::setInteractive()
public array
# getArguments( )

Returns the argument values.

Returns the argument values.

Returns

array
An array of argument values

Implementation of

Symfony\Component\Console\Input\InputInterface::getArguments()
public mixed
# getArgument( string $name )

Returns the argument value for a given argument name.

Returns the argument value for a given argument name.

Parameters

$name
string
$name The argument name

Returns

mixed
The argument value

Throws

InvalidArgumentException
When argument given doesn't exist

Implementation of

Symfony\Component\Console\Input\InputInterface::getArgument()
public
# setArgument( string $name, string $value )

Sets an argument value by name.

Sets an argument value by name.

Parameters

$name
string
$name The argument name
$value
string
$value The argument value

Throws

InvalidArgumentException
When argument given doesn't exist

Implementation of

Symfony\Component\Console\Input\InputInterface::setArgument()
public Boolean
# hasArgument( string|integer $name )

Returns true if an InputArgument object exists by name or position.

Returns true if an InputArgument object exists by name or position.

Parameters

$name
string|integer
$name The InputArgument name or position

Returns

Boolean
true if the InputArgument object exists, false otherwise

Implementation of

Symfony\Component\Console\Input\InputInterface::hasArgument()
public array
# getOptions( )

Returns the options values.

Returns the options values.

Returns

array
An array of option values

Implementation of

Symfony\Component\Console\Input\InputInterface::getOptions()
public mixed
# getOption( string $name )

Returns the option value for a given option name.

Returns the option value for a given option name.

Parameters

$name
string
$name The option name

Returns

mixed
The option value

Throws

InvalidArgumentException
When option given doesn't exist

Implementation of

Symfony\Component\Console\Input\InputInterface::getOption()
public
# setOption( string $name, string $value )

Sets an option value by name.

Sets an option value by name.

Parameters

$name
string
$name The option name
$value
string
$value The option value

Throws

InvalidArgumentException
When option given doesn't exist

Implementation of

Symfony\Component\Console\Input\InputInterface::setOption()
public Boolean
# hasOption( string $name )

Returns true if an InputOption object exists by name.

Returns true if an InputOption object exists by name.

Parameters

$name
string
$name The InputOption name

Returns

Boolean
true if the InputOption object exists, false otherwise

Implementation of

Symfony\Component\Console\Input\InputInterface::hasOption()
Methods inherited from Symfony\Component\Console\Input\InputInterface
getFirstArgument(), getParameterOption(), hasParameterOption()
Properties summary
protected mixed $definition
#
protected mixed $options
#
protected mixed $arguments
#
protected boolean $interactive true
#
php-coveralls API documentation generated by ApiGen 2.8.0