Filter/Word/UnderscoreToSeparator.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: UnderscoreToSeparator.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Filter_Word_UnderscoreToSeparator
- Parent(s)
- \Zend_Filter_Word_SeparatorToSeparator < \Zend_Filter_PregReplace
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


mixed $_matchPattern = null
null
Details- Type
- mixed
- Inherited_from
- \Zend_Filter_PregReplace::$$_matchPattern
- Inherited_from
- \Zend_Filter_Word_SeparatorToSeparator::$$_matchPattern


mixed $_replacement = ''
''
Details- Type
- mixed
- Inherited_from
- \Zend_Filter_PregReplace::$$_replacement
- Inherited_from
- \Zend_Filter_Word_SeparatorToSeparator::$$_replacement


$_replacementSeparator = null
null
Details- Type
- n/a
- Inherited_from
- \Zend_Filter_Word_SeparatorToSeparator::$$_replacementSeparator


$_searchSeparator = null
null
Details- Type
- n/a
- Inherited_from
- \Zend_Filter_Word_SeparatorToSeparator::$$_searchSeparator


bool $_unicodeSupportEnabled = null
null
Details- Type
- bool
- Inherited_from
- \Zend_Filter_PregReplace::$$_unicodeSupportEnabled
- Inherited_from
- \Zend_Filter_Word_SeparatorToSeparator::$$_unicodeSupportEnabled
Methods


__construct( $replacementSeparator = ' ') : void
Constructor
Name | Type | Description |
---|---|---|
$replacementSeparator |


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


_separatorToSeparatorFilter(string $value) : string
Do the real work, replaces the seperator to search for with the replacement seperator
Inherited from: \Zend_Filter_Word_SeparatorToSeparator::_separatorToSeparatorFilter()Returns the replaced string
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
string |


filter(string $value) : string
Defined by Zend_Filter_Interface
Inherited from: \Zend_Filter_Word_SeparatorToSeparator::filter()Returns the string $value, replacing the searched seperators with the defined ones
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
string |
Exception | Description |
---|---|
\Zend_Filter_Exception | If filtering $value is impossible |


getMatchPattern() : string
Get currently set match pattern
Inherited from: \Zend_Filter_PregReplace::getMatchPattern()\Zend_Filter_Word_SeparatorToSeparator::getMatchPattern()Type | Description |
---|---|
string |


getReplacement() : string
Get currently set replacement value
Inherited from: \Zend_Filter_PregReplace::getReplacement()\Zend_Filter_Word_SeparatorToSeparator::getReplacement()Type | Description |
---|---|
string |


getReplacementSeparator() : string
Returns the actual set seperator which replaces the searched one
Inherited from: \Zend_Filter_Word_SeparatorToSeparator::getReplacementSeparator()Type | Description |
---|---|
string |


getSearchSeparator() : string
Returns the actual set seperator to search for
Inherited from: \Zend_Filter_Word_SeparatorToSeparator::getSearchSeparator()Type | Description |
---|---|
string |


isUnicodeSupportEnabled() : bool
Is Unicode Support Enabled Utility function
Inherited from: \Zend_Filter_PregReplace::isUnicodeSupportEnabled()\Zend_Filter_Word_SeparatorToSeparator::isUnicodeSupportEnabled()Type | Description |
---|---|
bool |


setMatchPattern(mixed $match) : \Zend_Filter_PregReplace
Set the match pattern for the regex being called within filter()
Inherited from: \Zend_Filter_PregReplace::setMatchPattern()\Zend_Filter_Word_SeparatorToSeparator::setMatchPattern()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
Inherited from: \Zend_Filter_PregReplace::setReplacement()\Zend_Filter_Word_SeparatorToSeparator::setReplacement()Name | Type | Description |
---|---|---|
$replacement | mixed |
|
Type | Description |
---|---|
\Zend_Filter_PregReplace |


setReplacementSeparator(string $separator) : \Zend_Filter_Word_UnderscoreToSeparator
Sets a new seperator which replaces the searched one
Inherited from: \Zend_Filter_Word_SeparatorToSeparator::setReplacementSeparator()Name | Type | Description |
---|---|---|
$separator | string | Seperator which replaces the searched one |
Type | Description |
---|---|
\Zend_Filter_Word_UnderscoreToSeparator |
- Fluent
- This method is part of a fluent interface and will return the same instance


setSearchSeparator(string $separator) : \Zend_Filter_Word_UnderscoreToSeparator
Sets a new seperator to search for
Inherited from: \Zend_Filter_Word_SeparatorToSeparator::setSearchSeparator()Name | Type | Description |
---|---|---|
$separator | string | Seperator to search for |
Type | Description |
---|---|
\Zend_Filter_Word_UnderscoreToSeparator |
- Fluent
- This method is part of a fluent interface and will return the same instance