I am trying to create a service finder action helper, this will check
if a module has a service.

    public function getService($service, $module)
    {
        if (!isset($this->_services[$module][$service])) {
            $class = implode('_', array(
                    ucfirst($module),
                    'Service',
                    ucfirst($service)
            ));
            if (!class_exists($class)) {
                return false;
            }
            $this->_services[$module][$service] = new $class();
        }
            return $this->_resources[$module][$service];
    }

However I keep getting not found errors, I have tried setting the
suppressNotFoundWarnings to true but still get the same error. I see
in the modules resource for Zend_Application it does a similar
operation to load module bootstrap files:

if (!class_exists($bootstrapClass)) {
                $bootstrapPath  = $front->getModuleDirectory($module)
. '/Bootstrap.php';

It may just be me (its early morning) but I dont see how my
!class_exists is different from the modules resource??

Thx

Keith

Reply via email to