1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/Doctrine/Query/From.php

27 lines
704 B
PHP
Raw Normal View History

2006-06-30 03:04:39 +04:00
<?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):'';
}
}
?>