Class

PhpNameGenerator

class PhpNameGenerator implements NameGenerator

A NameGenerator implementation for PHP-esque names.

Methods

string generateName(array $inputs)

inputs should consist of two (three) elements, the original name of the database element and the method for generating the name.

Details

at line 49
public string generateName(array $inputs)

inputs should consist of two (three) elements, the original name of the database element and the method for generating the name.

The optional third element may contain a prefix that will be stript from name prior to generate the resulting name. There are currently three methods: CONVMETHODNOCHANGE - xml names are converted directly to php names without modification. CONVMETHODUNDERSCORE will capitalize the first letter, remove underscores, and capitalize each letter before an underscore. All other letters are lowercased. "phpname" works the same as the CONVMETHODPHPNAME method but will not lowercase any characters.

Parameters

array $inputs list expected to contain two (optional: three) parameters, element 0 contains name to convert, element 1 contains method for conversion, optional element 2 contains prefix to be striped from name

Return Value

string The generated name.

See also

NameGenerator