spaceage wrote:
>
> My include path is (1) the library dir where ZF is located, (2) the
> /application/models dir and (3) "."
>
You don't need /application/models in the path. Remove the line that sets
it. It's just adding an extra path to slow down the system a bit.
> I'm a little unclear when you say "once it knows path to application it
> will figure out path to models": wouldn't this also be the case if instead
> of using /application as an include_path, I would use /application/models
> and get same result for classes in the models dir?
>
In /public/index.php, this line defines APPLICATION_PATH:
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) .
'/../application'));
that's all it needs to know.
Right now this is working:
>
> require_once '../application/models/LoginForm.php';
>
Remove the require line
$login = new LoginForm();
change to $login = new Model_LoginForm
and make sure in /application/models/LoginForm.php' the class is defined
thusly:
class Model_LoginForm
and hopefully you should be all set.
--
View this message in context:
http://www.nabble.com/Zend_Application-and-autoloading-tp23987637p23990600.html
Sent from the Zend Framework mailing list archive at Nabble.com.