示例#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();
 }
示例#2
0
 /**
  * the $_prefix setter
  *
  * @param string $value the new value for $_prefix
  */
 public static function setPrefix($value)
 {
     FSControl::$_prefix = $value;
 }