TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Form\Filter\RegExpFilter Class Reference
Inheritance diagram for TYPO3\CMS\Form\Filter\RegExpFilter:
TYPO3\CMS\Form\Filter\FilterInterface tx_form_System_Filter_Regexp

Public Member Functions

 __construct (array $arguments=array())
 
 setRegularExpression ($expression)
 
 filter ($value)
 

Protected Attributes

 $regularExpression
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Regular expression filter

Author
Patrick Broens patri.nosp@m.ck@p.nosp@m.atric.nosp@m.kbro.nosp@m.ens.n.nosp@m.l

Definition at line 22 of file RegExpFilter.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Form\Filter\RegExpFilter::__construct ( array  $arguments = array())

Constructor

Parameters
array$argumentsFilter configuration

Definition at line 36 of file RegExpFilter.php.

References TYPO3\CMS\Form\Filter\RegExpFilter\setRegularExpression().

Member Function Documentation

◆ filter()

TYPO3\CMS\Form\Filter\RegExpFilter::filter (   $value)

Return filtered value Remove all characters found in regular expression

Parameters
string$value
Returns
string

Implements TYPO3\CMS\Form\Filter\FilterInterface.

Definition at line 57 of file RegExpFilter.php.

◆ setRegularExpression()

TYPO3\CMS\Form\Filter\RegExpFilter::setRegularExpression (   $expression)

Set the regular expression

Parameters
string$expressionThe regular expression
Returns
void

Definition at line 46 of file RegExpFilter.php.

Referenced by TYPO3\CMS\Form\Filter\RegExpFilter\__construct().

Member Data Documentation

◆ $regularExpression

TYPO3\CMS\Form\Filter\RegExpFilter::$regularExpression
protected

Definition at line 29 of file RegExpFilter.php.