/** * Creates a new exception object. * * @param ezcConsoleOption $excludingOption The excluding option. * @param ezcConsoleOption $excludedOption The excluded option. * @param mixed $valueRange The excluded value range. * @return void */ public function __construct(ezcConsoleOption $excludingOption, ezcConsoleOption $excludedOption, $valueRange = null) { $message = "The option '{$excludingOption->long}' excludes the option '{$excludedOption->long}'"; if ($valueRange !== null) { $message .= " to have a value in '{$valueRange}'"; } $message .= " but this one was submitted."; parent::__construct($message); }
/** * Creates a new exception object. * * @param ezcConsoleOption $dependingOption The depending option. * @param ezcConsoleOption $dependantOption The option depended on. * @param mixed $valueRange The dependend value range. * @return void */ public function __construct(ezcConsoleOption $dependingOption, ezcConsoleOption $dependantOption, $valueRange = null) { $message = "The option '{$dependingOption->long}' depends on the option '{$dependantOption->long}' "; if ($valueRange !== null) { $message .= " to have a value in '{$valueRange}' "; } $message .= "but this one was not submitted."; parent::__construct($message); }
/** * Creates a new exception object. * * @param ezcConsoleOption $option The option affected by the violation. * @param mixed $value The violating value The violating value.. * @return void */ public function __construct(ezcConsoleOption $option, $value) { $typeName = 'unknown'; switch ($option->type) { case ezcConsoleInput::TYPE_NONE: $typeName = 'none'; break; case ezcConsoleInput::TYPE_INT: $typeName = 'int'; break; } parent::__construct("The option '{$option->long}' expects a value of type '{$typeName}', but received the value '{$value}'."); }
/** * Creates a new exception object. * * @param string $name Name of the already existing option. * @return void */ public function __construct($name) { parent::__construct("The referenced parameter '{$name}' is not registered."); }
/** * Creates a new exception object. * * @param ezcConsoleOption $option The violating option. * @return void */ public function __construct(ezcConsoleOption $option) { parent::__construct("Option with long name '{$option->long}' is mandatory but was not submitted."); }
/** * Creates a new exception object. * * @param ezcConsoleOption $option The violating option. * @return void */ public function __construct(ezcConsoleOption $option) { parent::__construct("The option with long name '{$option->long}' excludes the usage of arguments, but arguments have been submitted."); }
/** * Creates a new exception object. * * @param ezcConsoleOption $option The affected option. * @return void */ public function __construct(ezcConsoleOption $option) { parent::__construct("The option '{$option->long}' expects a single value, but multiple were submitted."); }
/** * Creates a new exception object. * * @param ezcConsoleOption $option The option the value is missing for The option the value is missing for.. * @return void */ public function __construct(ezcConsoleOption $option) { parent::__construct("The option '{$option->long}' expects a value, but none was submitted."); }