[ 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/templates/om/php4/ -> Object.tpl (sommaire)

Base class that represents a row from the '<?php echo $table->getName() ?>' table. <?php echo $table->getDescription() ?>

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

Définit 25 fonctions

  get()
  get()
  load()
  set()
  hydrate()
  buildPkeyCriteria()
  buildCriteria()
  set()
  set()
  init()
  add()
  count()
  translateFieldName()
  setByName()
  setByPosition()
  fromArray()
  delete()
  save()
  doSave()
  save()
  setPrimaryKey()
  setPrimaryKey()
  setPrimaryKey()
  getPrimaryKey()
  copy()

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

get({ <?php if ($col->isLazyLoad()   X-Ref
Get the [optionally formatted] `<?php echo $cfc ?>` 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) on success,

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.

returns: mixed boolean TRUE on success, PropelException - any underlying error will be wrapped and re-thrown.
return: void

set({ <?php if ($col->isLazyLoad()   X-Ref
Set the value of `<?php echo $cfc ?>`
<?php echo $col->getDescription() ?>

param: <?php echo $cptype  ?> $v new value
return: void

hydrate(&$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

set({ <?php if (count($fk->getLocalColumns()   X-Ref
Pas de description

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

translateFieldName($name, $fromType, $toType)   X-Ref
Pas de description

setByName($name, &$value, $type = TYPE_COLNAME)   X-Ref
Pas de description

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 = 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()   X-Ref
Removes this object from datastore and sets delete attribute.

return: mixed TRUE on success, PropelException on failure.

save()   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.

return: mixed TRUE on success, PropelException on failure.

doSave($con = null)   X-Ref
Pas de description

save()   X-Ref
Pas de description

setPrimaryKey($key)   X-Ref
Pas de description

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.
For now this function needs to exist because it's mandated in the Persistent
interface, and because other methods will attempt to set the primary key.

This should be removed in favor of more complex template work.

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.
It creates a new object filling in the simple attributes, but skipping any primary
keys that are defined for the table.

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.



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