Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / View / Helper / Navigation / PluginManager.php
blob29ec332947f074ac765c89eadee2c39d71f5818e
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\View\Helper\Navigation;
12 use Zend\View\Exception;
13 use Zend\View\HelperPluginManager;
15 /**
16 * Plugin manager implementation for navigation helpers
18 * Enforces that helpers retrieved are instances of
19 * Navigation\HelperInterface. Additionally, it registers a number of default
20 * helpers.
22 class PluginManager extends HelperPluginManager
24 /**
25 * Default set of helpers
27 * @var array
29 protected $invokableClasses = array(
30 'breadcrumbs' => 'Zend\View\Helper\Navigation\Breadcrumbs',
31 'links' => 'Zend\View\Helper\Navigation\Links',
32 'menu' => 'Zend\View\Helper\Navigation\Menu',
33 'sitemap' => 'Zend\View\Helper\Navigation\Sitemap',
36 /**
37 * Validate the plugin
39 * Checks that the helper loaded is an instance of AbstractHelper.
41 * @param mixed $plugin
42 * @return void
43 * @throws Exception\InvalidArgumentException if invalid
45 public function validatePlugin($plugin)
47 if ($plugin instanceof AbstractHelper) {
48 // we're okay
49 return;
52 throw new Exception\InvalidArgumentException(sprintf(
53 'Plugin of type %s is invalid; must implement %s\AbstractHelper',
54 (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
55 __NAMESPACE__
56 ));