Extract from Doctrine_Record

    /**
     * returns an array of modified fields and associated values
     * @return array
     * @todo What about a better name? getModifiedFields?
     */
    public function getModified()
    {   
        $a = array();
 
        foreach ($this->_modified as $k => $v) {
            $a[$v] = $this->_data[$v];
        }
        return $a;
    }
 
    /**
     * REDUNDANT?
     */
    public function modifiedFields()
    {   
        $a = array();
 
        foreach ($this->_modified as $k => $v) {
            $a[$v] = $this->_data[$v];
        }
        return $a;
    }
This entry was posted in PHP, Symfony and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Posted 2010-02-28 at 2125 | Permalink
    Opera 10.10 Opera 10.10 GNU/Linux GNU/Linux
    Doctrine 1.2? (there are no such “Doctrine_Record::modifiedFields()” in 1.2.1)
  2. Posted 2010-02-28 at 2140 | Permalink
    Firefox 3.6 Firefox 3.6 Gentoo x64 Gentoo x64
    Doctrine 1.0. I guess it’s fixed now ;-).

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*
*