Hi,

today I commited the recent changed of my controller stuff:
http://trac.symfony-project.com/trac/changeset/4734

Key changes compared to trunk are:

- Moved sfFrontWebController->dispatch() to sfWebController and
separated the actual dispatching into an own execute() method to make
it possible for other web controllers to use the dispatch()
implementation.

- Moved sfActionStack to a new sfControllerStack. Entries of this new
stack can hold arbitrary data by get() and set() methods and implement
the ArrayAccess interface.

- Added a new sfController->switchTo() method to switch to another
action before it is actually executed. This can be used to change the
action in a filter.

- Refactored forward() into makeAction() methods and separated the
filter execution from it. Execution of an action now actually happens
in the execution filter.


To summarize: The controller is now more flexible for more complex
action execution. It is already possible to switch to another action
by an own filter using sfController->switchTo() and I will start
working on a "multi action execution filter" now.

Regards,
Matthias


Fabien POTENCIER schrieb:
> Matthias,
>
> Some random thoughts and questions about your recent changes to the
> Controller (http://trac.symfony-project.com/trac/changeset/4650):
>
> - I'm not very comfortable with the usage of a sfParameterHolder object
> for the action stack. I think you can migrate all this code into a
> sfActionStack object (or whatever you want to call it). It will cleanup
> the Controller and separate the controller logic and the stack logic.
>
> - If I understand correctly, you moved the dispatch() method from the
> sfFrontWebController to the sfWebController. Why? The dispatch notion
> belongs to the front controller design pattern.
>
> - The new "scope" filters.yml parameter is yet to be used?
>
> - Why do you use a $throwExceptions argument in the makeAction() method?
> Why don't you throw exceptions and catch them when needed in the
> sfExcutionFilter. The interface will be much cleaner, a makeAction()
> method always returns an action instance.
>
> By the way, try to keep your commits atomics as it makes reviewing the
> code easier.
>
> Fabien


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to