Filter/PregReplace.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Filter
- Version
- $Id: PregReplace.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Filter_PregReplace
- Implements
- \Zend_Filter_Interface
- Children
- \Zend_Filter_Word_SeparatorToSeparator
- \Zend_Filter_Word_Separator_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods


__construct(string | array $options = null) : void
Constructor Supported options are 'match' => matching pattern 'replace' => replace with this
Name | Type | Description |
---|---|---|
$options | string | array |


_determineUnicodeSupport() : bool
Method to cache the regex needed to determine if unicode support is available
Type | Description |
---|---|
bool |


filter(string $value) : string
Perform regexp replacement as filter
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
string |
Exception | Description |
---|---|
\Zend_Filter_Exception | If filtering $value is impossible |


isUnicodeSupportEnabled() : bool
Is Unicode Support Enabled Utility function
Type | Description |
---|---|
bool |


setMatchPattern(mixed $match) : \Zend_Filter_PregReplace
Set the match pattern for the regex being called within filter()
Name | Type | Description |
---|---|---|
$match | mixed |
|
Type | Description |
---|---|
\Zend_Filter_PregReplace |


setReplacement(mixed $replacement) : \Zend_Filter_PregReplace
Set the Replacement pattern/string for the preg_replace called in filter
Name | Type | Description |
---|---|---|
$replacement | mixed |
|
Type | Description |
---|---|
\Zend_Filter_PregReplace |