Méthode |
Description |
|
__call ( string $method, array $args ) : mixed |
magic method used for method overloading |
|
__construct ( Doctrine_Table | null $table = null, boolean $isNewEntry = false ) |
constructor |
|
__toString ( ) : string |
magic method |
|
__unset ( string $name ) : void |
deletes a column or a related component. |
|
_index ( ) : integer |
the current instance counter used to generate unique ids for php objects. Contains the next identifier. |
|
assignDefaultValues ( boolean $overwrite = false ) : boolean |
setDefaultValues
sets the default values for records internal data |
|
assignIdentifier ( mixed $id = false ) : void |
assigns an identifier to the instance, for database storage |
|
assignInheritanceValues ( ) : void |
Assign the inheritance column values |
|
call ( string | array $callback, string $column ) : Doctrine_Record |
call |
|
cleanData ( array &$data ) : array |
cleanData
leaves the $data array only with values whose key is a field inside this
record and returns the values that were removed from $data. Also converts
any values of 'null' to objects of type Doctrine_Null. |
|
clearAccessor ( string $fieldName ) : void |
clears the accessor for a field name |
|
clearInvokedSaveHooks ( ) |
makes all the already used save hooks available again |
|
clearMutator ( string $fieldName ) : void |
clears the custom mutator for a field name |
|
clearRelated ( string $name = null ) : void |
Clear a related reference or all references |
|
columnCount ( ) : integer |
alias for @see count() |
|
construct ( ) : void |
construct
Empty template method to provide concrete Record classes with the possibility
to hook into the constructor procedure |
|
contains ( string $fieldName ) : boolean |
test whether a field (column, mapped value, related component) is accessible by @see get() |
|
copy ( boolean $deep = false ) : Doctrine_Record |
generates a copy of this object. Returns an instance of the same class of $this. |
|
coreSetRelated ( string $name, Doctrine_Record | Doctrine_Collection $value ) |
Places a related component in the object graph. |
|
count ( ) : integer |
implements Countable interface |
|
delete ( Doctrine_Connection $conn = null ) : boolean |
deletes this data access object and all the related composites
this operation is isolated by a transaction |
|
deleteNode ( ) |
used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE |
|
errorStack ( $stack = null ) : void | Doctrine_Validator_ErrorStack |
assigns the ErrorStack or returns it if called without parameters |
|
exists ( ) : boolean |
returns true if this record is saved in the database, otherwise false (it is transient) |
|
exportTo ( string $type, string $deep = true ) : string |
exports instance to a chosen format |
|
free ( boolean $deep = false ) |
Helps freeing the memory occupied by the entity. |
|
fromArray ( array $array, boolean $deep = true ) : void |
imports data from a php array |
|
get ( mixed $fieldName, boolean $load = true ) : mixed |
returns a value of a property or a related component |
|
getAccessor ( string $fieldName ) : string |
gets the custom accessor for a field name |
|
getAccessors ( ) : array |
gets all accessors for this component instance |
|
getData ( ) : array |
return all the internal data (columns) |
|
getErrorStack ( ) : Doctrine_Validator_ErrorStack |
retrieves the ErrorStack. To be called after a failed validation attempt (@see isValid()). |
|
getErrorStackAsString ( ) : string |
Get the record error stack as a human readable string. |
|
getIncremented ( ) : integer |
returns the value of autoincremented primary key of this object (if any) |
|
getIterator ( ) : Doctrine_Record_Iterator |
implements IteratorAggregate interface |
|
getLast ( ) : Doctrine_Record |
getLast
this method is used internally by Doctrine_Query
it is needed to provide compatibility between
records and collections |
|
getLastModified ( boolean $old = false ) : array |
returns an array of the modified fields from the last transaction. |
|
getModified ( boolean $old = false, boolean $last = false ) : array |
retrieves an array of modified fields and associated new values. |
|
getMutator ( $fieldName ) : string |
gets the custom mutator for a field name |
|
getMutators ( ) : array |
gets all custom mutators for this component instance |
|
getNode ( ) : Doctrine_Node |
getter for node associated with this record |
|
getOid ( ) : integer |
|
|
getPendingDeletes ( ) : array |
returns Doctrine_Record instances which need to be deleted on save |
|
getPendingUnlinks ( ) : array |
returns Doctrine_Record instances which need to be unlinked (deleting the relation) on save |
|
getPrepared ( array $array = [] ) : array |
Retrieves data prepared for a sql transaction. |
|
getReferences ( ) : array |
get all related components |
|
getTable ( ) : Doctrine_Table |
returns the table object for this record. |
|
hasAccessor ( string $fieldName, string $accessor = null ) : boolean |
sets a fieldname to have a custom accessor or check if a field has a custom
accessor defined (when called without $accessor parameter). |
|
hasAccessorMutator ( $fieldName, string $accessor, string $mutator ) |
Set a fieldname to have a custom accessor and mutator |
|
hasMappedValue ( string $name ) : boolean |
Tests whether a mapped value exists |
|
hasMutator ( string $fieldName, string $mutator = null ) : boolean |
sets a fieldname to have a custom mutator or check if a field has a custom
mutator defined (when called without the $mutator parameter) |
|
hasReference ( string $name ) : boolean |
tests whether a relation is set |
|
hasRelation ( mixed $fieldName ) : boolean |
checks existence of properties and related components |
|
hydrate ( array $data, boolean $overwriteLocalChanges = true ) : void |
hydrate
hydrates this object from given array |
|
identifier ( ) : array |
returns the primary keys of this object |
|
importFrom ( string $type, string $data, $deep = true ) : void |
imports data from a chosen format in the current instance |
|
invokeSaveHooks ( string $when, string $type, Doctrine_Event $event = null ) : Doctrine_Event |
calls a subclass hook. Idempotent until @see clearInvokedSaveHooks() is called. |
|
isInProxyState ( ) : boolean |
indicates whether record has any not loaded fields |
|
isModified ( boolean $deep = false ) : boolean |
returns true if this record was modified, otherwise false |
|
isValid ( boolean $deep = false, boolean $hooks = true ) : boolean |
tests validity of the record using the current data. |
|
link ( string $alias, array $ids, boolean $now = false ) : Doctrine_Record |
creates links from this record to given records |
|
linkInDb ( string $alias, array $ids ) : Doctrine_Record |
creates links from this record to given records now, querying the db |
|
load ( array $data = [] ) : boolean |
loads all the uninitialized properties from the database. |
|
loadReference ( string $name ) : void |
loadReference
loads a related component |
|
mapValue ( string $name, mixed $value = null ) : void |
sets a value that will be managed as if it were a field by magic accessor and mutators, @see get() and @see set(). |
|
merge ( $data, boolean $deep = true ) : void |
merges this record with an array of values
or with another existing instance of this object |
|
obtainReference ( string $name ) |
gets a related component and fails if it does not exist |
|
oid ( ) |
|
|
postDelete ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the deletion procedure. |
|
postHydrate ( $event ) |
Empty template method to provide Record classes with the ability to alter hydration
after it runs |
|
postInsert ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the saving procedure only when the record is going to be
inserted into the data store the first time. |
|
postSave ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the saving procedure. |
|
postSerialize ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the serializing procedure. |
|
postUnserialize ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the serializing procedure. |
|
postUpdate ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the saving procedure only when the record is going to be
updated. |
|
postValidate ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the validation procedure. |
|
preDelete ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the deletion procedure. |
|
preDqlDelete ( $event ) |
Empty template method to provide Record classes with the ability to alter DQL delete
queries at runtime |
|
preDqlSelect ( $event ) |
Empty template method to provide Record classes with the ability to alter DQL select
queries at runtime |
|
preDqlUpdate ( $event ) |
Empty template method to provide Record classes with the ability to alter DQL update
queries at runtime |
|
preHydrate ( $event ) |
Empty template method to provide Record classes with the ability to alter hydration
before it runs |
|
preInsert ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the saving procedure only when the record is going to be
inserted into the data store the first time. |
|
preSave ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the saving procedure. |
|
preSerialize ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the serializing procedure. |
|
preUnserialize ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the serializing procedure. |
|
preUpdate ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the saving procedure only when the record is going to be
updated. |
|
preValidate ( $event ) |
Empty template method to provide concrete Record classes with the possibility
to hook into the validation procedure. Useful for cleaning up data before
validating it. |
|
rawGet ( $fieldName ) : mixed |
returns the value of a property (column). If the property is not yet loaded
this method does NOT load it. |
|
reference ( string $name ) : Doctrine_Record | Doctrine_Collection |
gets a related component |
|
refresh ( boolean $deep = false ) : boolean |
refresh
refresh internal data from the database |
|
refreshRelated ( string $name = null ) : Doctrine_Record |
refresh
refresh data of related objects from the database |
|
relatedExists ( string $name ) : boolean |
Check if a related relationship exists. Will lazily load the relationship
in order to check. If the reference didn't already exist and it doesn't
exist in the database, the related reference will be cleared immediately. |
|
replace ( Doctrine_Connection $conn = null ) : integer |
executes a SQL REPLACE query. A REPLACE query is identical to a INSERT
query, except that if there is already a row in the table with the same
key field values, the REPLACE query just updates its values instead of
inserting a new row. |
|
resetPendingUnlinks ( ) : void |
resets pending record unlinks |
|
save ( Doctrine_Connection $conn = null ) : void |
applies the changes made to this object into database
this method is smart enough to know if any changes are made
and whether to use INSERT or UPDATE statement |
|
serialize ( ) : string |
serialize
this method is automatically called when an instance of Doctrine_Record is serialized |
|
serializeReferences ( boolean $bool = null ) : boolean |
Set whether or not to serialize references. |
|
set ( $fieldName, mixed $value, boolean $load = true ) : Doctrine_Record |
alters mapped values, properties and related components. |
|
setRelated ( string $alias, Doctrine_Access $coll ) |
set a related component |
|
setUp ( ) : void |
setUp
this method is used for setting up relations and attributes
it should be implemented by child classes |
|
state ( integer | string $state = null ) : null | integer |
assigns the state of this record or returns it if called without parameters |
|
synchronizeWithArray ( array $array, boolean $deep = true ) |
synchronizes a Doctrine_Record instance and its relations with data from an array |
|
toArray ( boolean $deep = true, boolean $prefixKey = false ) : array |
returns the record representation as an array |
|
toString ( ) : string |
__toString alias |
|
trySave ( Doctrine_Connection $conn = null ) : TRUE |
tries to save the object and all its related components. |
|
unlink ( string $alias, array $ids = [], boolean $now = false ) : Doctrine_Record |
unlink
removes links from this record to given records
if no ids are given, it removes all links |
|
unlinkInDb ( string $alias, array $ids = [] ) : Doctrine_Record |
unlink now the related components, querying the db |
|
unserialize ( string $serialized ) : void |
this method is automatically called everytime an instance is unserialized |
|
unshiftFilter ( Doctrine_Record_Filter $filter ) |
|
|