PATH:
var
/
www
/
vhosts
/
sandbox.dos-group.com
/
beacons.sandbox.dos-group.com
/
app
/
modules
/
api_v1
<?php /** * @Author Dos Group * @Copyright (c) 2018 DOS Group. All rights reserved */ namespace App\Api_V1; use Dos\Phalcon\Mvc\DispatcherBase; use Dos\Phalcon\Plugins\ExceptionsPlugin; use Phalcon\DiInterface; use Phalcon\Events\Manager as EventManager; use Phalcon\Loader; use Phalcon\Mvc\ModuleDefinitionInterface; use Phalcon\Mvc\View; class Module implements ModuleDefinitionInterface { /** * Register a specific autoloader for the module * @param DiInterface $di */ public function registerAutoloaders(DiInterface $di = NULL) { $loader = new Loader(); $loader->registerNamespaces([ 'App\Api_V1\Controllers' => '../app/modules/api_v1/controllers/', ]); $loader->register(); } /** * Register specific services for the module * @param DiInterface $di */ public function registerServices(DiInterface $di) { /* * Registering a dispatcher */ $di->set('dispatcher', function () { //Create an EventsManager to manage errors $eventsManager = new EventManager(); $eventsManager->attach("dispatch", new ExceptionsPlugin()); //Create a dispatcher $dispatcher = new DispatcherBase(); $dispatcher->setEventsManager($eventsManager); $dispatcher->setDefaultNamespace('App\Api_V1\Controllers'); return $dispatcher; }); /* * Registering the view component */ $di->set('view', function () { $view = new View(); $view->disable(); return $view; }); } }
[+]
..
[+]
controllers
[-] Module.php
[open]