Development > Development

What are the functions that are in the Session.php class?

(1/1)

Xefiron:
I have the following function that comes with a topic that I occupy, that calls a function of the Session.php class, but I do not understand what it does, I opened the Session.php class but the functions it has are even more confusing, since there is no documentation on what they do as in the case of helpers, any help ?, both for me and for those who use this same subject of reference, thank you for your attention.

Item-post.php


--- Code: ---$prepare['i_region'] = veronika_get_session('sRegion') <> '' ? veronika_get_session('sRegion') : osc_user_region_id();
--- End code ---

Functions.php (Of theme)

--- Code: ---function veronika_get_session( $param ) {
  return Session::newInstance()->_getForm($param);
}
--- End code ---

Session.php


--- Code: ---function _getForm($key = '') {
            $form = $this->_get('form');
            if($key!='') {
                if ( isset($form[$key]) ) {
                    return ( $form[$key] );
                } else {
                    return ( '' );
                }
            } else {
                return $form;
            }
        }

function _get($key) {
            if (!isset($this->session[$key])) {
                return '';
            }

            return ($this->session[$key]);
        }
--- End code ---

Navigation

[0] Message Index

Go to full version