public function info($req, $res, $args)
    {
        $formattedPluginName =
            str_replace(
                ' ',
                '',
                //                ucwords(
                str_replace(['-', '_'], ' ', $args['name'])
                //            )
            );
        $plugins = $this->model->getList(true);
        $plugKey = Utils::recursiveArraySearch($formattedPluginName, $plugins);
        if ($plugKey !== false) {
            $p = explode('\\', $plugins[$plugKey]['class']);
            $plug = '\\'.$p[0].'\\Controller\\' . $p[1];
            if (class_exists($plug)) {
                $plugin = new $plug;
                if (method_exists($plugin, 'info')) {
                    AdminUtils::generateAdminMenu($args['name']);
                    return $plugin->info($req, $res, $args);
                } else {
                    throw new  RunBBException('Not found `info` method in class: '.$plug, 400);
                }
            } else {
                throw new  RunBBException('Not found extension class: '.$plug, 400);
            }
        } else {
            throw new  RunBBException('Not found in extensions: '.$formattedPluginName, 400);
        }
    }
public function info($req, $res, $args)
    {
        $formattedPluginName =
            str_replace(
                ' ',
                '',
                //                ucwords(
                str_replace(['-', '_'], ' ', $args['name'])
                //            )
            );
        $plugins = $this->model->getList(true);
        $plugKey = Utils::recursiveArraySearch($formattedPluginName, $plugins);
        if ($plugKey !== false) {
            $p = explode('\\', $plugins[$plugKey]['class']);
            $plug = '\\'.$p[0].'\\Controller\\' . $p[1];
            if (class_exists($plug)) {
                $plugin = new $plug;
                if (method_exists($plugin, 'info')) {
                    AdminUtils::generateAdminMenu($args['name']);
                    return $plugin->info($req, $res, $args);
                } else {
                    throw new  RunBBException('Not found `info` method in class: '.$plug, 400);
                }
            } else {
                throw new  RunBBException('Not found extension class: '.$plug, 400);
            }
        } else {
            throw new  RunBBException('Not found in extensions: '.$formattedPluginName, 400);
        }
    }
public function info ( $ req , $ res , $ args ) { $ formattedPluginName = str_replace ( ' ' , '' , //                ucwords( str_replace ( [ '-' , '_' ] , ' ' , $ args [ 'name' ] ) //            ) ) ; $ plugins = $ this -> model -> getList ( true ) ; $ plugKey = Utils :: recursiveArraySearch ( $ formattedPluginName , $ plugins ) ; if ( $ plugKey !== false ) { $ p = explode ( '\\' , $ plugins [ $ plugKey ] [ 'class' ] ) ; $ plug = '\\' . $ p [ 0 ] . '\\Controller\\' . $ p [ 1 ] ; if ( class_exists ( $ plug ) ) { $ plugin = new $ plug ; if ( method_exists ( $ plugin , 'info' ) ) { AdminUtils :: generateAdminMenu ( $ args [ 'name' ] ) ; return $ plugin -> info ( $ req , $ res , $ args ) ; } else { throw new RunBBException ( 'Not found `info` method in class: ' . $ plug , 400 ) ; } } else { throw new RunBBException ( 'Not found extension class: ' . $ plug , 400 ) ; } } else { throw new RunBBException ( 'Not found in extensions: ' . $ formattedPluginName , 400 ) ; } }
Load plugin info if it exists
@param $req
@param $res
@param $args
@return mixed
@throws RunBBException
Load plugin info if it exists