Mark Steudel-3 wrote:
> 
> Hi All,
> 
>  
> 
> I'm just using components of the Zend Framework in my application, and one
> of those is Zend_Form which in my header file I'm loading like:
> 
>  
> 
> Zend_Loader::loadClass('Zend_Form');
> 
>  
> 
> But when I go to instantiate a text element like:
> 
>  
> 
> $usrename = new Zend_Form_Element_Text( 'username');
> 
>  
> 
> I got the Class 'Zend_Form_Element_Text' not found error. So I tried
> loading
> the Zend_Form_Element_Text class like so:
> 
>  
> 
> Zend_Loader::loadClass('Zend_Form_Element_Text');
> 
>  
> 
> My question is do I really need to load each element, I'm figuring there
> must be a cleaner way to do load each form element class.
> 
>  
> 
> Thanks, Mark
> 
> 
> 

i would write in the index.php file top of the code
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

Then you dont need to load each class seperatly
-- 
View this message in context: 
http://www.nabble.com/Best-way-to-load-Zend_Form_Element_*-classes-tp16571099p16571332.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to