public function __construct($currentUser, $dispatcher = null) { $this->rules = new RuleRepository(); $this->setDispatcher($dispatcher); $this->setCurrentUser($currentUser); $this->dispatch('authority.initialized', array('user' => $this->getCurrentUser())); }
/** * Authority constructor * * @param mixed $currentUser Current user in the application * @param mixed $dispatcher Dispatcher used for firing events */ public function __construct($currentUser, $dispatcher = null) { $this->initDefaultAliases(); parent::__construct($currentUser, $dispatcher); }