Overview

Namespaces

  • GLFramework
    • Cache
    • Controller
    • DaMa
      • Manipulators
    • Database
    • HTTP
    • Mail
    • Middleware
    • Model
    • Module
    • Tests
    • Upload
    • Utils
  • None

Classes

  • GLFramework\Bootstrap
  • GLFramework\Cache\Cache
  • GLFramework\Cache\MemcachedCache
  • GLFramework\Cache\MemoryCache
  • GLFramework\Controller
  • GLFramework\Controller\AdminController
  • GLFramework\Controller\APIController
  • GLFramework\Controller\AuthController
  • GLFramework\Controller\ErrorController
  • GLFramework\Controller\ExceptionController
  • GLFramework\DaMa\Association
  • GLFramework\DaMa\DataManipulation
  • GLFramework\DaMa\Manipulator
  • GLFramework\DaMa\Manipulators\CSVManipulator
  • GLFramework\DaMa\Manipulators\ManipulatorCore
  • GLFramework\DaMa\Manipulators\XLSManipulator
  • GLFramework\DaMa\Manipulators\XLSXManipulator
  • GLFramework\Database\Connection
  • GLFramework\Database\MySQLConnection
  • GLFramework\DatabaseManager
  • GLFramework\DBStructure
  • GLFramework\Events
  • GLFramework\Filesystem
  • GLFramework\HTTP\API
  • GLFramework\Log
  • GLFramework\Mail
  • GLFramework\Mail\Mail
  • GLFramework\Mail\MailSystem
  • GLFramework\Mail\PHPMailer
  • GLFramework\MailView
  • GLFramework\Middleware\APIAuthorizationMiddleware
  • GLFramework\Middleware\ControllerMiddleware
  • GLFramework\Model
  • GLFramework\Model\Page
  • GLFramework\Model\User
  • GLFramework\Model\UserPage
  • GLFramework\ModelResult
  • GLFramework\Module\Module
  • GLFramework\Module\ModuleManager
  • GLFramework\Request
  • GLFramework\Response
  • GLFramework\Tests\DatabaseTestCase
  • GLFramework\Tests\TestCase
  • GLFramework\Upload\Upload
  • GLFramework\Upload\Uploads
  • GLFramework\Utils\DataTablesManager
  • GLFramework\Versions
  • GLFramework\View

Interfaces

  • GLFramework\Middleware

Functions

  • array_merge_recursive_ex
  • e
  • file_get_php_classes
  • fix_date
  • fix_date_format
  • fix_decimal
  • fix_url
  • get
  • get_php_classes
  • http_response_code
  • instance_method
  • is_module_enabled
  • now
  • post
  • print_array
  • print_brief_debug
  • print_debug
  • random_str
  • reArrayFiles
  • reArrayPost
  • today
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace GLFramework\Middleware;
 3: use GLFramework\Controller;
 4: use GLFramework\Events;
 5: use GLFramework\Middleware;
 6: use GLFramework\Request;
 7: use GLFramework\Response;
 8: 
 9: /**
10:  * Created by PhpStorm.
11:  * User: manus
12:  * Date: 21/04/16
13:  * Time: 9:04
14:  */
15: class ControllerMiddleware implements Middleware
16: {
17: 
18:     /**
19:      * @var Controller
20:      */
21:     var $controller;
22: 
23:     /**
24:      * ControllerMiddleware constructor.
25:      * @param Controller $controller
26:      */
27:     public function __construct(Controller $controller)
28:     {
29:         $this->controller = $controller;
30:     }
31: 
32: 
33:     public function next(Request $request, Response $response, $next)
34:     {
35:         // TODO: Implement next() method.
36: 
37:         Events::fire('beforeControllerRun', array($this->controller));
38:         $data = call_user_func_array(array($this->controller, "run"), $request->params);
39:         $next($request, $response);
40:         Events::fire('afterControllerRun', array($this->controller, $this->response));
41:         $response->setContent($this->controller->display($data, $request->params));
42:     }
43: }
API documentation generated by ApiGen