Exemple #1
0
 /**
  * the component constructor
  *
  * @param $conf component data
  */
 public function __construct()
 {
     // runs the CConfig
     $com = new CConfig(FSControl::getPrefix(), dirname(__FILE__));
     // runs the DBControl
     if ($com->used()) {
         return;
     }
     $conf = $com->loadConfig();
     // initialize component
     $this->_conf = $conf;
     // initialize slim
     $this->_app = new \Slim\Slim();
     $this->_app->map('/:data+', array($this, 'getl'))->via('GET', 'POST', 'DELETE', 'PUT', 'INFO');
     // run Slim
     $this->_app->run();
 }