public function get($property = null, $default = null)
    {
        $defaultCurrentValue = [];
        $data = $this->session->get($this->_name, $defaultCurrentValue);

        if ($property === null) {
            return $data;
        } else {
            return isset($data[$property]) ? $data[$property] : $default;
        }
    }
public function get($property = null, $default = null)
    {
        $defaultCurrentValue = [];
        $data = $this->session->get($this->_name, $defaultCurrentValue);

        if ($property === null) {
            return $data;
        } else {
            return isset($data[$property]) ? $data[$property] : $default;
        }
    }
public function get ( $ property = null , $ default = null ) { $ defaultCurrentValue = [ ] ; $ data = $ this -> session -> get ( $ this -> _name , $ defaultCurrentValue ) ; if ( $ property === null ) { return $ data ; } else { return isset ( $ data [ $ property ] ) ? $ data [ $ property ] : $ default ; } }
Obtains a value from the session bag optionally setting a default value

@param string $property
@param string $default

@return mixed
Obtains a value from the session bag optionally setting a default value