1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/Doctrine/Query/From.php
2006-06-29 23:04:39 +00:00

27 lines
704 B
PHP

<?php
require_once("Part.php");
class Doctrine_Query_From extends Doctrine_Query_Part {
/**
* DQL FROM PARSER
* parses the from part of the query string
* @param string $str
* @return void
*/
final public function parse($str) {
foreach(Doctrine_Query::bracketExplode(trim($str),",", "(",")") as $reference) {
$reference = trim($reference);
$a = explode(".",$reference);
$field = array_pop($a);
$table = $this->query->load($reference);
}
}
public function __toString() {
return ( ! empty($this->parts))?implode(", ", $this->parts):'';
}
}
?>