Propel 2 API
Class

Propel\Generator\Model\PhpNameGenerator

class PhpNameGenerator implements NameGenerator

A <code>NameGenerator</code> implementation for PHP-esque names.

Methods

string generateName(string[] $inputs)

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

Details

at line 45
public string generateName(string[] $inputs)

<code>inputs</code> 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
script from name prior to generate the resulting name.
There are currently three methods:
<code>CONV_METHOD_NOCHANGE</code> - xml names are converted
directly to php names without modification.
<code>CONV_METHOD_UNDERSCORE</code> 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 <code>CONV_METHOD_PHPNAME</code> method
but will not lowercase any characters.

Parameters

string[] $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