. */ Doctrine::autoload('Doctrine_Query_Part'); /** * Doctrine_Query * * @package Doctrine * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @category Object Relational Mapping * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ * @author Konsta Vesterinen */ class Doctrine_Query_Set extends Doctrine_Query_Part { public function parse($dql) { $parts = Doctrine_Query::sqlExplode($dql, ','); $result = array(); foreach ($parts as $part) { $set = Doctrine_Query::sqlExplode($part, '='); $e = explode('.', trim($set[0])); $field = array_pop($e); $reference = implode('.', $e); $alias = $this->query->getTableAlias($reference); $result[] = $alias . '.' . $field . ' = ' . $set[1]; } return implode(', ', $result); } }