_resource; do { $resourceName = $currentResource->getName(); if ($resourceName == 'ApplicationDirectory' || $resourceName == 'ModuleDirectory') { $containingResource = $currentResource; break; } } while ($currentResource instanceof Zend_Tool_Project_Profile_Resource && $currentResource = $currentResource->getParentResource()); $fullClassName = ''; // go find the proper prefix if (isset($containingResource)) { if ($containingResource->getName() == 'ApplicationDirectory') { $prefix = $containingResource->getAttribute('classNamePrefix'); $fullClassName = $prefix; } elseif ($containingResource->getName() == 'ModuleDirectory') { $prefix = ucfirst($containingResource->getAttribute('moduleName')) . '_'; $fullClassName = $prefix; } } if ($classContextName) { $fullClassName .= rtrim($classContextName, '_') . '_'; } $fullClassName .= $localClassName; return $fullClassName; } }