public function deny($actions = null)
{
if ($actions === null) {
$this->allowedActions = [];
return;
}
foreach ((array) $actions as $action) {
$i = array_search($action, $this->allowedActions);
if (is_int($i)) {
unset($this->allowedActions[$i]);
}
}
$this->allowedActions = array_values($this->allowedActions);
}