[TYPO3-dev] XCLASS conflict examples

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Sun Feb 12 16:31:18 CET 2006


Hi Bernhard,

your postings confuse me a bit. I currently cant make it out. Do you just have
read an article recently about decorators so that you are fixed on that pattern
now. Or goes your thinking much farther than mine?

Bernhard Kraft schrieb:
> 
> And your getControllerObject would do something like:
> 
> foreach ($this->objs as $idx => $obj) {
>   if is_method($obj, $action) {
>     return $this->objs[$idx];
>   }
> }
> 

Here you use an array of objects that are all pre-instantiated? Only to use one
of them? I would only instantiate that one that is needed.

> And you will call every method of the class via:
> 
> $class->main('callThisMethod', $param1, $param2, ...)
> 

If you mean with $class the controller I wouldn't. I think it is rather the task
of the controller himself to controll classes and methods of model and view,
than beeing controlled. It is just "triggert" from the outside framework by it's
main().

> And if you look for such a pattern in OO books you will find that it is
> called "decorator" pattern or
> some other similar names.
> 
> The backdraw of such an construct is that it consumes time evertime it
> is executed. It is some kind
> of overhead.
> 

I didn't really understand your examples. But I've got the slight feeling, that
we are talking about very different themes.

> greets,
> Bernhard

Best regards

/el




More information about the TYPO3-dev mailing list