protected function getPluginMetas(PluginInterface $plugin)
    {
        $metas = $plugin->getMetas();

        if (is_array($metas) === false) {
            $classname = get_class($plugin);

            throw new \RuntimeException(sprintf('Expected an array at method "getMetas" of the plugin: "%s".', $classname));
        }

        $metas = $this->resolver->resolve($metas);

        if (empty($metas['name']) === true) {
            $metas['name'] = get_class($plugin);
        }

        return $metas;
    }
protected function getPluginMetas(PluginInterface $plugin)
    {
        $metas = $plugin->getMetas();

        if (is_array($metas) === false) {
            $classname = get_class($plugin);

            throw new \RuntimeException(sprintf('Expected an array at method "getMetas" of the plugin: "%s".', $classname));
        }

        $metas = $this->resolver->resolve($metas);

        if (empty($metas['name']) === true) {
            $metas['name'] = get_class($plugin);
        }

        return $metas;
    }
protected function getPluginMetas ( PluginInterface $ plugin ) { $ metas = $ plugin -> getMetas ( ) ; if ( is_array ( $ metas ) === false ) { $ classname = get_class ( $ plugin ) ; throw new \ RuntimeException ( sprintf ( 'Expected an array at method "getMetas" of the plugin: "%s".' , $ classname ) ) ; } $ metas = $ this -> resolver -> resolve ( $ metas ) ; if ( empty ( $ metas [ 'name' ] ) === true ) { $ metas [ 'name' ] = get_class ( $ plugin ) ; } return $ metas ; }
Gets metas of a plugin.

@param string          $filename The plugin filename
@param PluginInterface $plugin   The plugin

@return array

@throws RuntimeException If bad metas
Gets metas of a plugin .