[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
Base class that represents a row from the '<?php echo $table->getName() ?>' table. <?php echo $table->getDescription() ?>
Poids: | 1841 lignes (57 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
get({ <?php if ($col->isLazyLoad() X-Ref |
Get the [optionally formatted] `<?php echo $clo ?>` column value. <?php echo $col->getDescription() ?> param: string $format The date/time format string (either date()-style or strftime()-style). return: mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). |
get({ <?php if ($col->isLazyLoad() X-Ref |
Get the <?php echo $cfc ?> column value. <?php echo $col->getDescription() ?> return: <?php echo $cptype ?> |
load({ $c = $this->buildPkeyCriteria() X-Ref |
Load the value for the [lazy-load] `<?php echo $clo ?>` column. This method performs an additional query to return the value for the `<?php echo $clo ?>` column, since it is not populated by the hydrate() method. param: Connection return: void |
set({ <?php if ($col->isLazyLoad() X-Ref |
Set the value of `<?php echo $clo ?>` column. <?php echo $col->getDescription() ?> param: <?php echo ($col->getType() === PropelTypes::DATE || $col->getType() === PropelTypes::TIME || $col->getType() === PropelTypes::TIMESTAMP) ? 'mixed' : $cptype ?> $v new value return: void |
hydrate(ResultSet $rs, $startcol = 1) X-Ref |
Hydrates (populates) the object variables with values from the database resultset. An offset (1-based "start column") is specified so that objects can be hydrated with a subset of the columns in the resultset rows. This is needed, for example, for results of JOIN queries where the resultset row includes columns from two or more tables. param: ResultSet $rs The ResultSet class with cursor advanced to desired record pos. param: int $startcol 1-based offset column which indicates which restultset column to start with. return: int next starting column |
buildPkeyCriteria() X-Ref |
Builds a Criteria object containing the primary key for this object. Unlike buildCriteria() this method includes the primary key values regardless of whether or not they have been modified. return: Criteria The Criteria object containing value(s) for primary key(s). |
buildCriteria() X-Ref |
Build a Criteria object containing the values of all modified columns in this object. return: Criteria The Criteria object containing all modified values. |
set({ <?php foreach ($fk->getLocalColumns() X-Ref |
Declares an association between this object and a <?php echo $className ?> object param: <?php echo $className ?> $v return: void |
get({ include_once '<?php echo $tblFKPackagePath . $className ?>Peer.php'; if ($this-><?php echo $varName ?> === null && (<?php echo $conditional ?>) X-Ref |
Get the associated <?php echo $className ?> object param: Connection Optional Connection object. return: <?php echo $className ?> The associated <?php echo $className ?> object. |
set({ <?php if (count($fk->getLocalColumns() X-Ref |
Provides convenient way to set a relationship based on a key. e.g. <code>$bar->setFooKey($foo->getPrimaryKey())</code> Note: It is important that the xml schema used to create this class maintains consistency in the order of related columns between <?php echo $table->getName() ?> and <?php echo $tblFK->getName() ?>. If for some reason this is impossible, this method should be overridden in <code><?php echo $table->getPhpName() ?></code>. return: void |
init({ if ($this-><?php echo $collName ?> === null) X-Ref |
Temporary storage of <?php echo $collName ?> to save a possible db hit in the event objects are add to the collection, but the complete collection is never requested. return: void |
add({ $this-><?php echo $collName ?>[] = $l; $l->set<?php echo $table->getPhpName() X-Ref |
Method called to associate a <?php echo $tblFK->getPhpName() ?> object to this object through the <?php echo $className ?> foreign key attribute param: <?php echo $className ?> $l $className return: void |
count({ include_once '<?php echo $tblFKPackagePath . $className ?>Peer.php'; if ($criteria === null) X-Ref |
Returns the number of related <?php echo $relCol ?> param: Criteria $criteria param: boolean $distinct param: Connection $con |
get({ include_once '<?php echo $tblFKPackagePath . $className ?>Peer.php'; if ($criteria === null) X-Ref |
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this <?php echo $table->getPhpName() ?> has previously been saved, it will retrieve related <?php echo $relCol ?> from storage. If this <?php echo $table->getPhpName() ?> is new, it will return an empty collection or the current collection, the criteria is ignored on a new object. param: Connection $con param: Criteria $criteria |
get({ include_once '<?php echo $tblFKPackagePath . $className ?>Peer.php'; if ($criteria === null) X-Ref |
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this <?php echo $table->getPhpName() ?> is new, it will return an empty collection; or if this <?php echo $table->getPhpName() ?> has previously been saved, it will retrieve related <?php echo $relCol ?> from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in <?php echo $table->getPhpName() ?>. |
getFieldNames($type = self::TYPE_FIELDNAME) 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 |
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. |
getByName($name, $type = self::TYPE_COLNAME) X-Ref |
Retrieves a field from the object by name passed in as a string. param: string $name name param: string $type The type of fieldname the $name is of: return: mixed Value of field. |
getByPosition($pos) X-Ref |
Retrieves a field from the object by Position as specified in the xml schema. Zero-based. param: int $pos position in xml schema return: mixed Value of field at $pos |
toArray($keyType = self::TYPE_PHPNAME) X-Ref |
Exports the object as an array. You can specify the key type of the array by passing one of the class type constants. param: string $keyType One of the class type constants TYPE_PHPNAME, return: an associative array containing the field names (as keys) and field values |
setByName($name, $value, $type = self::TYPE_COLNAME) X-Ref |
Sets a field from the object by name passed in as a string. param: string $name peer name param: mixed $value field value param: string $type The type of fieldname the $name is of: return: void |
setByPosition($pos, $value) X-Ref |
Sets a field from the object by Position as specified in the xml schema. Zero-based. param: int $pos position in xml schema param: mixed $value field value return: void |
fromArray($arr, $keyType = self::TYPE_COLNAME) X-Ref |
Populates the object using an array. This method is just an alias for populateFromArray() param: array $arr An array to populate the object from. param: string $keyType The type of keys the array uses: return: void |
populateFromArray($arr, $keyType = self::TYPE_COLNAME) X-Ref |
Populates the object using an array. This is particularly useful when populating an object from one of the request arrays (e.g. $_POST). This method goes through the column names, checking to see whether a matching key exists in populated array. If so the setByName() method is called for that column. You can specify the key type of the array by additionally passing one of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. The default key type is the (peer) column name (e.g. 'book.AUTHOR_ID') param: array $arr An array to populate the object from. param: string $keyType The type of keys the array uses. return: void |
delete($con = null) X-Ref |
Removes this object from datastore and sets delete attribute. param: Connection $con return: void |
save($con = null) X-Ref |
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. This method wraps the doSave() worker method in a transaction. param: Connection $con return: void |
doSave($con) X-Ref |
Pas de description |
save($con = null) X-Ref |
Pas de description |
validate($columns = null) X-Ref |
Pas de description |
doValidate() X-Ref |
This function performs the validation work for complex object models. In addition to checking the current object, all related objects will also be validated. If all pass then <code>true</code> is returned; otherwise an aggreagated array of ValidationFailed objects will be returned. return: mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise. |
setPrimaryKey($key) X-Ref |
Set the PrimaryKey. param: mixed <?php echo $clo ?> Primary key. return: void |
setPrimaryKey($keys) X-Ref |
Set the PrimaryKey. param: array $keys The elements of the composite key (order must match the order in XML file). return: void |
setPrimaryKey($pk) X-Ref |
Dummy primary key setter. This function only exists to preserve backwards compatibility. It is no longer needed or required by the Persistent interface. It will be removed in next BC-breaking release of Propel. |
getPrimaryKey() X-Ref |
Returns an id that differentiates this object from others of its class. return: <?php if (count($table->getPrimaryKey()) === 0) { echo "null"; } elseif (count($table->getPrimaryKey()) > 1) { echo "array"; } else { $pkeys = $table->getPrimaryKey(); echo $pkeys[0]->getPhpType(); } ?> |
copy(<?php if ($complexObjectModel) X-Ref |
Makes a copy of this object that will be inserted as a new row in table when saved. It creates a new object filling in the simple attributes, but skipping any primary keys that are defined for the table. <?php if ($complexObjectModel) { ?> If desired, this method can also make copies of all associated (fkey referrers) objects. param: boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. return: <?php echo $table->getPhpName() ?> Clone of current object. |
getPeer() X-Ref |
returns a peer instance associated with this om. Since Peer classes are not to have any instance attributes, this method returns the same instance for all member of this class. The method could therefore be static, but this would prevent one from overriding the behavior. return: <?php echo $table->getPhpName() ?>Peer |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |