-2

i have a zend framework controller plugin and in the preDispatch function i have a variable that i want to access it in my front controller, how do i do that ?

ZF1

Thanks!

5
  • there is no code, hypothetically how do i send a variable from plugin to front controller $foo = 'yes'; i want to access $foo in my front controller Commented Jan 7, 2016 at 8:14
  • this might help you stackoverflow.com/questions/13171849/… Commented Jan 7, 2016 at 8:16
  • ah sorry this is for ZF1, i'll edit the question.. Commented Jan 7, 2016 at 8:17
  • SO isn't a free guide / tutorial service. Commented Jan 7, 2016 at 8:31
  • yea thanks for that Epodax, your response is the most helpful ;) Commented Jan 7, 2016 at 8:33

1 Answer 1

1

It's very simple echo Zend_Controller_Front::getInstance()->getPlugin('Plugin_Class_Name')->variable;

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Max P. this is what i was looking for! :) i've search for it everywhere, google, SO, ZF docs ... could not find anything on it ..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.