[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 1472 lignes (45 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
PHP5BasicPeerBuilder:: (59 méthodes):
getClassname()
getPackage()
addIncludes()
addClassOpen()
addClassClose()
addStaticMapBuilderRegistration()
addConstantsAndAttributes()
addColumnNameConstants()
addFieldNamesAttribute()
addFieldKeysAttribute()
addGetFieldNames()
getFieldNames()
addTranslateFieldName()
translateFieldName()
addGetMapBuilder()
getMapBuilder()
addGetPhpNameMap()
getPhpNameMap()
addInheritanceColumnConstants()
addAlias()
alias()
addAddSelectColumns()
addSelectColumns()
addCountConstants()
addDoCount()
doCount()
addDoSelectOne()
doSelectOne()
addDoSelect()
doSelect()
addDoSelectRS()
doSelectRS()
addPopulateObjects()
populateObjects()
addGetOMClass_Inheritance()
getOMClass()
addGetOMClass_Inheritance_Abstract()
addGetOMClass_NoInheritance()
getOMClass()
addGetOMClass_NoInheritance_Abstract()
addDoInsert()
doInsert()
addDoUpdate()
doUpdate()
addDoDeleteAll()
doDeleteAll()
addDoDelete()
doDelete()
addDoOnDeleteCascade()
doOnDeleteCascade()
addDoOnDeleteSetNull()
doOnDeleteSetNull()
addDoValidate()
doValidate()
addRetrieveByPK_SinglePK()
addRetrieveByPKs_SinglePK()
addRetrieveByPK_MultiPK()
addGetTableMap()
getTableMap()
Classe: PHP5BasicPeerBuilder - X-Ref
Generates a PHP5 base Peer class for user object model (OM).getClassname() X-Ref |
Returns the name of the current class being built. return: string |
getPackage() X-Ref |
Gets the package for the [base] peer classes. return: string |
addIncludes(&$script) X-Ref |
Adds the include() statements for files that this class depends on or utilizes. param: string &$script The script will be modified in this method. |
addClassOpen(&$script) X-Ref |
Adds class phpdoc comment and openning of class. param: string &$script The script will be modified in this method. |
addClassClose(&$script) X-Ref |
Closes class. Adds closing brace at end of class and the static map builder registration code. param: string &$script The script will be modified in this method. |
addStaticMapBuilderRegistration(&$script) X-Ref |
Adds the static map builder registraction code. param: string &$script The script will be modified in this method. |
addConstantsAndAttributes(&$script) X-Ref |
Adds constant and variable declarations that go at the top of the class. param: string &$script The script will be modified in this method. |
addColumnNameConstants(&$script) X-Ref |
Adds the COLUMN_NAME contants to the class definition. param: string &$script The script will be modified in this method. |
addFieldNamesAttribute(&$script) X-Ref |
Pas de description |
addFieldKeysAttribute(&$script) X-Ref |
Pas de description |
addGetFieldNames(&$script) X-Ref |
Pas de description |
getFieldNames(\$type = BasePeer::TYPE_PHPNAME) X-Ref |
Returns an array of of field names. param: string \$type The type of fieldnames to return: return: array A list of field names |
addTranslateFieldName(&$script) X-Ref |
Pas de description |
translateFieldName(\$name, \$fromType, \$toType) X-Ref |
Translates a fieldname to another type param: string \$name field name param: string \$fromType One of the class type constants TYPE_PHPNAME, param: string \$toType One of the class type constants return: string translated name of the field. |
addGetMapBuilder(&$script) X-Ref |
Adds the getMapBuilder() method. param: string &$script The script will be modified in this method. |
getMapBuilder() X-Ref |
return: MapBuilder the map builder for this peer |
addGetPhpNameMap(&$script) X-Ref |
Adds the getPhpNameMap() method. param: string &$script The script will be modified in this method. |
getPhpNameMap() X-Ref |
Gets a map (hash) of PHP names to DB column names. return: array The PHP to DB name map for this peer |
addInheritanceColumnConstants(&$script) X-Ref |
Adds the CLASSKEY_* and CLASSNAME_* constants used for inheritance. param: string &$script The script will be modified in this method. |
addAlias(&$script) X-Ref |
Adds the alias() utility method. param: string &$script The script will be modified in this method. |
alias(\$alias, \$column) X-Ref |
Convenience method which changes table.column to alias.column. Using this method you can maintain SQL abstraction while using column aliases. <code> \$c->addAlias(\"alias1\", TablePeer::TABLE_NAME); \$c->addJoin(TablePeer::alias(\"alias1\", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); </code> param: string \$alias The alias for the current table. param: string \$column The column name for current table. (i.e. ".$this->getTable()->getPhpName()."Peer::COLUMN_NAME). return: string |
addAddSelectColumns(&$script) X-Ref |
Adds the addSelectColumns() method. param: string &$script The script will be modified in this method. |
addSelectColumns(Criteria \$criteria) X-Ref |
Add all the columns needed to create a new object. Note: any columns that were marked with lazyLoad=\"true\" in the XML schema will not be added to the select list and only loaded on demand. param: criteria object containing the columns to add. |
addCountConstants(&$script) X-Ref |
Adds the COUNT constants. param: string &$script The script will be modified in this method. |
addDoCount(&$script) X-Ref |
Adds the doCount() method. param: string &$script The script will be modified in this method. |
doCount(Criteria \$criteria, \$distinct = false, \$con = null) X-Ref |
Returns the number of rows matching criteria. param: Criteria \$criteria param: boolean \$distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). param: Connection \$con return: int Number of matching rows. |
addDoSelectOne(&$script) X-Ref |
Adds the doSelectOne() method. param: string &$script The script will be modified in this method. |
doSelectOne(Criteria \$criteria, \$con = null) X-Ref |
Method to select one object from the DB. param: Criteria \$criteria object used to create the SELECT statement. param: Connection \$con return: ".$this->getTable()->getPhpName()." |
addDoSelect(&$script) X-Ref |
Adds the doSelect() method. param: string &$script The script will be modified in this method. |
doSelect(Criteria \$criteria, \$con = null) X-Ref |
Method to do selects. param: Criteria \$criteria The Criteria object used to build the SELECT statement. param: Connection \$con return: array Array of selected Objects |
addDoSelectRS(&$script) X-Ref |
Adds the doSelectRS() method. param: string &$script The script will be modified in this method. |
doSelectRS(Criteria \$criteria, \$con = null) X-Ref |
Prepares the Criteria object and uses the parent doSelect() method to get a ResultSet. Use this method directly if you want to just get the resultset (instead of an array of objects). param: Criteria \$criteria The Criteria object used to build the SELECT statement. param: Connection \$con the connection to use return: ResultSet The resultset object with numerically-indexed fields. |
addPopulateObjects(&$script) X-Ref |
Adds the populateObjects() method. param: string &$script The script will be modified in this method. |
populateObjects(ResultSet \$rs) X-Ref |
The returned array will contain objects of the default type or objects that inherit from the default. |
addGetOMClass_Inheritance(&$script) X-Ref |
Adds a getOMClass() for non-abstract tables that have inheritance. param: string &$script The script will be modified in this method. |
getOMClass(ResultSet \$rs, \$colnum) X-Ref |
The returned Class will contain objects of the default type or objects that inherit from the default. param: ResultSet \$rs ResultSet with pointer to record containing om class. param: int \$colnum Column to examine for OM class information (first is 1). |
addGetOMClass_Inheritance_Abstract(&$script) X-Ref |
Adds a getOMClass() signature for abstract tables that have inheritance. param: string &$script The script will be modified in this method. |
addGetOMClass_NoInheritance(&$script) X-Ref |
Adds a getOMClass() for non-abstract tables that do note use inheritance. param: string &$script The script will be modified in this method. |
getOMClass() X-Ref |
The class that the Peer will make instances of. This uses a dot-path notation which is tranalted into a path relative to a location on the PHP include_path. (e.g. path.to.MyClass -> 'path/to/MyClass.php') return: string path.to.ClassName |
addGetOMClass_NoInheritance_Abstract(&$script) X-Ref |
Adds a getOMClass() signature for abstract tables that do not have inheritance. param: string &$script The script will be modified in this method. |
addDoInsert(&$script) X-Ref |
Adds the doInsert() method. param: string &$script The script will be modified in this method. |
doInsert(\$values, \$con = null) X-Ref |
Method perform an INSERT on the database, given a ".$table->getPhpName()." or Criteria object. param: mixed \$values Criteria or ".$table->getPhpName()." object containing data that is used to create the INSERT statement. param: Connection \$con the connection to use return: mixed The new primary key. |
addDoUpdate(&$script) X-Ref |
Adds the doUpdate() method. param: string &$script The script will be modified in this method. |
doUpdate(\$values, \$con = null) X-Ref |
Method perform an UPDATE on the database, given a ".$table->getPhpName()." or Criteria object. param: mixed \$values Criteria or ".$table->getPhpName()." object containing data that is used to create the UPDATE statement. param: Connection \$con The connection to use (specify Connection object to exert more control over transactions). return: int The number of affected rows (if supported by underlying database driver). |
addDoDeleteAll(&$script) X-Ref |
Adds the doDeleteAll() method. param: string &$script The script will be modified in this method. |
doDeleteAll(\$con = null) X-Ref |
Method to DELETE all rows from the ".$table->getName()." table. return: int The number of affected rows (if supported by underlying database driver). |
addDoDelete(&$script) X-Ref |
Adds the doDelete() method. param: string &$script The script will be modified in this method. |
doDelete(\$values, \$con = null) X-Ref |
Method perform a DELETE on the database, given a ".$table->getPhpName()." or Criteria object OR a primary key value. param: mixed \$values Criteria or ".$table->getPhpName()." object or primary key or array of primary keys param: Connection \$con the connection to use return: int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows |
addDoOnDeleteCascade(&$script) X-Ref |
Adds the doOnDeleteCascade() method, which provides ON DELETE CASCADE emulation. param: string &$script The script will be modified in this method. |
doOnDeleteCascade(Criteria \$criteria, Connection \$con) X-Ref |
This is a method for emulating ON DELETE CASCADE for DBs that don't support this feature (like MySQL or SQLite). This method is not very speedy because it must perform a query first to get the implicated records and then perform the deletes by calling those Peer classes. This method should be used within a transaction if possible. param: Criteria \$criteria param: Connection \$con return: int The number of affected rows (if supported by underlying database driver). |
addDoOnDeleteSetNull(&$script) X-Ref |
Adds the doOnDeleteSetNull() method, which provides ON DELETE SET NULL emulation. param: string &$script The script will be modified in this method. |
doOnDeleteSetNull(Criteria \$criteria, Connection \$con) X-Ref |
This is a method for emulating ON DELETE SET NULL DBs that don't support this feature (like MySQL or SQLite). This method is not very speedy because it must perform a query first to get the implicated records and then perform the deletes by calling those Peer classes. This method should be used within a transaction if possible. param: Criteria \$criteria param: Connection \$con return: void |
addDoValidate(&$script) X-Ref |
Adds the doValidate() method. param: string &$script The script will be modified in this method. |
doValidate(".$table->getPhpName() X-Ref |
Validates all modified columns of given ".$table->getPhpName()." object. If parameter \$columns is either a single column name or an array of column names than only those columns are validated. NOTICE: This does not apply to primary or foreign keys for now. param: ".$table->getPhpName()." \$obj The object to validate. param: mixed \$cols Column name or array of column names. return: mixed TRUE if all columns are valid or the error message of the first invalid column. |
addRetrieveByPK_SinglePK(&$script) X-Ref |
Adds the retrieveByPK method for tables with single-column primary key. param: string &$script The script will be modified in this method. |
addRetrieveByPKs_SinglePK(&$script) X-Ref |
Pas de description |
addRetrieveByPK_MultiPK(&$script) X-Ref |
Pas de description |
addGetTableMap(&$script) X-Ref |
Pas de description |
getTableMap() X-Ref |
Returns the TableMap related to this peer. This method is not needed for general use but a specific application could have a need. return: TableMap |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |