aboutsummaryrefslogtreecommitdiffstats
path: root/Model/Behavior.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-10 14:58:35 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-10 14:58:35 +0200
commit467d39b9047547ff94a37fdcb8805623ef09d542 (patch)
tree9fbb23471e3718c35546d4b6ff0a1e959a18459d /Model/Behavior.php
parentd2f8208f2951691b550d912b5f725d2371af9e9a (diff)
downloadPraspel-467d39b9047547ff94a37fdcb8805623ef09d542.zip
Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.tar.gz
Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.tar.bz2
Add the @default clause!
The default clause represents a default/else behavior.
Diffstat (limited to 'Model/Behavior.php')
-rw-r--r--Model/Behavior.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/Model/Behavior.php b/Model/Behavior.php
index 6279cbc..d4d6854 100644
--- a/Model/Behavior.php
+++ b/Model/Behavior.php
@@ -74,6 +74,11 @@ from('Hoa')
-> import('Praspel.Model.Invariant')
/**
+ * \Hoa\Praspel\Model\DefaultBehavior
+ */
+-> import('Praspel.Model.DefaultBehavior')
+
+/**
* \Hoa\Praspel\Model\Collection
*/
-> import('Praspel.Model.Collection')
@@ -116,7 +121,8 @@ class Behavior extends Clause {
'ensures',
'throwable',
'invariant',
- 'behavior'
+ 'behavior',
+ 'default'
);
/**
@@ -189,6 +195,10 @@ class Behavior extends Clause {
);
break;
+ case 'default':
+ $handle = new DefaultBehavior($this);
+ break;
+
case 'description':
$handle = new Description($this);
break;