34 lines
631 B
PHP
34 lines
631 B
PHP
<?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() {
|
|
$this->connect();
|
|
parent::__construct();
|
|
}
|
|
|
|
public function __destruct() {
|
|
$this->close();
|
|
$this->sqlManager = null;
|
|
//parent::__destruct();
|
|
}
|
|
|
|
private function connect() {
|
|
$this->sqlManager->connect();
|
|
}
|
|
|
|
private function close() {
|
|
$this->sqlManager->close();
|
|
}
|
|
|
|
}
|
|
|
|
?>
|