public function load($plugins)
    {
        if (!is_array($plugins)) {
            $plugins = (array) $plugins;
        }

        foreach ($plugins as $plugin) {
            if (!isset($this->plugins[$plugin])) {
                trigger_error(sprintf('Attempted to load non-existing plugin %s', $plugin));
                return false;
            }

            if (isset($this->plugins[$plugin]['scripts'])) {
                $this->appendScripts($this->plugins[$plugin]['scripts']);
            }

            if (isset($this->plugins[$plugin]['stylesheets'])) {
                $this->appendStylesheets($this->plugins[$plugin]['stylesheets']);
            }
        }

        return $this;
    }
public function load($plugins)
    {
        if (!is_array($plugins)) {
            $plugins = (array) $plugins;
        }

        foreach ($plugins as $plugin) {
            if (!isset($this->plugins[$plugin])) {
                trigger_error(sprintf('Attempted to load non-existing plugin %s', $plugin));
                return false;
            }

            if (isset($this->plugins[$plugin]['scripts'])) {
                $this->appendScripts($this->plugins[$plugin]['scripts']);
            }

            if (isset($this->plugins[$plugin]['stylesheets'])) {
                $this->appendStylesheets($this->plugins[$plugin]['stylesheets']);
            }
        }

        return $this;
    }
public function load ( $ plugins ) { if ( ! is_array ( $ plugins ) ) { $ plugins = ( array ) $ plugins ; } foreach ( $ plugins as $ plugin ) { if ( ! isset ( $ this -> plugins [ $ plugin ] ) ) { trigger_error ( sprintf ( 'Attempted to load non-existing plugin %s' , $ plugin ) ) ; return false ; } if ( isset ( $ this -> plugins [ $ plugin ] [ 'scripts' ] ) ) { $ this -> appendScripts ( $ this -> plugins [ $ plugin ] [ 'scripts' ] ) ; } if ( isset ( $ this -> plugins [ $ plugin ] [ 'stylesheets' ] ) ) { $ this -> appendStylesheets ( $ this -> plugins [ $ plugin ] [ 'stylesheets' ] ) ; } } return $ this ; }
Loads plugins or a single plugin

@param string|array $name
@return \Krystal\Application\View\PluginBag
Loads plugins or a single plugin