From a4795d63008a480c5c323e81bd139d21dcd8bd0c Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 12 Nov 2007 18:08:20 +0000 Subject: [PATCH] added hasImpl() --- lib/Doctrine/Configurable.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Configurable.php b/lib/Doctrine/Configurable.php index eb5b144de..cac9ed8f7 100644 --- a/lib/Doctrine/Configurable.php +++ b/lib/Doctrine/Configurable.php @@ -164,7 +164,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable public function getParamNamespaces() { - return array_keys($this->_params); + return array_keys($this->_params); } public function setParam($name, $value, $namespace = null) @@ -225,6 +225,18 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable } return $this->_impl[$template]; } + + + public function hasImpl($template) + { + if ( ! isset($this->_impl[$template])) { + if (isset($this->parent)) { + return $this->parent->hasImpl($template); + } + return false; + } + return true; + } /** * getCacheDriver