[TYPO3-team-core-v5] CLI support for controllers in sub-packages

Malte Jansen mail at maltejansen.de
Wed Oct 8 18:17:55 CEST 2008


Hi Karsten,

I'm just testing our new CLI and stumbled across following Exception:

Uncaught FLOW3 Exception #1222252361: CLI access needs 0, 1 or at least 
3 command parts.
thrown in file 
D:\workspace-flow3\htdocs\development\Packages\FLOW3\Classes\MVC\
CLI\F3_FLOW3_MVC_CLI_RequestBuilder.php
in line 227

IMO It's a very bad exception, which tells you nothing about you can do.

If you call a package via command line it's clear, how to call it:
php index.php flow3cgl cli

But what is the third parameter? It could be anything. Perhaps there is 
a help option, but you don't know. Why isn't the indexAction or 
helpAction called?
If you would force a helpAction, you also would force the author to 
provide a proper documentation.

Cheers,

Malte

Karsten Dambekalns schrieb:
> Hi.
> 
> I brainstormed together with Andreas in a little chat session. Here's 
> the result.
> 
>  -----
> 
> The general syntax is
>  php index.php <command> [<options>] [--] [<arguments>]
> 
> <command> is mandatory, <options> and <arguments> are optional.
> It follows what is commonly accpeted on unixoid systems for CLI programs.
> 
> 
> <command> is defined as
>  <package> [<sub1..N>] [<controller>] [<action>]
> 
> First part is always the package, then last two are always controller 
> and action. if anything is in between, that are sub packages. Example:
>  typo3cr admin setup default
> would call the "setup" controller's "default" action in the subpackage 
> "admin" of the package "TYPO3CR"
> 
> The package key may be used alone, then the default controller and 
> action are assumed.
> 
> 
> [options] are either short- or long-style
>  -a HURZ --b BLAH
> 
> 
> [arguments] can follow and will be handed over to the called controller. 
> To distinguish between [command] and [arguments] in cases where no 
> [options] are given, the seperator "--" must be used. If options are 
> used, it is optional.
> 
>  -----
> 
> What do you think?
> 
> Regards,
> Karsten


More information about the TYPO3-team-core-v5 mailing list