CommonFunctions::getPlugins PHP Method

getPlugins() public static method

get all configured plugins from phpsysinfo.ini (file must be included and processed before calling this function)
public static getPlugins ( ) : array
return array
    public static function getPlugins()
    {
        if (defined('PSI_PLUGINS') && is_string(PSI_PLUGINS)) {
            if (preg_match(ARRAY_EXP, PSI_PLUGINS)) {
                return eval(strtolower(PSI_PLUGINS));
            } else {
                return array(strtolower(PSI_PLUGINS));
            }
        } else {
            return array();
        }
    }

Usage Example

示例#1
0
 /**
  * set parameters for the generation process
  *
  * @param boolean $completeXML switch for complete xml with all plugins
  * @param string  $plugin      name of the plugin
  *
  * @return void
  */
 public function __construct($completeXML, $plugin = null)
 {
     parent::__construct();
     if ($completeXML) {
         $this->_plugins = CommonFunctions::getPlugins();
     }
     if ($plugin !== null) {
         if (!is_array($plugin)) {
             $plugin = array($plugin);
         }
         foreach ($plugin as $p) {
             if (in_array(strtolower($p), CommonFunctions::getPlugins())) {
                 $this->_plugins[] = $p;
             }
             $this->_pluginRequest = true;
         }
     }
     $this->_prepare();
 }
All Usage Examples Of CommonFunctions::getPlugins