Issues

ZF-6318: Feature Request: Zend_Loader to use PHP 5.3 namespaces.

Description

In a project proposal I use the namespace feature of PHP 5.3 and tried to integrate it with Zend_Loader.

The goal is to reduce:


class Some_Rather_Long_Name {}

to something like


namespace Some/Rather/Long;
class Name {}

which works fine, but needs the following patch to Zend_Loader::loadClass()


        // autodiscover the path from the class name
        $file = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $class) . '.php';

It would be great to have this simple addition in the Zend Framework!

Comments

This gain importance as php 5.3 is out. A problem also exists in Zend_Loader_PluginLoader as it cannot load namespaced view helpers and similar.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.