Extend oxsession

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

I doubt, that the module overloading mechanism is alread active when “oxsession” ista ctivated very early in the shops’ life…

There are quite a bunch of classes which can’t be overloaded…

Hi,
i doubt it is good idea to extend oxsession for this functionality, but if you really want to do this, and oxsession is not extended by oxid module system, try adding this module in config.inc.php


      $this->aModules = array(
      'oxsession' => 'ex_oxsession'
    );