1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34:
<?php
namespace Coast\Filter\Rule;
use Coast;
use Coast\Filter\Rule;
class CamelCaseSplit extends Rule
{
protected $_space;
public function __construct($space = ' ')
{
$this->space($space);
}
public function space($space = null)
{
if (func_num_args() > 0) {
$this->_space = $space;
return $this;
}
return $this->_space;
}
protected function _filter($value)
{
return Coast\str_camel_split($value, $this->_space);
}
}