Horde_Form::preserve PHP Метод

preserve() публичный Метод

public preserve ( $vars )
    function preserve($vars)
    {
        if ($this->_useFormToken) {
            $token = Horde_Token::generateId($this->_name);
            $GLOBALS['session']->set('horde', 'form_secrets/' . $token, true);
            $this->_preserveVarByPost($this->_name . '_formToken', $token);
        }
        $variables = $this->getVariables();
        foreach ($variables as $var) {
            $varname = $var->getVarName();
            /* Save value of individual components. */
            switch ($var->getTypeName()) {
                case 'passwordconfirm':
                case 'emailconfirm':
                    $this->preserveVarByPost($vars, $varname . '[original]');
                    $this->preserveVarByPost($vars, $varname . '[confirm]');
                    break;
                case 'monthyear':
                    $this->preserveVarByPost($vars, $varname . '[month]');
                    $this->preserveVarByPost($vars, $varname . '[year]');
                    break;
                case 'monthdayyear':
                    $this->preserveVarByPost($vars, $varname . '[month]');
                    $this->preserveVarByPost($vars, $varname . '[day]');
                    $this->preserveVarByPost($vars, $varname . '[year]');
                    break;
            }
            $this->preserveVarByPost($vars, $varname);
        }
        foreach ($this->_hiddenVariables as $var) {
            $this->preserveVarByPost($vars, $var->getVarName());
        }
    }