Select Git revision
LayerConnections.class.inc

Armand Bahi authored
af1a2e36 Merge branch 'master' of gitlab.veremes.net:Development/vitis_apps/application/vmap 6acd8ede Modify symlinks strategy git-subtree-dir: src/module_vm4ms git-subtree-split: af1a2e36
LayerConnections.class.inc 11.55 KiB
<?php
/**
* \file LayerConnections.class.inc
* \class LayerConnections
*
* \author Armand Bahi <armand.bahi@veremes.com>.
*
* \brief This file contains the LayerConnections php class
*
* This class defines Rest Api to Vmap4MapServer Connections
*
*/
require_once 'Vmap4MapServer.class.inc';
require_once 'LayerConnection.class.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vmlib/BdDataAccess.inc';
class LayerConnections extends Vmap4MapServer {
/**
* @SWG\Definition(
* definition="/layerconnections",
* allOf={
* @SWG\Schema(ref="#/definitions/layerconnections")
* }
* )
* * @SWG\Tag(
* name="LayerConnections",
* description=""
* )
*/
/**
* construct
* @param type $aPath url of the request
* @param type $aValues parameters of the request
* @param type $properties properties
* @param type $bShortcut false to reinit variables
* @param type $oConnection connection object
*/
function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) {
parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection);
$this->aSelectedFields = Array("connection_id", "name", "private", "server", "port", "database", "user", "password");
}
/**
* @SWG\Get(path="/layerconnections",
* tags={"LayerConnections"},
* summary="Get connection",
* description="Request to get connection",
* operationId="GET",
* produces={"application/xml", "application/json", "application/x-vm-json"},
* @SWG\Parameter(
* name="token",
* in="query",
* description="user token",
* required=true,
* type="string"
* ),
* @SWG\Parameter(
* name="order_by",
* in="query",
* description="list of ordering fields",
* required=false,
* type="string"
* ),
* @SWG\Parameter(
* name="sort_order",
* in="query",
* description="sort order",