Alex Tech Adventures The webs best tutorials!

Welcome, Guest
Please Login or Register.    Lost Password?

Making and accesing a function from Controller Act
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Making and accesing a function from Controller Act
#705
Making and accesing a function from Controller Act 1 Year, 7 Months ago Karma: 0
Hi, I'm new in Zend Framework programming.

I don“t know where to put a function. I need to access to this function in various controller action.

My question is to know where to put this function and how to access to this function from an action controller.

Thanks

Sorry about my English.
rijolo
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#706
Re:Making and accesing a function from Controller Act 1 Year, 7 Months ago Karma: 16
Make a model for it. Say, models/common.php.
It will have
Code:


class Model_Common {
   public static function sharedFunction() {

   }
}



Now you can access it anywhere in the application Model_Common::sharedFunction();
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#707
Re: Making and accesing a function from Controller Act 1 Year, 7 Months ago Karma: 0
Your answer is that i need.

Thanks for your help.
rijolo
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: alexanderrv
You are here: Home Forum

Statistics

Members : 1401
Content : 42
Web Links : 1
Content View Hits : 191196

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 48 guests online