aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-01-03 16:51:46 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-01-03 16:51:46 +0100
commit4cc9c27d51073acffd750e3c4298cdab9bdd4c2f (patch)
tree2b7d5f9efccdb5c79fd5658a0b5819370b2219de
parentdf03b1abd9c0aa9cd900fd05a8c9d21249d63aa5 (diff)
downloadPraspel-4cc9c27d51073acffd750e3c4298cdab9bdd4c2f.zip
Praspel-4cc9c27d51073acffd750e3c4298cdab9bdd4c2f.tar.gz
Praspel-4cc9c27d51073acffd750e3c4298cdab9bdd4c2f.tar.bz2
Use a default assertion checker when necessary.
-rw-r--r--Preambler/EncapsulationShunter.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/Preambler/EncapsulationShunter.php b/Preambler/EncapsulationShunter.php
index 6e38f7e..ccd5104 100644
--- a/Preambler/EncapsulationShunter.php
+++ b/Preambler/EncapsulationShunter.php
@@ -44,6 +44,11 @@ from('Hoa')
-> import('Praspel.Exception.Preambler')
/**
+ * \Hoa\Praspel\AssertionChecker
+ */
+-> import('Praspel.AssertionChecker.~')
+
+/**
* \Hoa\Praspel
*/
-> import('Praspel.~');
@@ -140,11 +145,7 @@ class EncapsulationShunter {
$assertionChecker = $this->getAssertionChecker();
if(null === $assertionChecker)
- throw new \Hoa\Praspel\Exception\Preambler(
- 'We need the assertion checker to generate data to ' .
- 'instanciate the class. Please, call the ' .
- '%s::%s method.',
- 1, array(get_class($this), 'setAssertionChecker'));
+ $assertionChecker = '\Hoa\Praspel\AssertionChecker';
$arguments = $assertionChecker::generateData($registry[$id]);
$_object = $reflectionClass->newInstanceArgs($arguments);