Search code examples
zend-frameworkpimcore

Autoloading classes in pimcore


I've created a fresh PHP-class, named it Application_Form_Login and saved it as Application_Form_Login.php inside the /website/lib directory. But everytime I'm running pimcore it refuses to load that file. What am I doing wrong here?

I've been looking at the Zend autoloader and trying to find out the issue.

I've noticed that in pimcore bootstrapping all the relevant directories are added to the include path. But they don't seem to get checked. Or maybe my file isn't named correctly to be picked up?


Solution

  • Your filename should be /website/lib/Application/Form/Login.php

    From the page you just quoted:

    Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.