/** * the component constructor */ public function __construct() { // runs the CConfig $com = new CConfig(CControl::getPrefix() . ',link,definition', dirname(__FILE__)); // runs the DBSubmission if ($com->used()) { return; } // initialize slim $this->_app = new \Slim\Slim(); $this->_app->response->headers->set('Content-Type', 'application/json'); // POST AddPlatform $this->_app->post('/platform', array($this, 'addPlatform')); // DELETE DeletePlatform $this->_app->delete('/platform', array($this, 'deletePlatform')); // GET GetExistsPlatform $this->_app->get('/link/exists/platform', array($this, 'getExistsPlatform')); // GET GetTableReferences $this->_app->get('/tableReferences', array($this, 'getTableReferences')); // PUT EditLink $this->_app->put('/link/:linkid(/)', array($this, 'editLink')); // DELETE DeleteLink $this->_app->delete('/link/:linkid(/)', array($this, 'deleteLink')); // POST SetLink $this->_app->post('/link(/)', array($this, 'setLink')); // GET GetLink $this->_app->get('/link/:linkid(/)', array($this, 'getLink')); // PUT EditComponent $this->_app->put('/component/:componentid(/)', array($this, 'editComponent')); // DELETE DeleteComponent $this->_app->delete('/component/:componentid(/)', array($this, 'deleteComponent')); // POST SetComponent $this->_app->post('/component(/)', array($this, 'setComponent')); // GET GetComponent $this->_app->get('/component/:componentid(/)', array($this, 'getComponent')); // GET GetComponentDefinitions $this->_app->get('/definition(/)', array($this, 'getComponentDefinitions')); // GET SendComponentDefinitions $this->_app->get('(/definition)/send(/)', array($this, 'sendComponentDefinitions')); // GET GetComponentDefinition $this->_app->get('/definition/:componentid(/)', array($this, 'getComponentDefinition')); // run Slim $this->_app->run(); }
public function __construct() { parent::__Construct(); $this->szDate = date('Y-m-d'); }