Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Testing for Plugins and Retrieving Class Names

Sometimes you simply want to determine if a plugin class has been loaded before you perform an action. isLoaded() takes a plugin name, and returns the status.

Another common use case for the PluginLoader is to determine fully qualified plugin class names of loaded classes; getClassName() provides this functionality. Typically, this would be used in conjunction with isLoaded():

if ($loader->isLoaded('Adapter')) {
$class   $loader->getClassName('Adapter');
$adapter call_user_func(array($class'getInstance'));

Zend Framework