I did some comparisons on execution times chaining action and component
vs. only executing action and it's own template.
The difference was around 70ms, when the action "solo" takes around
500ms to execute chaining the component to share the code takes around
560-570
Do you think there is any w
Am 19.04.2007 um 17:41 schrieb Haris Zukanović:
> Thank you very much..
> It works like a charm :)
>
great :)
I have just released a small wiki article (sorry for language mistakes):
http://trac.symfony-project.com/trac/wiki/
HowToHandleSameCodeInAComponentAndAnAction
because this problem
Thank you very much..
It works like a charm :)
Frank Stelzer wrote:
> You would not break rules at all.
>
>
> One example:
>
>
> class fooActions {
> function exampleBar(){
> // removed action code here
> // the common actions are done in the component, which is included in
> the template
> }
You would not break rules at all.
One example:
class fooActions {
function exampleBar(){
// removed action code here
// the common actions are done in the component, which is
included
in the template
}
}
your template barSuccess.php:
---
How can I call it?
include_component?
That is a helper function.. I would be braking rules right?
Frank Stelzer wrote:
> You can call the component in your action. So you would have the
> common operations only in the component.
>
>
>
> Am 19.04.2007 um 15:14 schrieb Haris Zukanović:
>
>
>>
You can call the component in your action. So you would have the
common operations only in the component.
Am 19.04.2007 um 15:14 schrieb Haris Zukanović:
> Hi,
>
> I have a component and an action that do exactly the same...
>
> I need the component to include it in my layout.php and I need