From 99e815860a9f6a08365ac70759c4ff114e7830ca Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 15 Dec 2006 20:10:23 +0000 Subject: [PATCH] First draft for Doctrine_Hook --- lib/Doctrine/Hook.php | 84 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 lib/Doctrine/Hook.php diff --git a/lib/Doctrine/Hook.php b/lib/Doctrine/Hook.php new file mode 100644 index 000000000..2ba295f13 --- /dev/null +++ b/lib/Doctrine/Hook.php @@ -0,0 +1,84 @@ +. + */ + +/** + * Doctrine_Hook + * + * @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_Hook { + /** + * @var Doctrine_Query $query the base query + */ + private $query; + /** + * @var array $joins the optional joins of the base query + */ + private $joins; + + /** + * @param Doctrine_Query $query the base query + */ + public function __construct($query) { + if(is_string($query)) { + $this->query = new Doctrine_Query(); + $this->query->parseQuery($query); + } elseif($query instanceof Doctrine_Query) { + $this->query = $query; + } + } + public function leftJoin($dql) { + + } + public function innerJoin($dql) { + + } + public function hookWhere(array $params) { + + } + public function hookOrderby(array $params) { + + } + /** + * @param integer $limit + */ + public function hookLimit($limit) { + + } + /** + * @param integer $offset + */ + public function hookOffset($offset) { + + } + public function setWhereHooks() { + + } + public function setOrderByHooks() { + + } +}