/** * @return string */ public static function crudGetSource() { if (self::$crudSource === null) { // remove "CrudVo" $class = str_replace('CrudVo', '', get_called_class()); // transform from CamelCase and pluralise self::$crudSource = substr(self::snakeCaseString($class) . 's', 1); } return self::$crudSource; }
/** * @return string */ public static function crudGetSource() { if (!self::$crudSource) { // remove "Vo" $class = str_replace('Vo', '', get_called_class()); // transform from CamelCase and pluralise self::$crudSource = substr(strtolower(preg_replace('/([A-Z])/', '_\\1', $class)) . 's', 1); } return self::$crudSource; }