Ejemplo n.º 1
0
 /**
  * Construct RICH controller
  *
  * @access public
  *
  * @param string $modules
  *
  * @result void
  * @throws Exception
  */
 public function __construct($modules = '')
 {
     parent::__construct($modules);
     /** @var ServerRequestInterface $request */
     $request = (new RequestInjector())->build();
     $this->methodType = $request->getMethod() ?: 'GET';
 }
Ejemplo n.º 2
0
 /**
  * Construct RICH controller
  *
  * @access public
  *
  * @param IContainer $container
  * @param string $modules
  *
  * @result void
  */
 public function __construct(IContainer $container, $modules = '')
 {
     parent::__construct($container, $modules);
     $this->methodType = $this->container->request->getMethod() ?: 'GET';
 }