TYPO3 CMS  TYPO3_6-2
RegExpFilter.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Form\Filter;
3 
23 
29  protected $regularExpression;
30 
36  public function __construct(array $arguments = array()) {
37  $this->setRegularExpression($arguments['expression']);
38  }
39 
46  public function setRegularExpression($expression) {
47  $this->regularExpression = (string) $expression;
48  }
49 
57  public function filter($value) {
58  return preg_replace($this->regularExpression, '', (string) $value);
59  }
60 
61 }
__construct(array $arguments=array())