Exemple #1
0
 /**
  * Create a new instance and set Request and matcher variables
  *
  * @param Request|null $request the instance of anonym request
  */
 public function __construct(Request $request = null)
 {
     $this->setRequest($request);
     $this->setAccess(AccessBag::getAccesses());
     $this->setDefaultFilters();
     $this->setMatcher(new NewMatcher($this->getRequest()->getUrl(), null, FilterBag::getFilters()));
     $this->setActionDispatcher(new ActionDispatcher($this->getNamespace(), $this->getAccess(), $this->getRequest()));
 }
 /**
  * create a new instance and register the access array
  */
 public function __construct()
 {
     $this->access = AccessBag::getAccesses();
     $this->request = AccessBag::getRequest();
 }
 /**
  * create a new instance and register the default namespace
  *
  * @param string $namespace
  * @param array $access the list of access
  * @param Request $request the instance of request
  */
 public function __construct($namespace = '', array $access = [], Request $request = null)
 {
     $this->namespace = $namespace;
     AccessBag::setRequest($request);
 }