add SQCManager
This commit is contained in:
31
geoapi/api/Api.php
Normal file
31
geoapi/api/Api.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
include_once "../../global.inc.php";
|
||||
include_once PATH_DATABASE . "/SQLManager.php";
|
||||
require_once PATH_3PARTY . "/Slim/Slim.php";
|
||||
\Slim\Slim::registerAutoloader();
|
||||
|
||||
abstract class Api extends \Slim\Slim {
|
||||
|
||||
protected $sqlManager;
|
||||
|
||||
public function __construct() {
|
||||
if (!$this->sqlManager) {
|
||||
echo "bla";
|
||||
$this->sqlManager = new SQLManager();
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function __destruct() {
|
||||
$this->sqlManager = null;
|
||||
//parent::__destruct();
|
||||
}
|
||||
|
||||
public function connect() {
|
||||
$this->sqlManager->connect();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user