Tuesday 10 November 2009 12:12:38 pm
Hi there, I'm building an extension that will expose a bunch of template operators and modules that user a small component lib i wrote. This component, called Ewm is built using the Zend Coding standard. I want to embed this lib in an extension and use the lib autoloader to avoid require/includes in operators and module functions Can't find a way to include the Autoloader code somewhere. Who an i acheave this? extension
- ewmadapter
- autoloads
- design
- lib
- Ewm
- modules
- settings
- translations
the autoloader looks like this (in Ewm/Autoloader.php) :
class Ewm_Autoloader
{
static public function register()
{
ini_set('unserialize_callback_func', 'spl_autoload_call');
spl_autoload_register(array(new self, 'autoload'));
}
static public function autoload($class)
{
if (0 !== strpos($class, 'Ewm'))
{
return false;
}
require dirname(__FILE__).'/../'.str_replace('_', '/', $class).'.php';
return true;
}
}
--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony
|