Skip to content
Browse files

remove Framework input form, replace with input filter only

  • Loading branch information...
1 parent 610c052 commit ca798c359185c7d80b2036ab1c0315b3d3d5dc8a @pmjones pmjones committed Feb 11, 2013
Showing with 17 additions and 36 deletions.
  1. +6 −0 config/default.php
  2. +10 −0 src/Aura/Framework/Input/Filter.php
  3. +0 −35 src/Aura/Framework/Input/Form.php
  4. +1 −1 tests/WiringTest.php
View
6 config/default.php
@@ -134,6 +134,12 @@
$di->params['Aura\Intl\TranslatorLocator']['factory'] = $di->lazyNew('Aura\Framework\Intl\TranslatorFactory');
/**
+ * Aura\Input\Form
+ */
+// use the framework filter
+$di->params['Aura\Input\Form']['filter'] = $di->lazyNew('Aura\Framework\Input\Filter');
+
+/**
* Aura\View\HelperLocator
*/
$di->params['Aura\View\HelperLocator']['registry']['assetHref'] = $di->lazyNew('Aura\Framework\View\Helper\AssetHref');
View
10 src/Aura/Framework/Input/Filter.php
@@ -0,0 +1,10 @@
+<?php
+namespace Aura\Framework\Input;
+
+use Aura\Input\FilterInterface;
+use Aura\Filter\RuleCollection;
+
+class Filter extends RuleCollection implements FilterInterface
+{
+ // do nothing other than extend and implement
+}
View
35 src/Aura/Framework/Input/Form.php
@@ -1,35 +0,0 @@
-<?php
-namespace Aura\Framework\Input;
-
-use Aura\Filter\RuleCollection;
-use Aura\Input\Form as InputForm;
-
-class Form extends InputForm
-{
- protected $filter;
-
- public function setFilter(RuleCollection $filter)
- {
- $this->filter = $filter;
- $this->initFilter();
- }
-
- protected function initFilter()
- {
- }
-
- public function getFilter()
- {
- return $this->filter;
- }
-
- public function filter()
- {
- return $this->filter->values($this->values);
- }
-
- public function getMessages($field = null)
- {
- return $this->filter->getMessages($field);
- }
-}
View
2 tests/WiringTest.php
@@ -28,14 +28,14 @@ public function testInstances()
$this->assertNewInstance('Aura\Framework\Cli\CacheConfig\Command');
$this->assertNewInstance('Aura\Framework\Cli\Factory');
$this->assertNewInstance('Aura\Framework\Cli\Server\Command');
- $this->assertNewInstance('Aura\Framework\Input\Form');
$this->assertNewInstance('Aura\Framework\View\Helper\AssetHref');
$this->assertNewInstance('Aura\Framework\View\Helper\Route');
$this->assertNewInstance('Aura\Framework\Web\Asset\Page');
$this->assertNewInstance('Aura\Framework\Web\Controller\AbstractPage', 'Aura\Framework\Web\MockPage');
$this->assertNewInstance('Aura\Framework\Web\Controller\Factory');
$this->assertNewInstance('Aura\Framework\Web\Controller\Front');
$this->assertNewInstance('Aura\Framework\Web\Renderer\AuraViewTwoStep');
+ $this->assertNewInstance('Aura\Input\Form');
$this->assertNewInstance('Aura\Intl\TranslatorLocator');
}

0 comments on commit ca798c3

Please sign in to comment.
Something went wrong with that request. Please try again.