More API changes
parent
403b87bbda
commit
f9845624d4
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
// Contains all common requirements. Nothing more.
|
||||
require_once(__DIR__ . '/../../hesk_settings.inc.php');
|
||||
require_once(__DIR__ . '/../../inc/common.inc.php');
|
||||
require_once(__DIR__ . '/../core/output.php');
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: user
|
||||
* Date: 1/16/17
|
||||
* Time: 10:18 PM
|
||||
*/
|
||||
|
||||
namespace DataAccess;
|
||||
|
||||
|
||||
use mysqli;
|
||||
|
||||
class Connection {
|
||||
static function connect($hesk_settings) {
|
||||
//-- Return mysqli_connection
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $mysqliConnection mysqli The MySQLi connection obtained from Connection::connect
|
||||
* @return bool true if connection closed, false otherwise
|
||||
*/
|
||||
static function close($mysqliConnection) {
|
||||
return $mysqliConnection->close();
|
||||
}
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
<?php
|
||||
define('IN_SCRIPT', 1);
|
||||
define('HESK_PATH', '../');
|
||||
|
||||
// Just call the controller
|
||||
require_once(__DIR__ . '/core/common.php');
|
||||
require_once(__DIR__ . '/controllers/CategoryController.php');
|
||||
require_once(__DIR__ . '/../hesk_settings.inc.php');
|
||||
hesk_load_api_database_functions();
|
||||
|
||||
\Controllers\Category\CategoryController::getAllCategories($hesk_settings);
|
||||
$categories = \Controllers\Category\CategoryController::getAllCategories($hesk_settings);
|
||||
|
||||
output($categories);
|
Loading…
Reference in New Issue