API Documentation

Zend/Filter/PregReplace.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Filter  
Version
$Id: PregReplace.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Filter_PregReplace

Package: Zend\Filter

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  
Used_by
\Zend_Filter_Word_Separator_Abstract  

Properties

Propertyprotectedmixed  $_matchPattern= 'null'

Pattern to match

Default valuenullDetails
Type
mixed
Propertyprotectedmixed  $_replacement= ''''

Replacement pattern

Default value''Details
Type
mixed
Propertyprotectedbool  $_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
Name Type Description
$options string|array
methodprotected_determineUnicodeSupport( ) : bool
static

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

Returns
Type Description
bool
methodpublicfilter( string $value ) : string

Perform regexp replacement as filter

Parameters
Name Type Description
$value string
Returns
Type Description
string
methodpublicgetMatchPattern( ) : string

Get currently set match pattern

Returns
Type Description
string
methodpublicgetReplacement( ) : string

Get currently set replacement value

Returns
Type Description
string
methodpublicisUnicodeSupportEnabled( ) : bool
static

Is Unicode Support Enabled Utility function

Returns
Type Description
bool
methodpublicsetMatchPattern( mixed $match ) : \Zend_Filter_PregReplace

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

Parameters
Name Type Description
$match mixed
  • same as the first argument of preg_replace
Returns
Type Description
\Zend_Filter_PregReplace
methodpublicsetReplacement( mixed $replacement ) : \Zend_Filter_PregReplace

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

Parameters
Name Type Description
$replacement mixed
  • same as the second argument of preg_replace
Returns
Type Description
\Zend_Filter_PregReplace
Documentation was generated by DocBlox 0.15.1.