Browse Source

code style

tags/2.0.0-rc
Tobias Munk 10 years ago
parent
commit
a799eeb9ce
  1. 2
      framework/helpers/BaseInflector.php

2
framework/helpers/BaseInflector.php

@ -331,7 +331,7 @@ class BaseInflector
*/
public static function camel2id($name, $separator = '-', $strict = false)
{
$regex = ($strict)?'/[A-Z]/':'/(?<![A-Z])[A-Z]/';
$regex = $strict ? '/[A-Z]/' : '/(?<![A-Z])[A-Z]/';
if ($separator === '_') {
return trim(strtolower(preg_replace($regex, '_\0', $name)), '_');
} else {

Loading…
Cancel
Save