[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/propel-generator/classes/propel/engine/database/model/ -> PhpNameGenerator.php (sommaire)

(pas de description)

Poids: 131 lignes (5 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

PhpNameGenerator:: (4 méthodes):
  generateName()
  underscoreMethod()
  phpnameMethod()
  nochangeMethod()


Classe: PhpNameGenerator  - X-Ref

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

generateName($inputs)   X-Ref
<code>inputs</code> should consist of two elements, the
original name of the database element and the method for
generating the 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.

param: inputs list expected to contain two parameters, element
return: The generated name.

underscoreMethod($schemaName)   X-Ref
Converts a database schema name to php object name.  Removes
<code>STD_SEPARATOR_CHAR</code>, capitilizes first letter of
name and each letter after the <code>STD_SEPERATOR</code>,
converts the rest of the letters to lowercase.

my_CLASS_name -> MyClassName

param: string $schemaName name to be converted.
return: string Converted name.

phpnameMethod($schemaName)   X-Ref
Converts a database schema name to php object name.  Operates
same as underscoreMethod but does not convert anything to
lowercase.

my_CLASS_name -> MyCLASSName

param: string $schemaName name to be converted.
return: string Converted name.

nochangeMethod($name)   X-Ref
Converts a database schema name to PHP object name.  In this
case no conversion is made.

param: string $name name to be converted.
return: string The <code>name</code> parameter, unchanged.



Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7