Filter/Word/SeparatorToSeparator.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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Filter  
Version
$Id: SeparatorToSeparator.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Filter_Word_SeparatorToSeparator

Package: Zend\Filter
Parent(s)
\Zend_Filter_PregReplace
Children
\Zend_Filter_Word_SeparatorToDash
\Zend_Filter_Word_UnderscoreToSeparator
\Zend_Filter_Word_DashToUnderscore
\Zend_Filter_Word_UnderscoreToDash
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedmixed $_matchPattern = null
inherited
Pattern to match
Inherited from: \Zend_Filter_PregReplace::$$_matchPattern
Default valuenullDetails
Type
mixed
Inherited_from
\Zend_Filter_PregReplace::$$_matchPattern  
>VPropertyprotectedmixed $_replacement = ''
inherited
Replacement pattern
Inherited from: \Zend_Filter_PregReplace::$$_replacement
Default value''Details
Type
mixed
Inherited_from
\Zend_Filter_PregReplace::$$_replacement  
>VPropertyprotected$_replacementSeparator = null
Default valuenullDetails
Type
n/a
>VPropertyprotected$_searchSeparator = null
Default valuenullDetails
Type
n/a
>VPropertyprotectedbool $_unicodeSupportEnabled = null
staticinherited
Is unicode enabled?
Inherited from: \Zend_Filter_PregReplace::$$_unicodeSupportEnabled
Default valuenullDetails
Type
bool
Inherited_from
\Zend_Filter_PregReplace::$$_unicodeSupportEnabled  

Methods

methodpublic__construct(string $searchSeparator = ' ',  $replacementSeparator = '-') : void

Constructor

Parameters
NameTypeDescription
$searchSeparatorstring

Seperator to search for

$replacementSeparator
methodprotected_determineUnicodeSupport() : bool
staticinherited

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

Inherited from: \Zend_Filter_PregReplace::_determineUnicodeSupport()
Returns
TypeDescription
bool
methodprotected_separatorToSeparatorFilter(string $value) : string

Do the real work, replaces the seperator to search for with the replacement seperator

Returns the replaced string

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
methodpublicfilter(string $value) : string

Defined by Zend_Filter_Interface

Returns the string $value, replacing the searched seperators with the defined ones

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
Throws
ExceptionDescription
\Zend_Filter_ExceptionIf filtering $value is impossible
methodpublicgetMatchPattern() : string
inherited

Get currently set match pattern

Inherited from: \Zend_Filter_PregReplace::getMatchPattern()
Returns
TypeDescription
string
methodpublicgetReplacement() : string
inherited

Get currently set replacement value

Inherited from: \Zend_Filter_PregReplace::getReplacement()
Returns
TypeDescription
string
methodpublicgetReplacementSeparator() : string

Returns the actual set seperator which replaces the searched one

Returns
TypeDescription
string
methodpublicgetSearchSeparator() : string

Returns the actual set seperator to search for

Returns
TypeDescription
string
methodpublicisUnicodeSupportEnabled() : bool
staticinherited

Is Unicode Support Enabled Utility function

Inherited from: \Zend_Filter_PregReplace::isUnicodeSupportEnabled()
Returns
TypeDescription
bool
methodpublicsetMatchPattern(mixed $match) : \Zend_Filter_PregReplace
inherited

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

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

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

Inherited from: \Zend_Filter_PregReplace::setReplacement()
Parameters
NameTypeDescription
$replacementmixed
  • same as the second argument of preg_replace
Returns
TypeDescription
\Zend_Filter_PregReplace
methodpublicsetReplacementSeparator(string $separator) : \Zend_Filter_Word_SeparatorToSeparator

Sets a new seperator which replaces the searched one

Parameters
NameTypeDescription
$separatorstring

Seperator which replaces the searched one

Returns
TypeDescription
\Zend_Filter_Word_SeparatorToSeparator
Details
Fluent
This method is part of a fluent interface and will return the same instance  
methodpublicsetSearchSeparator(string $separator) : \Zend_Filter_Word_SeparatorToSeparator

Sets a new seperator to search for

Parameters
NameTypeDescription
$separatorstring

Seperator to search for

Returns
TypeDescription
\Zend_Filter_Word_SeparatorToSeparator
Details
Fluent
This method is part of a fluent interface and will return the same instance  
Documentation was generated by phpDocumentor 2.0.0a12.