Ejemplo n.º 1
0
 public function filter($value)
 {
     if (!is_string($this->_replaceSeparator)) {
         throw new \Exception('"' . $this->_replaceSeparator . '" is not a valid replaceSeparator.');
     }
     $result = str_replace(parent::getSeparator(), $this->_replaceSeparator, $value);
     return $result;
 }
Ejemplo n.º 2
0
 public function filter($value)
 {
     $word = array();
     $word = preg_split('/(?<=[a-z])(?=[A-Z])/x', $value);
     $count = count($word);
     for ($i = 0; $i < $count; ++$i) {
         $word[$i];
     }
     $result = implode(parent::getSeparator(), $word);
     return $result;
 }
Ejemplo n.º 3
0
 public function filter($value)
 {
     $word = array();
     $word = explode(parent::getSeparator(), $value);
     $count = count($word);
     for ($i = 0; $i < $count; ++$i) {
         $word[$i] = ucfirst($word[$i]);
     }
     $result = implode('', $word);
     return $result;
 }