Model class is not found in zend framework project (quickstart) ,please help

Posted by Dumindu on Stack Overflow See other posts from Stack Overflow or by Dumindu
Published on 2010-03-19T08:35:02Z Indexed on 2010/03/19 8:41 UTC
Read the original article Hit count: 203

Filed under:

The things I did is

  1. zf create project demo1 in command prompt
  2. add the lines to application.ini
    • appnamespace = "Application"
    • resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
  3. add a layout with header and footer using partial() (They are perfectly worked)
  4. create Data.php in models directory and add this simple class

    <?php class Application_Model_Data{   }//Application for appnamespace 
    
  5. then I tried to load this class(by creating instance)from index controller index action

    $data = new Application_Model_Data();

  6. but when I test it even in this level it gives an error

    Fatal error: Class 'Application_Model_Data' not found in C:\Zend\...\IndexController.php

Question

  1. Do I want to add a autoloader to load models in the application( I'm not used modules)
  2. if not what was I missed to add

please help I'm stuck in the beginning,Thank you

© Stack Overflow or respective owner

Related posts about zend-framework