W3cubDocs

/Symfony 3.0

Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter

class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface

CamelCase to Underscore name converter.

Methods

__construct(array $attributes = null, bool $lowerCamelCase = true)
string normalize(string $propertyName)

Converts a property name to its normalized value.

string denormalize(string $propertyName)

Converts a property name to its denormalized value.

Details

public __construct(array $attributes = null, bool $lowerCamelCase = true)

Parameters

array $attributes The list of attributes to rename or null for all attributes.
bool $lowerCamelCase Use lowerCamelCase style.

public string normalize(string $propertyName)

Converts a property name to its normalized value.

Parameters

string $propertyName

Return Value

string

public string denormalize(string $propertyName)

Converts a property name to its denormalized value.

Parameters

string $propertyName

Return Value

string