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

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 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
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
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
# 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
A InputDefinition instance
public
# validate( )

Validates the input.

Validates the input.

Throws

Symfony\Component\Console\Exception\RuntimeException
When not enough arguments are given
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 )

Returns the argument value for a given argument name.

Returns the argument value for a given argument name.

Parameters

$name
The argument name

Returns

mixed
The argument value

Throws

Symfony\Component\Console\Exception\InvalidArgumentException
When argument given doesn't exist
public
# setArgument( string $name, string $value )

Sets an argument value by name.

Sets an argument value by name.

Parameters

$name
The argument name
$value
The argument value

Throws

Symfony\Component\Console\Exception\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
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 )

Returns the option value for a given option name.

Returns the option value for a given option name.

Parameters

$name
The option name

Returns

mixed
The option value

Throws

Symfony\Component\Console\Exception\InvalidArgumentException
When option given doesn't exist
public
# setOption( string $name, string|boolean $value )

Sets an option value by name.

Sets an option value by name.

Parameters

$name
The option name
$value
The option value

Throws

Symfony\Component\Console\Exception\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
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
If the input should be interactive
Peridot API documentation generated by ApiGen