CoreFiles by mySites.guru
CommandNotFoundException.php43 lines, 1,229 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
bb4be145173c76f9801d36cb33f7133a
sha1
8f2108436e8ccb6983c038f2b8494a0dd5d6fb1a
sha256
315d06ac5f83418dfd8097b18b39be029f5c5026450a33548076ea68697816c1
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Exception;

/**
 * Represents an incorrect command name typed in the console.
 *
 * @author Jérôme Tamarelle <[email protected]>
 */
class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface
{
    private array $alternatives;

    /**
     * @param string          $message      Exception message to throw
     * @param string[]        $alternatives List of similar defined names
     * @param int             $code         Exception code
     * @param \Throwable|null $previous     Previous exception used for the exception chaining
     */
    public function __construct(string $message, array $alternatives = [], int $code = 0, ?\Throwable $previous = null)
    {
        parent::__construct($message, $code, $previous);

        $this->alternatives = $alternatives;
    }

    /**
     * @return string[]
     */
    public function getAlternatives(): array
    {
        return $this->alternatives;
    }
}

The same content is in 86 releases, Joomla 5.1.0-beta1 to 6.0.0-alpha3. See them all, or every version of this file.