public function getCommandsByIdentifier(string $commandIdentifier): array
    {
        $availableCommands = $this->getAvailableCommands();
        $matchedCommands = [];
        foreach ($availableCommands as $command) {
            if ($this->commandMatchesIdentifier($command, $commandIdentifier)) {
                $matchedCommands[] = $command;
            }
        }

        return $matchedCommands;
    }
public function getCommandsByIdentifier(string $commandIdentifier): array
    {
        $availableCommands = $this->getAvailableCommands();
        $matchedCommands = [];
        foreach ($availableCommands as $command) {
            if ($this->commandMatchesIdentifier($command, $commandIdentifier)) {
                $matchedCommands[] = $command;
            }
        }

        return $matchedCommands;
    }
public function getCommandsByIdentifier ( string $ commandIdentifier ) : array { $ availableCommands = $ this -> getAvailableCommands ( ) ; $ matchedCommands = [ ] ; foreach ( $ availableCommands as $ command ) { if ( $ this -> commandMatchesIdentifier ( $ command , $ commandIdentifier ) ) { $ matchedCommands [ ] = $ command ; } } return $ matchedCommands ; }
Returns an array of Commands that matches the given identifier.
If no Command could be found, an empty array is returned

@param string $commandIdentifier command identifier in the format foo:bar:baz
@return array<Command>
@api
Returns an array of Commands that matches the given identifier . If no Command could be found an empty array is returned