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

main
François Pluchino 13 years ago
parent 2f6a3ce8b9
commit b147210ff4

@ -46,6 +46,38 @@ class ConsoleIO implements IOInterface
$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}
*/

@ -18,7 +18,39 @@ namespace Composer\IO;
* @author François Pluchino <francois.pluchino@opendisplay.com>
*/
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?
*

Loading…
Cancel
Save