aboutsummaryrefslogtreecommitdiffstats
path: root/Model/Variable.php
diff options
context:
space:
mode:
Diffstat (limited to 'Model/Variable.php')
-rw-r--r--Model/Variable.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/Model/Variable.php b/Model/Variable.php
index 48104f5..06be3dc 100644
--- a/Model/Variable.php
+++ b/Model/Variable.php
@@ -79,6 +79,13 @@ class Variable
protected $_name = null;
/**
+ * Local (let) or not.
+ *
+ * @var \Hoa\Praspel\Model\Variable bool
+ */
+ protected $_local = false;
+
+ /**
* Clause that contains this variable.
*
* @var \Hoa\Praspel\Model\Clause object
@@ -143,13 +150,15 @@ class Variable
*
* @access public
* @param string $name Name.
+ * @param bool $local Local.
* @param \Hoa\Praspel\Model\Clause $clause Clause.
* @return void
* @throw \Hoa\Praspel\Exception\Model
*/
- public function __construct ( $name, Clause $clause ) {
+ public function __construct ( $name, $local, Clause $clause ) {
$this->_name = $name;
+ $this->_local = $local;
$this->_clause = $clause;
$this->_refDomains = &$this->_domains;
@@ -409,6 +418,17 @@ class Variable
}
/**
+ * Check if the variable is local (let) or not.
+ *
+ * @access public
+ * @return bool
+ */
+ public function isLocal ( ) {
+
+ return $this->_local;
+ }
+
+ /**
* Get constraints.
*
* @access public