zend-autoloader

Can Doctrine generated models have a prefix?

Is there an option in Doctrine that would specify a prefix for any classes generated by doctrine? I'm having trouble with the new Zend autoloader and autoloading models, the doctrine autoloader doesn't help either. Ideally I'd have the doctrine generated classes prefixed with 'Model_', as in 'Model_User'. I ran into this issue while t...

How to upgrade Zend_Loader from 1.7 to 1.8?

I have been using this, and it works fine in 1.7, but not in 1.8. require_once('Zend/Loader.php'); Zend_Loader::registerAutoload(); It says it's deprecated, and that I should use Zend_Loader_Autoloader instead, but I can't seem to get it to work. Any suggestions? ...

Zend Framework 1.9: How to use Autoloading without MVC

how do i auto load zend framework classes when i am not using the MVC framework? ...

Use of any class / namespace with ZendFramwork

EDIT: Additional questions: do I have to add the '.php' at the end of new NAMSPACE_CLASSNAME Can I access any Zend package inside my controller / model, for example: /* Controller // Methods // inside a */ method $client = new Zend_Http_Client('http://example.org', array( 'maxredirect...

new Zend_Loader_Autoloader not finding files

I just upgraded from ZF 1.7 to ZF 1.9, and almost everything works fine... except for Autoloader. Old: require_once('Zend/Loader.php'); Zend_Loader::registerAutoload(); New: require_once 'Zend/Loader/Autoloader.php'; $loader = Zend_Loader_Autoloader::getInstance(); $loader->registerNamespace('MySiteName_'); $loader->setFal...

Zend Framework: Autoloading a Class Library

I've got a class library in defined here .../projectname/library/Me/Myclass.php defined as follows: <?php class Me_Myclass{ } ?> I've got the following bootstrap: <?php /** * Application bootstrap * * @uses Zend_Application_Bootstrap_Bootstrap */ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { /** * ...

Proper error handling in a custom Zend_Autoloader?

I'm building a custom autoloader based on Zend Framework's autoloading (related question here). The basic approach, taken from that question, is class My_Autoloader implements Zend_Loader_Autoloader_Interface { public function autoload($class) { // add your logic to find the required classes in here } } and then...

Zend Framework - Extend Module Controller

I have the following directory structure: modules/ api/ controllers/ ApiController.php InventoryController.php OtherController.php The init() method is common amongst multiple Controllers so I want to refactor that into a parent Controller class such as: class Api_ApiController extends Zend_Controller_Action {...

Zend Framework: Setup Autoloader to find namespace from specific directory

how do i setup the autoloader to find all classes in the namespace 'Entities' and 'Proxies' in APPLICATION_PATH . '/Entities' and 'APPLICATION_PATH . '/Proxies'' respectively. UPDATE i managed to make it work putting \Entities and \Proxies in \library\Application and add autoloaderNamespaces[] = Application in application.ini. but wha...

How to configure the Zend autoloader to load a custom path for resources before the default path

Separate but related to http://stackoverflow.com/questions/3363764/how-to-dynamically-override-forms-and-or-views-using-zend. I want Zend to try to load custom forms/views before loading a set of default forms for a web application to let clients create custom forms for their application. How do you configure the autoloader to load a d...

Zend Framework Autoloading not working when deploying

Hi, My Zend based website works perfectly on my localhost (using Mac). But When I deploy it on a linux web hosting company, I get the following errors: On the index page which try to list my ads by calling a resource where the select is: Fatal error: Class 'Lintottar_Model_Resources_Ad' not found in /www/webvol8/4v/7e33wem4920cqpg/l...

Working on localhost but server returns "Failed to open stream: No such file or directory"

On my local machine the script works fine, but when I put it on the server I get: application/hooks/zend.php [9]: require_once(Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory Stack Trace application/hooks/zend.php [9]: require_once( ) system/core/Kohana.php ...

Autoloading Symfony classes in Zend_Framework

Hello, How to autoload Symfony classes in the app based on Zend Framework? Can I push some kind of Symfony autoloader to the Zend's Autoloader? I need to use some of the components like output escaper or dependency injection classes. ...

Zend autoloader not working on live site

I've just copied my dev site to the live server, updated configs with new DB connection details etc, but get the following error message: Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message `'Plugin by name 'IncludeStyles' was not found in the registry; used paths: Zend_View_Helper_Navigation_: Zend/View/He...

Choosing different versions of Zend Framework to load using Zend_Loader and it's issues

Okay, so, I wanna be able to choose different versions of Zend Framework (and other frameworks) using Zend_Loader. Well, the code isn't tricky at all, but the problem is, there are so many require_once lines in the framework itself that would practically make the autoloader useless. The Zend directory has to be in the include_path whic...