public function snakeCase($value, $delimiter = '_')
    {
        if (!ctype_lower($value)) {
            $value = strtolower(preg_replace('/(.)(?=[A-Z])/', '$1'.$delimiter, $value));
            $value = preg_replace('/\s+/', '', $value);
        }

        return $value;
    }
public function snakeCase($value, $delimiter = '_')
    {
        if (!ctype_lower($value)) {
            $value = strtolower(preg_replace('/(.)(?=[A-Z])/', '$1'.$delimiter, $value));
            $value = preg_replace('/\s+/', '', $value);
        }

        return $value;
    }
public function snakeCase ( $ value , $ delimiter = '_' ) { if ( ! ctype_lower ( $ value ) ) { $ value = strtolower ( preg_replace ( '/(.)(?=[A-Z])/' , '$1' . $ delimiter , $ value ) ) ; $ value = preg_replace ( '/\s+/' , '' , $ value ) ; } return $ value ; }
Convert camelCase methods to snake_case params.

@param string $value
@param string $delimiter

@return string
Convert camelCase methods to snake_case params .