Filter/Word/SeparatorToSeparator.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: SeparatorToSeparator.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Filter_Word_SeparatorToSeparator
- 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

mixed $_matchPattern = nullnullDetails- Type
- mixed
- Inherited_from
- \Zend_Filter_PregReplace::$$_matchPattern

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

bool $_unicodeSupportEnabled = nullnullDetails- Type
- bool
- Inherited_from
- \Zend_Filter_PregReplace::$$_unicodeSupportEnabled
Methods

__construct(string $searchSeparator = ' ', $replacementSeparator = '-') : voidConstructor
| Name | Type | Description |
|---|---|---|
| $searchSeparator | string | Seperator to search for |
| $replacementSeparator |

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

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

filter(string $value) : stringDefined by Zend_Filter_Interface
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 |

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

getReplacementSeparator() : stringReturns the actual set seperator which replaces the searched one
| Type | Description |
|---|---|
| string |

getSearchSeparator() : stringReturns the actual set seperator to search for
| Type | Description |
|---|---|
| string |

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

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

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

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

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