Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Console\Exception; Chris@0: Chris@0: /** Chris@0: * Represents an incorrect command name typed in the console. Chris@0: * Chris@0: * @author Jérôme Tamarelle Chris@0: */ Chris@0: class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface Chris@0: { Chris@0: private $alternatives; Chris@0: Chris@0: /** Chris@14: * @param string $message Exception message to throw Chris@14: * @param array $alternatives List of similar defined names Chris@14: * @param int $code Exception code Chris@14: * @param \Exception $previous Previous exception used for the exception chaining Chris@0: */ Chris@17: public function __construct($message, array $alternatives = [], $code = 0, \Exception $previous = null) Chris@0: { Chris@0: parent::__construct($message, $code, $previous); Chris@0: Chris@0: $this->alternatives = $alternatives; Chris@0: } Chris@0: Chris@0: /** Chris@0: * @return array A list of similar defined names Chris@0: */ Chris@0: public function getAlternatives() Chris@0: { Chris@0: return $this->alternatives; Chris@0: } Chris@0: }