I think you need to set the namespace to 'Default', not ''?

Regards,

Kendall Bennett, CEO
A Main Hobbies
424 Otterson Drive, Suite 160
Chico, CA 95928
1-800-705-2215 (Toll-Free)
1-530-894-0797 (Int'l & Local)
1-530-894-9049 (Fax)
http://www.amainhobbies.com


________________________________
From: Mike Wright <[email protected]>
Date: Sun, 3 May 2009 14:42:53 -0700
To: Zend Framework General <[email protected]>
Subject: [fw-general] need help w/ autoloader in 1.8

Hi all,

I have been following devzone article by MWO'P, the reference guide, and
thread by JDeBord subject:

"Zend_Loader_Autoloader match Zend_Loader functionality"

...and still failing to convert old style Loader to new Autoloader.


My file layout is the recommended one and includes this tree:

APPLICATION_PATH
   `-- models
       `-- Sessions.php


Sessions.php contains:
   class Model_Sessions.php
   { static function init() {} }


excerpt from bootstrap.php:

// APPLICATION_PATH
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/..'));

// AUTOLOADER
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
$loader = new Zend_Application_Module_Autoloader(array(
     'basePath'  => APPLICATION_PATH,
     'namespace' => '', // no resource namespace
));

// SESSIONS
Model_Sessions::init();


on execution this error is returned:

"Fatal error: Class 'Model_Sessions' not found in .../bootstrap.php on
line 21".


Having struggled with this for many, many  I think it's time to seek
help from the masters.  Any ideas on what is wrong with the above?


Thanks for any help,
Mike Wright

Reply via email to