public function loadPlugin($class, $forceRehash = true)
    {
        /**
         * An unknown class was requested (maybe newly added) or the
         * include failed so we rebuild the cache. include() will fail
         * with an uncatchable error if the file doesn't exist, which
         * usually means that the cache is stale and must be rebuilt,
         * so we check for that before trying to include() the plugin.
         */
        if ((!isset($this->classPath[$class]) || !is_readable($this->classPath[$class])) || (!isset
                ($this->classPath[$class . 'Compile']) || !is_readable($this->classPath[$class . 'Compile']))) {
            if ($forceRehash) {
                $this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d' .
                    Core::RELEASE_TAG . '.php');
                foreach ($this->paths as $path => $file) {
                    $this->rebuildClassPathCache($path, $file);
                }
                if (isset($this->classPath[$class])) {
                    include_once $this->classPath[$class];
                } elseif (isset($this->classPath[$class . 'Compile'])) {
                    include_once $this->classPath[$class . 'Compile'];
                } else {
                    throw new Exception('Plugin "' . $class . '" can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE);
                }
            } else {
                throw new Exception('Plugin "' . $class . '" can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE);
            }
        }
    }
public function loadPlugin($class, $forceRehash = true)
    {
        /**
         * An unknown class was requested (maybe newly added) or the
         * include failed so we rebuild the cache. include() will fail
         * with an uncatchable error if the file doesn't exist, which
         * usually means that the cache is stale and must be rebuilt,
         * so we check for that before trying to include() the plugin.
         */
        if ((!isset($this->classPath[$class]) || !is_readable($this->classPath[$class])) || (!isset
                ($this->classPath[$class . 'Compile']) || !is_readable($this->classPath[$class . 'Compile']))) {
            if ($forceRehash) {
                $this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d' .
                    Core::RELEASE_TAG . '.php');
                foreach ($this->paths as $path => $file) {
                    $this->rebuildClassPathCache($path, $file);
                }
                if (isset($this->classPath[$class])) {
                    include_once $this->classPath[$class];
                } elseif (isset($this->classPath[$class . 'Compile'])) {
                    include_once $this->classPath[$class . 'Compile'];
                } else {
                    throw new Exception('Plugin "' . $class . '" can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE);
                }
            } else {
                throw new Exception('Plugin "' . $class . '" can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE);
            }
        }
    }
public function loadPlugin ( $ class , $ forceRehash = true ) { /**
         * An unknown class was requested (maybe newly added) or the
         * include failed so we rebuild the cache. include() will fail
         * with an uncatchable error if the file doesn't exist, which
         * usually means that the cache is stale and must be rebuilt,
         * so we check for that before trying to include() the plugin.
         */ if ( ( ! isset ( $ this -> classPath [ $ class ] ) || ! is_readable ( $ this -> classPath [ $ class ] ) ) || ( ! isset ( $ this -> classPath [ $ class . 'Compile' ] ) || ! is_readable ( $ this -> classPath [ $ class . 'Compile' ] ) ) ) { if ( $ forceRehash ) { $ this -> rebuildClassPathCache ( $ this -> corePluginDir , $ this -> cacheDir . 'classpath.cache.d' . Core :: RELEASE_TAG . '.php' ) ; foreach ( $ this -> paths as $ path => $ file ) { $ this -> rebuildClassPathCache ( $ path , $ file ) ; } if ( isset ( $ this -> classPath [ $ class ] ) ) { include_once $ this -> classPath [ $ class ] ; } elseif ( isset ( $ this -> classPath [ $ class . 'Compile' ] ) ) { include_once $ this -> classPath [ $ class . 'Compile' ] ; } else { throw new Exception ( 'Plugin "' . $ class . '" can not be found, maybe you forgot to bind it if it\'s a custom plugin ?' , E_USER_NOTICE ) ; } } else { throw new Exception ( 'Plugin "' . $ class . '" can not be found, maybe you forgot to bind it if it\'s a custom plugin ?' , E_USER_NOTICE ) ; } } }
Loads a plugin file.

@param string $class       the plugin name, without the `Plugin` prefix
@param bool   $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it
has just been added, defaults to true

@throws Exception
Loads a plugin file .