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

Karsten Dambekalns karsten at typo3.org
Fri Sep 26 12:16:40 CEST 2008


Hi.

Tim Eilers wrote:
>> I'd expect this:
>>  php index.php shell file ls -G -- *.jpg
>> (I admit the -- is ugly here, but we don't know if -G accepts a value)
> 
> That exactly is the point which i do not understand. How does FLOW3 know
> that "*.jpg" belongs to "subject"?

Everything after -- is arguments.

> Is that any default routing?

In a way, yes. No routing in CLI, but that's how $_SERVER['argv'] is 
parsed, so to speak.

> What happens when i have two different arguments which both could have
> files as value?

You mean different options (arguments is just everything "not an option")?

> With your below examples it would be --foo *.jpg --bar *.png
> or --foo one.jpg --foo2 two.jpg --bar one.png --bar2 two.png

Ok, tricky. That would require to parse everything after -foo as values 
for "foo" - maybe that even works already, I'd have to check. In other 
words, something after the option is a value for it, unless it starts 
with a dash.

> But what would it be with your above example?
> ...-G -- *.jpg *.png

No, that would just add all JPGs and PNGs to the list of arguments.

Regards,
Karsten


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