public function clearEphemeral()
    {
        //~ Check ephemeral vars
        if ($this->has(self::EPHEMERAL)) {
            $ephemeral = $this->get(self::EPHEMERAL);
            foreach ($ephemeral as $name => &$var) {
                if (true === $var[self::ACTIVE]) {
                    $var[self::ACTIVE] = false;
                } else {
                    unset($ephemeral[$name]);
                }
            }
        } else {
            $ephemeral = array();
        }

        //~ Save in Session.
        $this->set(self::EPHEMERAL, $ephemeral);

        return $this;
    }
public function clearEphemeral()
    {
        //~ Check ephemeral vars
        if ($this->has(self::EPHEMERAL)) {
            $ephemeral = $this->get(self::EPHEMERAL);
            foreach ($ephemeral as $name => &$var) {
                if (true === $var[self::ACTIVE]) {
                    $var[self::ACTIVE] = false;
                } else {
                    unset($ephemeral[$name]);
                }
            }
        } else {
            $ephemeral = array();
        }

        //~ Save in Session.
        $this->set(self::EPHEMERAL, $ephemeral);

        return $this;
    }
public function clearEphemeral ( ) { //~ Check ephemeral vars if ( $ this -> has ( self :: EPHEMERAL ) ) { $ ephemeral = $ this -> get ( self :: EPHEMERAL ) ; foreach ( $ ephemeral as $ name => & $ var ) { if ( true === $ var [ self :: ACTIVE ] ) { $ var [ self :: ACTIVE ] = false ; } else { unset ( $ ephemeral [ $ name ] ) ; } } } else { $ ephemeral = array ( ) ; } //~ Save in Session. $ this -> set ( self :: EPHEMERAL , $ ephemeral ) ; return $ this ; }
Initialize Session. Remove old ephemeral var in Session.

@return self
Initialize Session . Remove old ephemeral var in Session .