1
0
Fork 0

Adding access to input's options and arguments used by the triggers

pull/257/head
François Pluchino 2012-01-24 18:10:22 +01:00
parent 2f6a3ce8b9
commit b147210ff4
2 changed files with 65 additions and 1 deletions

View File

@ -46,6 +46,38 @@ class ConsoleIO implements IOInterface
$this->helperSet = $helperSet; $this->helperSet = $helperSet;
} }
/**
* {@inheritDoc}
*/
public function getArguments()
{
return $this->input->getArguments();
}
/**
* {@inheritDoc}
*/
public function getArgument($name)
{
return $this->input->getArgument($name);
}
/**
* {@inheritDoc}
*/
public function getOptions()
{
return $this->input->getOptions();
}
/**
* {@inheritDoc}
*/
public function getOption($name)
{
return $this->input->getOption($name);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */

View File

@ -19,6 +19,38 @@ namespace Composer\IO;
*/ */
interface IOInterface interface IOInterface
{ {
/**
* Returns all the given arguments merged with the default values.
*
* @return array
*/
function getArguments();
/**
* Gets argument by name.
*
* @param string $name The name of the argument
*
* @return mixed
*/
function getArgument($name);
/**
* Returns all the given options merged with the default values.
*
* @return array
*/
function getOptions();
/**
* Gets an option by name.
*
* @param string $name The name of the option
*
* @return mixed
*/
function getOption($name);
/** /**
* Is this input means interactive? * Is this input means interactive?
* *