ok

fixed by this :

$em->attach(MvcEvent::EVENT_ROUTE, function($e) {
            $routeMatch = $e->getRouteMatch();
            $viewModel = $e->getViewModel();
            $viewModel->action = $routeMatch->getParam('action');


        });

thankkss

On Mon, Aug 6, 2012 at 1:09 PM, Marco Pivetta <ocram...@gmail.com> wrote:

> Well, that is simply a closure, a callback.
> You could even use array($this, 'someCallbackMethod') instead... But you
> cannot really access the route match before that event, so the operation
> has to happen within a callback, be it a closure or any valid PHP callback.
>
>
> Marco Pivetta
>
> http://twitter.com/Ocramius
>
> http://marco-pivetta.com
>
>
>
> On 6 August 2012 10:37, sina miandashti <miandas...@gmail.com> wrote:
>
>> thanks guys
>>
>> but how can i access that $action outside that function($e)
>>
>> i want to assign it to viewmodel
>>
>>
>> --
>> ________________
>> Sincerely
>> Sina Miandashti
>> www.InTheMix.ir  Admin
>> www.teamatec.com Head PHP Developer
>>
>
>

Reply via email to