Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul M. Jones
committed
Feb 6, 2013
1 parent
3523b9e
commit bec76f7
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?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() | ||
This comment has been minimized.
Sorry, something went wrong. |
||
{ | ||
return $this->filter->values($this->values); | ||
} | ||
|
||
public function getMessages() | ||
{ | ||
return $this->filter->getMessages(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pmjones wondering whether it is a good idea to make it as
isValid()
. That means to check the form is valid or not. I understand you will say it has not just validation , but there is filtering also. ButisValid
sounds much better .