public function __call($name, $arguments)
{
if (empty(self::$methods[$name])) {
throw new \Exception(sprintf('Unknown function, %s, called', $name));
}
// use the fully quantified name, e.g. "option" when "o"
$name = self::$methods[$name];
// set the option we'll be acting on
if (empty($this->current_option) && $name !== 'option' && $name !== 'flag' && $name !== 'argument') {
throw new \Exception(sprintf('Invalid Option Chain: Attempting to call %s before an "option" declaration', $name));
}
array_unshift($arguments, $this->current_option);
$option = call_user_func_array(array($this, "_{$name}"), $arguments);
return $this;
}