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

Interface InputInterface

InputInterface is the interface implemented by all input classes.

Direct known implementers

Symfony\Component\Console\Input\Input

Indirect known implementers

Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Input\ArrayInput, Symfony\Component\Console\Input\StringInput
Namespace: Symfony\Component\Console\Input
Author: Fabien Potencier <fabien@symfony.com>
Located at console/Symfony/Component/Console/Input/InputInterface.php
Methods summary
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.

This method is to be used to introspect the input parameters before they have been validated. It must be used carefully.

Parameters

$values
string|array
$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).

This method is to be used to introspect the input parameters before they have been validated. It must be used carefully.

Parameters

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

Returns

mixed
The option value
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
public
# validate( )

Validates if arguments given are correct.

Validates if arguments given are correct.

Throws an exception when not enough arguments are given.

Throws

RuntimeException
public array
# getArguments( )

Returns all the given arguments merged with the default values.

Returns all the given arguments merged with the default values.

Returns

array
public mixed
# getArgument( string $name )

Gets argument by name.

Gets argument by name.

Parameters

$name
string
$name The name of the argument

Returns

mixed
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
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
public array
# getOptions( )

Returns all the given options merged with the default values.

Returns all the given options merged with the default values.

Returns

array
public mixed
# getOption( string $name )

Gets an option by name.

Gets an option by name.

Parameters

$name
string
$name The name of the option

Returns

mixed
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
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
public Boolean
# isInteractive( )

Is this input means interactive?

Is this input means interactive?

Returns

Boolean
public
# setInteractive( Boolean $interactive )

Sets the input interactivity.

Sets the input interactivity.

Parameters

$interactive
Boolean
$interactive If the input should be interactive
php-coveralls API documentation generated by ApiGen 2.8.0