Hi,

I declare by "custom" row vars as follows (note the underscore):

protected $_tags = null; // array of tags from tags table linked to this row
protected $_user = null; // user row object (note: only id saved to cached
version)

then I have setter and getter for this custom variable.

My cached row objects have these custom variables saved with help of __sleep
function I have overriden:

/**
     * Store row class and selected properties in serialized object
     * __sleep() function is called when object is serialized
     *
     * @return array
     */
    public function __sleep()
    {
                // get custom variables from row object (in array format)
                $this->_setSleepProperties();

           // merge custom variables with Zend_Db_Row_Abstract __sleep()
result          
            return array_merge(parent::__sleep(), $this->_sleepProperties);
    }


br, Marko
-- 
View this message in context: 
http://n4.nabble.com/Reconnect-to-enhanced-row-tp1836951p1837430.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to