[TYPO3-50-general] Refactoring-help needed

Christoph Blömer chbloemer at gmx.net
Fri Dec 5 18:52:01 CET 2008


Bastian Waidelich schrieb:
> Hi all of you infamous PHP developer ;)
>
> While implementing "optional Route Parts" 
> (http://forge.typo3.org/issues/show/1790) to the FLOW3 Routing mechanism 
> my brain is starting to curl and I'm a bit stuck.
> Well, the code works but it's quite chaotic now and basically unreadable.
>
> Anyone fancy refactoring this 
> http://scratchpad.cmlenz.net/8b37ec873f040ca7e0cd175558aa4f9e/ ?
>
> Any help is welcome!
>
> Have a nice weekend,
> Bastian
>   
Input: $this->uriPatternSegments, right?
Output: Boolean or $matchResults?
I think the Booleans should be replaced with Exceptions. So you have 
only a $matchResult or it throws an exception.

Can you give me an example how the input and output looks like?

This confuses me a little bit.

'typo3/service/v1/[@controller](.[@format])'

The [ ] brackets are mostly used for an optional argument. In BNF or so.
I think it should look more like:

'typo3/service/v1/@controller[. at format])



Greetings
Christoph


More information about the TYPO3-project-5_0-general mailing list