View Single Post
  #1 (permalink)  
Old 06-11-2008, 01:41 PM
waldo_cosman waldo_cosman is offline
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default Getting object in all my views

Hello,

I'm just new using the Zend Framework and i'm testing some stuff. At the moment i'm bussy in my bootstrap file where I declare some of my objects, for example a log-object, translate-object, ...

Now I just want to call those object in my *.phtml files. 've read some stuff about the Zend Registry Class and I can use it, so what I do now in my phtml file is (translate object is known in my bootstrap file):
PHP Code:
$translate Zend_Registry::get('translate'); 
But is it possible to call my $translate object straightaway, without using the extra line (zend_registry::get...)? I've read about the Zend_View class, but therefore you have to put the $translate variable to every view, or am I wrong?

Thx
Reply With Quote