Controller.class.php 942 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Holds the PMA\TableController
  5. *
  6. * @package PMA
  7. */
  8. namespace PMA\Controllers;
  9. use PMA\DI\Container;
  10. use PMA_DatabaseInterface;
  11. use PMA_Response;
  12. if (!defined('PHPMYADMIN')) {
  13. exit;
  14. }
  15. require_once 'libraries/di/Container.class.php';
  16. require_once 'libraries/database_interface.inc.php';
  17. /**
  18. * Base class for all of controller
  19. *
  20. * @package PhpMyAdmin
  21. */
  22. abstract class Controller
  23. {
  24. /**
  25. * @var PMA_Response
  26. */
  27. protected $response;
  28. /**
  29. * @var PMA_DatabaseInterface
  30. */
  31. protected $dbi;
  32. /**
  33. * @var Container
  34. */
  35. protected $container;
  36. /**
  37. * Constructor
  38. */
  39. public function __construct()
  40. {
  41. $container = Container::getDefaultContainer();
  42. $this->container = $container;
  43. $this->dbi = $this->container->get('dbi');
  44. $this->response = $this->container->get('response');
  45. }
  46. }