public function setAllowedActions($actions) {
        $diff = array_diff($actions, $this->actions_list);
        if($diff) {
            $this->error('The following actions are not exists: "' . implode('", "', $diff) . '"');
        }
        $this->allowed_actions = $actions;
    }