acp_styles::request_vars PHP Метод

request_vars() защищенный Метод

Get list of items from posted data
protected request_vars ( string $name, string | integer $default, boolean $error = false ) : array
$name string Variable name
$default string | integer Default value for array
$error boolean If true, error will be triggered if list is empty
Результат array Items
    protected function request_vars($name, $default, $error = false)
    {
        $item = $this->request->variable($name, $default);
        $items = $this->request->variable($name . 's', array($default));
        if (count($items) == 1 && $items[0] == $default) {
            $items = array();
        }
        if ($item != $default && !count($items)) {
            $items[] = $item;
        }
        if ($error && !count($items)) {
            trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
        }
        return $items;
    }