protected function addParsedCommand(Command $command, array $parsedCommand): void
    {
        // Set the properties
        $command->setRegex($parsedCommand['regex']);
        $command->setParams($parsedCommand['params']);
        $command->setSegments($parsedCommand['segments']);

        // Set the command in the commands list
        self::$commands[$command->getPath()] = $command;
        // Set the command in the commands paths list
        self::$paths[$command->getRegex()] = $command->getPath();

        // If the command has a name
        if (null !== $command->getName()) {
            // Set in the named commands list to find it more easily later
            self::$namedCommands[$command->getName()] = $command->getPath();
        }
    }
protected function addParsedCommand(Command $command, array $parsedCommand): void
    {
        // Set the properties
        $command->setRegex($parsedCommand['regex']);
        $command->setParams($parsedCommand['params']);
        $command->setSegments($parsedCommand['segments']);

        // Set the command in the commands list
        self::$commands[$command->getPath()] = $command;
        // Set the command in the commands paths list
        self::$paths[$command->getRegex()] = $command->getPath();

        // If the command has a name
        if (null !== $command->getName()) {
            // Set in the named commands list to find it more easily later
            self::$namedCommands[$command->getName()] = $command->getPath();
        }
    }
protected function addParsedCommand ( Command $ command , array $ parsedCommand ) : void { // Set the properties $ command -> setRegex ( $ parsedCommand [ 'regex' ] ) ; $ command -> setParams ( $ parsedCommand [ 'params' ] ) ; $ command -> setSegments ( $ parsedCommand [ 'segments' ] ) ; // Set the command in the commands list self :: $ commands [ $ command -> getPath ( ) ] = $ command ; // Set the command in the commands paths list self :: $ paths [ $ command -> getRegex ( ) ] = $ command -> getPath ( ) ; // If the command has a name if ( null !== $ command -> getName ( ) ) { // Set in the named commands list to find it more easily later self :: $ namedCommands [ $ command -> getName ( ) ] = $ command -> getPath ( ) ; } }
Add a parsed command.

@param Command $command       The command
@param array   $parsedCommand The parsed command

@return void
Add a parsed command .