Initial Commit

This commit is contained in:
GiacomoHome
2021-09-17 12:41:45 +02:00
commit 9001e4656e
570 changed files with 31013 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
class V1_Bootstrap extends Zend_Application_Module_Bootstrap
{
public function _init()
{
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin(new Zend_Controller_Plugin_PutHandler());
}
public function _initPersonalRouter()
{
$router = Zend_Controller_Front::getInstance()->getRouter();
$router->addRoute(
'paginator',
new Zend_Controller_Router_Route('/:module/:controller/list/:page/:count/*',
array(
'module' => 'v1',
'action' => 'get'
)
)
);
$router->addRoute(
'getmethod',
new Zend_Controller_Router_Route('/:module/:controller/m/:method/*',
array(
'module' => 'v1',
'action' => 'get'
)
)
);
}
}
@@ -0,0 +1,50 @@
<?php
class V1_IndexController extends App_Controller_Rest_Controller
{
public function init()
{
$this->_resourceName = 'Abstract';
parent::init();
}
public function indexAction()
{
try {
$this->_responseData->message = 'As Fb2b.net WS';
$this->_status = true;
$this->sendResponse();
} catch (Exception $e) {
$this->_responseData->message = $e->getMessage();
$this->_responseData->trace = $e->getTrace();
$this->sendResponse();
}
}
public function getAction()
{
$this->_responseData->message = 'Funzione non disponibile';
$this->sendResponse();
}
public function postAction()
{
$this->_responseData->message = 'Funzione non disponibile';
$this->sendResponse();
}
public function putAction()
{
$this->_responseData->message = 'Funzione non disponibile';
$this->sendResponse();
}
public function deleteAction()
{
$this->_responseData->message = 'Funzione non disponibile';
$this->sendResponse();
}
}//END CLASS
@@ -0,0 +1,48 @@
<?php
class V1_UsersController extends App_Controller_Rest_Controller
{
protected $_authInfo;
public function init()
{
$this->_resourceName = 'Users';
$this->_authInfo = new App_Service_Auth();
parent::init();
}
public function postAction()
{
$this->disableCallAction();
}
public function putAction()
{
$this->disableCallAction();
}
public function deleteAction()
{
$this->disableCallAction();
}
//-----------------------------------------------
public function switchMethodFunction($method)
{
switch ($method) {
default:
$this->defaultGetList();
break;
}
}
public function getSingleElementManipulate($data)
{
return array_diff_key($data, array_flip(array('token', 'password', 'staylogin')));
}
}//END CLASS