Feature #28172

Provide CommandManager

Added by Bastian Waidelich over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
MVC
Start date:
2011-07-13
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Currently the CLI Command resolving is mostly handled by the CLI Request Builder.
But it still has some glitches (see https://review.typo3.org/#change,3298).
Besides there is some duplicated code, as we need to find available commands in various places.

My suggestion is to add a central service that knows all commands (and in which controller they reside) and can also match an input to existing commands.

The API could be:

class CommandManager {

    /**
     * @return array<Command>
     */
    public function getAvailableCommands();

    /**
     * @string $commandIdentifier foo.bar:baz:foos
     * @return Command
     * @throws CommandNotFoundException if no matching command is available
     * @throws AmbiguousCommandIdentifierException if more than one Command matches the identifier (the exception contains the matched commands)
     */
    public function getCommandByIdentifier($commandIdentifier);

}


Related issues

Related to TYPO3.Flow - Bug #28294: Command is not run in compile time if command identifier is abbreviatedResolvedRobert Lemke2011-07-18

Actions
#1

Updated by Bastian Waidelich over 9 years ago

  • Subject changed from Provide CommandService to Provide CommandManager
#2

Updated by Mr. Hudson over 9 years ago

  • Status changed from New to Under Review

Patch set 1 of change I1f443869a6b93b551e8ffd5bc3957a6935310869 has been pushed to the review server.
It is available at http://review.typo3.org/3311

#3

Updated by Mr. Hudson over 9 years ago

Patch set 2 of change I1f443869a6b93b551e8ffd5bc3957a6935310869 has been pushed to the review server.
It is available at http://review.typo3.org/3311

#4

Updated by Mr. Hudson over 9 years ago

Patch set 3 of change I1f443869a6b93b551e8ffd5bc3957a6935310869 has been pushed to the review server.
It is available at http://review.typo3.org/3311

#5

Updated by Bastian Waidelich over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF