I'm building a site that will work across multiple domains using one
code base, to keep things flexible I'd like to be able to create site
specific controllers that extends the default ones. From reading the
documentation it appears using the onCoreController listener is the
best way to do this.
The problem I'm having is how to set the replacement controller once I
know what should be used, this is my code:

public function onCoreController(FilterControllerEvent $event)
{
        $controllerInfo = $event->getController();
        $controllerName = $controllerInfo[0];
        $actionName = $controllerInfo[1];
        if(method_exists($controllerName, "checkForReplacementController") &&
$replacementAction = $controllerName-
>checkForReplacementController($actionName)){

//Not sure what to do here
}

I'm checking for the existence of a method called
checkForReplacementController that will work out which controller
should be used, I know I'm supposed to call $event->setController but
I'm not sure how to get an instance of the controller to do this.

Can anyone help?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to