Filter/PregReplace.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Filter  
Version
$Id$  

\Zend_Filter_PregReplace

Package: Zend_Filter
Implements
Children
\Zend_Filter_Word_SeparatorToSeparator
\Zend_Filter_Word_Separator_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedmixed $_matchPattern = null
Pattern to match
Default valuenullDetails
Type
mixed
>VPropertyprotectedmixed $_replacement = ''
Replacement pattern
Default value''Details
Type
mixed
>VPropertyprotectedbool $_unicodeSupportEnabled = null
static
Is unicode enabled?
Default valuenullDetails
Type
bool

Methods

methodpublic__construct(string | array $options = null) : void

Constructor Supported options are 'match' => matching pattern 'replace' => replace with this

Parameters
NameTypeDescription
$optionsstring | array
methodprotected_determineUnicodeSupport() : bool
static

Method to cache the regex needed to determine if unicode support is available

Returns
TypeDescription
bool
methodpublicfilter(string $value) : string

Perform regexp replacement as filter

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
methodpublicgetMatchPattern() : string

Get currently set match pattern

Returns
TypeDescription
string
methodpublicgetReplacement() : string

Get currently set replacement value

Returns
TypeDescription
string
methodpublicisUnicodeSupportEnabled() : bool
static

Is Unicode Support Enabled Utility function

Returns
TypeDescription
bool
methodpublicsetMatchPattern(mixed $match) : \Zend_Filter_PregReplace

Set the match pattern for the regex being called within filter()

Parameters
NameTypeDescription
$matchmixed
  • same as the first argument of preg_replace
Returns
TypeDescription
\Zend_Filter_PregReplace
methodpublicsetReplacement(mixed $replacement) : \Zend_Filter_PregReplace

Set the Replacement pattern/string for the preg_replace called in filter

Parameters
NameTypeDescription
$replacementmixed
  • same as the second argument of preg_replace
Returns
TypeDescription
\Zend_Filter_PregReplace
Documentation was generated by phpDocumentor 2.2.0 .