Hello developers!
I’d like to extend the oxsession class.
I created this module:
<?php
class ex_oxsession extends ex_oxsession_parent
{
/**
* Wizard session object
*
* @var object
*/
protected $_oWizard = null;
/**
* Returns wizard session object.
*
* @return sindowizard
*/
public function getWizard()
{
if ( $this->_oWizard === null ) {
//~ $sWizard = parent::getVar( $this->_getWizardName() );
$sWizard = parent::getVar( 'wizard' );
if ( $sWizard && $oWizard = unserialize( $sWizard ) ) {
$this->setWizard( $oWizard );
} else {
$this->setWizard( oxNew( 'sindowizard' ) );
}
}
return $this->_oWizard;
}
/**
* Sets wizard session object.
*
* @param object $oWizard wizard object
*
* @return null
*/
public function setWizard( $oWizard )
{
// sets basket session object
$this->_oWizard = $oWizard;
}
}
Of course it’s added via the system settings in modules!
Now I would like to access these methods from the current session object (available through the oxSuperCfg::getSession method).
However I only get the original oxsession class and not the extended ex_oxsession.
What am I doing wrong here?
Thanks,
Martin