[ 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/builder/om/ -> PeerBuilder.php (sommaire)

Base class for Peer-building classes. This class is designed so that it can be extended by a PHP4PeerBuilder in addition to the "standard" PHP5PeerBuilder and PHP5ComplexOMPeerBuilder.  Hence, this class should not have any actual template code in it -- simply basic logic & utility methods.

Author: Hans Lellelid <hans@xmpl.org>
Poids: 269 lignes (9 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 12 fonctions

  __construct()
  addSelectMethods()
  addGetOMClassMethod()
  addUpdateMethods()
  addRetrieveByPKMethods()
  addClassBody()
  isDeleteCascadeEmulationNeeded()
  isDeleteSetNullEmulationNeeded()
  isAddGenericMutators()
  isAddGenericAccessors()
  getRetrieveMethodName()
  getColumnName()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

__construct(Table $table)   X-Ref
Constructs a new PeerBuilder subclass.


addSelectMethods(&$script)   X-Ref
Adds the addSelectColumns(), doCount(), etc. methods.

param: string &$script The script will be modified in this method.

addGetOMClassMethod(&$script)   X-Ref
Adds the correct getOMClass() method, depending on whether this table uses inheritance.

param: string &$script The script will be modified in this method.

addUpdateMethods(&$script)   X-Ref
Adds the doInsert(), doUpdate(), doDeleteAll(), doValidate(), etc. methods.

param: string &$script The script will be modified in this method.

addRetrieveByPKMethods(&$script)   X-Ref
Adds the retrieveByPK() (and possibly retrieveByPKs()) method(s) appropriate for this class.

param: string &$script The script will be modified in this method.

addClassBody(&$script)   X-Ref
This method adds the contents of the generated class to the script.

This method contains the high-level logic that determines which methods
get generated.

Hint: Override this method in your subclass if you want to reorganize or
drastically change the contents of the generated peer class.

param: string &$script The script will be modified in this method.

isDeleteCascadeEmulationNeeded()   X-Ref
Whether the platform in use requires ON DELETE CASCADE emulation and whether there are references to this table.

return: boolean

isDeleteSetNullEmulationNeeded()   X-Ref
Whether the platform in use requires ON DELETE SETNULL emulation and whether there are references to this table.

return: boolean

isAddGenericMutators()   X-Ref
Whether to add the generic mutator methods (setByName(), setByPosition(), fromArray()).
This is based on the build property propel.addGenericMutators, and also whether the
table is read-only or an alias.

return: boolean

isAddGenericAccessors()   X-Ref
Whether to add the generic accessor methods (getByName(), getByPosition(), toArray()).
This is based on the build property propel.addGenericAccessors, and also whether the
table is an alias.

return: boolean

getRetrieveMethodName()   X-Ref
Returns the retrieveByPK method name to use for this table.
If the table is an alias then the method name looks like "retrieveTablenameByPK"
otherwise simply "retrieveByPK".

return: string

getColumnName(Column $col, $phpName = null)   X-Ref
COMPATIBILITY: Get the column constant name (e.g. PeerName::COLUMN_NAME).

This method exists simply because it belonged to the 'PeerBuilder' that this
class is replacing (because of name conflict more than actual functionality overlap).
When the new builder model is finished this method will be removed.

param: Column $col The column we need a name for.
param: string $phpName The PHP Name of the peer class. The 'Peer' is appended automatically.
return: string If $phpName is provided, then will return {$phpName}Peer::COLUMN_NAME; if not, just COLUMN_NAME.



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