Exemple #1
0
 /**
  * Constructor
  * @param string $pluginName Plugin name.
  * @param string $version Plugin version.
  * @param string $path Path to plugin.
  */
 public function __construct($pluginName, $version, $path)
 {
     $this->pluginName = $pluginName;
     $this->pluginPath = $path;
     /* Class loader */
     $this->loader = new Rsc_ClassLoader();
     /* Modules resolver */
     $this->resolver = new Rsc_Resolver($this);
     /* Config */
     $this->config = new Rsc_Config($this->defaults);
     $this->config->setDefaultPath(untrailingslashit($path) . '/app/configs');
     try {
         $this->config->load('@app/global.php');
     } catch (Exception $e) {
     }
     $this->config->add('plugin_name', $this->pluginName);
     $this->config->add('plugin_version', $version);
     $this->config->add('plugin_path', $path);
     /* Dispatcher */
     $this->dispatcher = new Rsc_Dispatcher($this);
 }