aboutsummaryrefslogtreecommitdiffstats
path: root/Model
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-11-11 09:02:08 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-11-11 09:02:08 +0100
commit5c358ff2ec1fbaed26b598e404b48b15bf7247de (patch)
tree87b3ed85e9b23454047a7fe3593e3aac6be09073 /Model
parentaf293fba3ffab0d8a8d0e353f288ad4ebcfc8dff (diff)
downloadPraspel-5c358ff2ec1fbaed26b598e404b48b15bf7247de.zip
Praspel-5c358ff2ec1fbaed26b598e404b48b15bf7247de.tar.gz
Praspel-5c358ff2ec1fbaed26b598e404b48b15bf7247de.tar.bz2
A specification can be binded to a class.
This is obligatory for dynamic and static resolutions.
Diffstat (limited to 'Model')
-rw-r--r--Model/Specification.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/Model/Specification.php b/Model/Specification.php
index ad348af..d6a85fd 100644
--- a/Model/Specification.php
+++ b/Model/Specification.php
@@ -94,6 +94,13 @@ class Specification extends Behavior {
*/
protected $_implicitVariables = array();
+ /**
+ * Binded class.
+ *
+ * @var \Hoa\Praspel\Model\Specification string
+ */
+ protected $_bindedClass = null;
+
/**
@@ -124,6 +131,32 @@ class Specification extends Behavior {
}
/**
+ * Bind this specification to a specific class.
+ * Obligatory for dynamic or static resolutions.
+ *
+ * @access public
+ * @return string
+ */
+ public function bindToClass ( $classname ) {
+
+ $old = $this->_bindedClass;
+ $this->_bindedClass = $classname;
+
+ return $old;
+ }
+
+ /**
+ * Get binded class.
+ *
+ * @access public
+ * @return string
+ */
+ public function getBindedClass ( ) {
+
+ return $this->_bindedClass;
+ }
+
+ /**
* Get identifier (fallback).
*
* @access protected