function __construct($componentId) { org_glizy_Session::init(); $this->_pageId = strtolower(org_glizy_ObjectValues::get('org.glizy.application', 'pageId')); $this->_componentId = $componentId; $this->_allValues = org_glizy_Session::get(GLZ_SESSION_EX_PREFIX, array(), false, true); if (!array_key_exists($this->_pageId, $this->_allValues)) { $this->_allValues[$this->_pageId] = array(); } foreach ($this->_allValues as $k => $v) { if ($k != $this->_pageId) { foreach ($v as $kk => $vv) { if ($vv['type'] != GLZ_SESSION_EX_PERSISTENT) { unset($this->_allValues[$k][$kk]); } } } } $this->_values =& $this->_allValues[$this->_pageId]; org_glizy_Session::set(GLZ_SESSION_EX_PREFIX, $this->_allValues); /* da verificare $url = org_glizy_Request::get( '__back__url__' ); $userted = array(); if ( !empty( $url ) ) { foreach($this->_values as $k=>$v) { $val = explode( "_", $k ); if ( count( $val ) == 2 && !in_array( $val[1], $userted) ) { $userted[] = $val[1]; if ( strpos( $url, $val[1].'='.$v['value'] ) === false ) { $url .= '&'.$val[1].'='.$v['value']; } } } org_glizy_Request::set( '__back__url__', $url ); } */ }
/** * @param bool $init * @return mixed */ function &_getValuesArray($init = false) { if (!$init) { org_glizy_Session::init(); } return $_SESSION; }