|
Doctrine 1.2.4
|
Inherits Doctrine_Record.
Public Member Functions | |
| __call ($method, $args) | |
| __get ($name) | |
| __isset ($name) | |
| __set ($name, $value) | |
| __toString () | |
| __unset ($name) | |
| actAs ($tpl, array $options=array()) | |
| add ($value) | |
| addListener ($listener, $name=null) | |
| assignDefaultValues ($overwrite=false) | |
| assignIdentifier ($id=false) | |
| assignInheritanceValues () | |
| attribute ($attr, $value) | |
| bind ($name, $resource) | |
| bindQueryParts (array $queryParts) | |
| call ($callback, $column) | |
| check ($constraint, $name=null) | |
| cleanData (&$data) | |
| clearAccessor ($fieldName) | |
| clearInvokedSaveHooks () | |
| clearMutator ($fieldName) | |
| clearRelated ($name=null) | |
| columnCount () | |
| construct () | |
| contains ($fieldName) | |
| copy ($deep=false) | |
| coreSetRelated ($name, $value) | |
| count () | |
| delete (Doctrine_Connection $conn=null) | |
| deleteNode () | |
| errorStack ($stack=null) | |
| exists () | |
| exportTo ($type, $deep=true) | |
| free ($deep=false) | |
| fromArray (array $array, $deep=true) | |
| get ($offset) | |
| get ($fieldName, $load=true) | |
| getAccessor ($fieldName) | |
| getAccessors () | |
| getData () | |
| getErrorStack () | |
| getErrorStackAsString () | |
| getIncremented () | |
| getIterator () | |
| getLast () | |
| getLastModified ($old=false) | |
| getListener () | |
| getLocator () | |
| getModified ($old=false, $last=false) | |
| getMutator ($fieldName) | |
| getMutators () | |
| getNode () | |
| getOid () | |
| getPendingDeletes () | |
| getPendingUnlinks () | |
| getPrepared (array $array=array()) | |
| getReferences () | |
| getTable () | |
| hasAccessor ($fieldName, $accessor=null) | |
| hasAccessorMutator ($fieldName, $accessor, $mutator) | |
| hasColumn ($name, $type=null, $length=null, $options=array()) | |
| hasColumns (array $definitions) | |
| hasMany () | |
| hasMappedValue ($name) | |
| hasMutator ($fieldName, $mutator=null) | |
| hasOne () | |
| hasReference ($name) | |
| hasRelation ($fieldName) | |
| hydrate (array $data, $overwriteLocalChanges=true) | |
| identifier () | |
| importFrom ($type, $data, $deep=true) | |
| index ($name, array $definition=array()) | |
| invokeSaveHooks ($when, $type, $event=null) | |
| isInProxyState () | |
| isModified ($deep=false) | |
| isValid ($deep=false, $hooks=true) | |
| link ($alias, $ids, $now=false) | |
| linkInDb ($alias, $ids) | |
| load (array $data=array()) | |
| loadReference ($name) | |
| locate ($name) | |
| mapValue ($name, $value=null) | |
| merge ($data, $deep=true) | |
| obtainReference ($name) | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
| option ($name, $value=null) | |
| postDelete ($event) | |
| postHydrate ($event) | |
| postInsert ($event) | |
| postSave ($event) | |
| postSerialize ($event) | |
| postUnserialize ($event) | |
| postUpdate ($event) | |
| postValidate ($event) | |
| preDelete ($event) | |
| preDqlDelete ($event) | |
| preDqlSelect ($event) | |
| preDqlUpdate ($event) | |
| preHydrate ($event) | |
| preInsert ($event) | |
| preSave ($event) | |
| preSerialize ($event) | |
| preUnserialize ($event) | |
| preUpdate ($event) | |
| preValidate ($event) | |
| rawGet ($fieldName) | |
| reference ($name) | |
| refresh ($deep=false) | |
| refreshRelated ($name=null) | |
| relatedExists ($name) | |
| remove ($offset) | |
| replace (Doctrine_Connection $conn=null) | |
| resetPendingUnlinks () | |
| save (Doctrine_Connection $conn=null) | |
| serialize () | |
| serializeReferences ($bool=null) | |
| set ($offset, $value) | |
| set ($fieldName, $value, $load=true) | |
| setArray (array $array) | |
| setColumnOption ($columnName, $option, $value) | |
| setColumnOptions ($name, array $options) | |
| setListener ($listener) | |
| setLocator (Doctrine_Locator $locator) | |
| setRelated ($alias, Doctrine_Access $coll) | |
| state ($state=null) | |
| synchronizeWithArray (array $array, $deep=true) | |
| toArray ($deep=true, $prefixKey=false) | |
| toString () | |
| trySave (Doctrine_Connection $conn=null) | |
| unique ($fields, $options=array(), $createUniqueIndex=true) | |
| unlink ($alias, $ids=array(), $now=false) | |
| unlinkInDb ($alias, $ids=array()) | |
| unserialize ($serialized) | |
Static Public Member Functions | |
| static | _index () |
| static | getNullObject () |
| static | initNullObject (Doctrine_Null $null) |
Data Fields | |
| const | STATE_CLEAN = 3 |
| const | STATE_DIRTY = 1 |
| const | STATE_LOCKED = 6 |
| const | STATE_PROXY = 4 |
| const | STATE_TCLEAN = 5 |
| const | STATE_TDIRTY = 2 |
| const | STATE_TLOCKED = 7 |
Protected Member Functions | |
| _isValueModified ($type, $old, $new) | |
| _resetModified () | |
| validate () | |
| validateOnInsert () | |
| validateOnUpdate () | |
Protected Attributes | |
| $_pendingUnlinks = array() | |
| $_table | |
|
inherited |
magic method used for method overloading
the function of this method is to try to find a given method from the templates (behaviors) the record is using, and if found, execute it. Note that already existing methods would not be overloaded.
So, in sense, this method replicates the usage of mixins (as seen in some programming languages)
| string | $method | name of the method |
| array | $args | method arguments |
Definition at line 2642 of file Record.php.
|
inherited |
Get key from data
| mixed | $name |
Definition at line 70 of file Access.php.
|
inherited |
Check if key exists in data
| string | $name |
Definition at line 81 of file Access.php.
|
inherited |
Set key and value to data
| $name | |
| $value |
Definition at line 58 of file Access.php.
|
inherited |
magic method
Definition at line 2714 of file Record.php.
|
inherited |
deletes a column or a related component.
| string | $name |
Definition at line 1657 of file Record.php.
|
staticinherited |
the current instance counter used to generate unique ids for php objects. Contains the next identifier.
Definition at line 292 of file Record.php.
|
protectedinherited |
Check if a value has changed according to Doctrine Doctrine is loose with type checking in the same ways PHP is for consistancy of behavior
This function basically says if what is being set is of Doctrine type boolean and something like current_value == 1 && new_value = true would not be considered modified
Simply doing $old !== $new will return false for boolean columns would mark the field as modified and change it in the database when it is not necessary
| string | $type | Doctrine type of the column |
| string | $old | Old value |
| string | $new | New value |
Definition at line 1534 of file Record.php.
|
protectedinherited |
Reset the modified array and store the old array in lastModified so it can be accessed by users after saving a record, since the modified array is reset after the object is saved.
Definition at line 2621 of file Record.php.
|
inherited |
Loads the given plugin.
This method loads a behavior in the record. It will add the behavior also to the record table if it. It is tipically called in
| mixed | $tpl | if an object, must be a subclass of Doctrine_Template. If a string, Doctrine will try to instantiate an object of the classes Doctrine_Template_$tpl and subsequently $tpl, using also autoloading capabilities if defined. |
| array | $options | argument to pass to the template constructor if $tpl is a class name |
| Doctrine_Record_Exception | if $tpl is neither an instance of Doctrine_Template subclass or a valid class name, that could be instantiated. |
Definition at line 349 of file Abstract.php.
|
inherited |
Add the value
| mixed | $value | The value to add |
Definition at line 199 of file Access.php.
|
inherited |
addListener
| Doctrine_EventListener_Interface | Doctrine_Overloadable | $listener |
Definition at line 67 of file Abstract.php.
|
inherited |
setDefaultValues sets the default values for records internal data
| boolean | $overwrite | whether or not to overwrite the already set values |
Definition at line 683 of file Record.php.
|
inherited |
assigns an identifier to the instance, for database storage
| mixed | $id | a key value or an array of keys |
Definition at line 2231 of file Record.php.
|
inherited |
Assign the inheritance column values
Definition at line 663 of file Record.php.
|
inherited |
attribute sets or retrieves an option
| mixed | $attr | |
| mixed | $value |
Definition at line 182 of file Abstract.php.
|
inherited |
bind binds a resource to a name
| string | $name | the name of the resource to bind |
| mixed | $value | the value of the resource |
Definition at line 120 of file Injectable.php.
|
inherited |
bindQueryParts binds query parts to given component
| array | $queryParts | an array of pre-bound query parts |
Definition at line 322 of file Abstract.php.
|
inherited |
call
| string | array | $callback | valid callback |
| string | $column | column name |
| mixed | arg1 ... argN optional callback arguments |
Definition at line 2376 of file Record.php.
|
inherited |
Adds a check constraint.
This method will add a CHECK constraint to the record table.
| mixed | $constraint | either a SQL constraint portion or an array of CHECK constraints. If array, all values will be added as constraint |
| string | $name | optional constraint name. Not used if $constraint is an array. |
Definition at line 388 of file Abstract.php.
|
inherited |
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.
| array | $data | data array to be cleaned |
Definition at line 712 of file Record.php.
|
inherited |
clears the accessor for a field name
| string | $fieldName |
Definition at line 1229 of file Record.php.
|
inherited |
makes all the already used save hooks available again
Definition at line 368 of file Record.php.
|
inherited |
clears the custom mutator for a field name
| string | $fieldName |
Definition at line 1298 of file Record.php.
|
inherited |
Clear a related reference or all references
| string | $name | The relationship reference to clear |
Definition at line 1060 of file Record.php.
|
inherited |
alias for
Definition at line 1879 of file Record.php.
|
inherited |
construct Empty template method to provide concrete Record classes with the possibility to hook into the constructor procedure
Definition at line 313 of file Record.php.
|
inherited |
test whether a field (column, mapped value, related component, accessor) is accessible by
| string | $fieldName |
Definition at line 1631 of file Record.php.
|
inherited |
generates a copy of this object. Returns an instance of the same class of $this.
| boolean | $deep | whether to duplicates the objects targeted by the relations |
Definition at line 2191 of file Record.php.
|
inherited |
Places a related component in the object graph.
This method inserts a related component instance in this record relations, populating the foreign keys accordingly.
| string | $name | related component alias in the relation |
| Doctrine_Record | Doctrine_Collection | $value | object to be linked as a related component |
Definition at line 1569 of file Record.php.
|
inherited |
implements Countable interface
Definition at line 1869 of file Record.php.
|
inherited |
deletes this data access object and all the related composites this operation is isolated by a transaction
this event can be listened by the onPreDelete and onDelete listeners
Definition at line 2177 of file Record.php.
|
inherited |
used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE
Definition at line 2665 of file Record.php.
|
inherited |
assigns the ErrorStack or returns it if called without parameters
| Doctrine_Validator_ErrorStack | errorStack to be assigned for this record |
Definition at line 646 of file Record.php.
|
inherited |
returns true if this record is saved in the database, otherwise false (it is transient)
Definition at line 2103 of file Record.php.
|
inherited |
exports instance to a chosen format
| string | $type | format type: array, xml, yml, json |
| string | $deep | whether or not to export all relationships |
Definition at line 2073 of file Record.php.
|
inherited |
Helps freeing the memory occupied by the entity. Cuts all references the entity has to other entities and removes the entity from the instance pool. Note: The entity is no longer useable after free() has been called. Any operations done with the entity afterwards can lead to unpredictable results.
| boolean | $deep | whether to free also the related components |
Definition at line 2678 of file Record.php.
|
inherited |
imports data from a php array
Definition at line 1970 of file Record.php.
|
inherited |
Return the element with the specified offset
| mixed | $offset | The offset to return |
Definition at line 165 of file Access.php.
|
inherited |
returns a value of a property or a related component
| mixed | $fieldName | name of the property or related component |
| boolean | $load | whether or not to invoke the loading procedure |
| Doctrine_Record_Exception | if trying to get a value of unknown property / related component |
Definition at line 1336 of file Record.php.
|
inherited |
gets the custom accessor for a field name
| string | $fieldName |
Definition at line 1241 of file Record.php.
|
inherited |
gets all accessors for this component instance
Definition at line 1254 of file Record.php.
|
inherited |
return all the internal data (columns)
Definition at line 1117 of file Record.php.
|
inherited |
retrieves the ErrorStack. To be called after a failed validation attempt (
Definition at line 631 of file Record.php.
|
inherited |
Get the record error stack as a human readable string. Useful for outputting errors to user via web browser
Definition at line 609 of file Record.php.
|
finalinherited |
returns the value of autoincremented primary key of this object (if any)
Definition at line 2274 of file Record.php.
|
inherited |
implements IteratorAggregate interface
Definition at line 2164 of file Record.php.
|
inherited |
getLast this method is used internally by Doctrine_Query it is needed to provide compatibility between records and collections
Definition at line 2292 of file Record.php.
|
inherited |
returns an array of the modified fields from the last transaction.
| boolean | $old | pick the old values (instead of the new ones) |
Definition at line 1794 of file Record.php.
|
inherited |
getListener
Definition at line 79 of file Abstract.php.
|
inherited |
getLocator returns the locator associated with this object
if there are no locator locally associated then this method tries to fetch the current global locator
Definition at line 75 of file Injectable.php.
|
inherited |
retrieves an array of modified fields and associated new values.
| boolean | $old | pick the old values (instead of the new ones) |
| boolean | $last | pick only lastModified values ( |
Definition at line 1771 of file Record.php.
|
inherited |
gets the custom mutator for a field name
| string | $fieldname |
Definition at line 1284 of file Record.php.
|
inherited |
gets all custom mutators for this component instance
Definition at line 1309 of file Record.php.
|
inherited |
getter for node associated with this record
Definition at line 2397 of file Record.php.
|
staticinherited |
getNullObject returns the null object associated with this object
Definition at line 145 of file Injectable.php.
|
inherited |
Definition at line 321 of file Record.php.
|
inherited |
returns Doctrine_Record instances which need to be deleted on save
Definition at line 1677 of file Record.php.
|
inherited |
returns Doctrine_Record instances which need to be unlinked (deleting the relation) on save
Definition at line 1687 of file Record.php.
|
inherited |
Retrieves data prepared for a sql transaction.
Returns an array of modified fields and values with data preparation; adds column aggregation inheritance and converts Records into primary key values.
| array | $array |
TODO:
if ($this->_data[$v] === null) { throw new Doctrine_Record_Exception('Unexpected null value.'); }
Definition at line 1810 of file Record.php.
|
inherited |
get all related components
Definition at line 2338 of file Record.php.
|
inherited |
returns the table object for this record.
Definition at line 1107 of file Record.php.
|
inherited |
sets a fieldname to have a custom accessor or check if a field has a custom accessor defined (when called without $accessor parameter).
| string | $fieldName | |
| string | $accessor |
Definition at line 1213 of file Record.php.
|
inherited |
Set a fieldname to have a custom accessor and mutator
| string | $fieldname | |
| string | $accessor | |
| string | $mutator |
Definition at line 1322 of file Record.php.
|
inherited |
Sets a column definition
| string | $name | |
| string | $type | |
| integer | $length | |
| mixed | $options |
Definition at line 260 of file Abstract.php.
|
inherited |
Set multiple column definitions at once
| array | $definitions |
Definition at line 271 of file Abstract.php.
|
inherited |
Binds One-to-Many / Many-to-Many aggregate relation
| string | $componentName | the name of the related component |
| string | $options | relation options |
Definition at line 244 of file Abstract.php.
|
inherited |
Tests whether a mapped value exists
| string | $name | the name of the property |
Definition at line 1426 of file Record.php.
|
inherited |
sets a fieldname to have a custom mutator or check if a field has a custom mutator defined (when called without the $mutator parameter)
| string | $fieldName | |
| string | $mutator |
Definition at line 1268 of file Record.php.
|
inherited |
Binds One-to-One aggregate relation
| string | $componentName | the name of the related component |
| string | $options | relation options |
Definition at line 229 of file Abstract.php.
|
inherited |
tests whether a relation is set
| string | $name | relation alias |
Definition at line 2302 of file Record.php.
|
inherited |
checks existence of properties and related components
| mixed | $fieldName | name of the property or reference |
Definition at line 2152 of file Record.php.
|
inherited |
hydrate hydrates this object from given array
| array | $data | |
| boolean | $overwriteLocalChanges | whether to overwrite the unsaved (dirty) data |
Definition at line 739 of file Record.php.
|
inherited |
returns the primary keys of this object
Definition at line 2263 of file Record.php.
|
inherited |
imports data from a chosen format in the current instance
| string | $type | Format type: xml, yml, json |
| string | $data | Data to be parsed and imported |
Definition at line 2089 of file Record.php.
|
inherited |
index defines or retrieves an index if the second parameter is set this method defines an index if not this method retrieves index named $name
| string | $name | the name of the index |
| array | $definition | the definition array |
Definition at line 107 of file Abstract.php.
|
staticinherited |
initNullObject initializes the null object
| Doctrine_Null | $null |
Definition at line 134 of file Injectable.php.
|
inherited |
calls a subclass hook. Idempotent until
$this->invokeSaveHooks('pre', 'save');
| string | $when | 'post' or 'pre' |
| string | $type | serialize, unserialize, save, delete, update, insert, validate, dqlSelect, dqlDelete, hydrate |
| Doctrine_Event | $event | event raised |
Definition at line 343 of file Record.php.
|
inherited |
indicates whether record has any not loaded fields
Definition at line 1191 of file Record.php.
|
inherited |
returns true if this record was modified, otherwise false
| boolean | $deep | whether to process also the relations for changes |
Definition at line 2117 of file Record.php.
|
inherited |
tests validity of the record using the current data.
| boolean | $deep | run the validation process on the relations |
| boolean | $hooks | invoke save hooks before start |
Definition at line 380 of file Record.php.
|
inherited |
creates links from this record to given records
| string | $alias | related component alias |
| array | $ids | the identifiers of the related records |
| boolean | $now | wether or not to execute now or set pending |
Definition at line 2511 of file Record.php.
|
inherited |
creates links from this record to given records now, querying the db
| string | $alias | related component alias |
| array | $ids | the identifiers of the related records |
Definition at line 2556 of file Record.php.
|
inherited |
loads all the uninitialized properties from the database. Used to move a record from PROXY to CLEAN/DIRTY state.
| array | $data | overwriting data to load in the record. Instance is hydrated from the table if not specified. |
Definition at line 1149 of file Record.php.
|
inherited |
loadReference loads a related component
| Doctrine_Table_Exception | if trying to load an unknown related component |
| string | $name | alias of the relation |
Definition at line 2362 of file Record.php.
|
inherited |
locate locates a resource by given name and returns it
if the resource cannot be found locally this method tries to use the global locator for finding the resource
| Doctrine_Locator_Exception | if the resource could not be found |
| string | $name | the name of the resource |
Definition at line 96 of file Injectable.php.
|
inherited |
sets a value that will be managed as if it were a field by magic accessor and mutators,
| string | $name | the name of the mapped value |
| mixed | $value | mixed value to be mapped |
Definition at line 1415 of file Record.php.
|
inherited |
merges this record with an array of values or with another existing instance of this object
Definition at line 1951 of file Record.php.
|
inherited |
gets a related component and fails if it does not exist
| string | $name |
| Doctrine_Record_Exception | if trying to get an unknown related component |
Definition at line 2326 of file Record.php.
|
inherited |
Check if an offset axists
| mixed | $offset |
Definition at line 103 of file Access.php.
|
inherited |
An alias of get()
| mixed | $offset |
Definition at line 115 of file Access.php.
|
inherited |
Sets $offset to $value
| mixed | $offset | |
| mixed | $value |
Definition at line 128 of file Access.php.
|
inherited |
Unset a given offset
| mixed | $offset |
Definition at line 143 of file Access.php.
|
inherited |
option sets or retrieves an option
| mixed | $name | the name of the option |
| mixed | $value | options value |
Definition at line 206 of file Abstract.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the deletion procedure.
Definition at line 519 of file Record.php.
|
inherited |
Empty template method to provide Record classes with the ability to alter hydration after it runs
Definition at line 600 of file Record.php.
|
inherited |
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.
Definition at line 551 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the saving procedure.
Definition at line 505 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the serializing procedure.
Definition at line 477 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the serializing procedure.
Definition at line 491 of file Record.php.
|
inherited |
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.
Definition at line 535 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the validation procedure.
Definition at line 565 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the deletion procedure.
Definition at line 512 of file Record.php.
|
inherited |
Empty template method to provide Record classes with the ability to alter DQL delete queries at runtime
Definition at line 586 of file Record.php.
|
inherited |
Empty template method to provide Record classes with the ability to alter DQL select queries at runtime
Definition at line 572 of file Record.php.
|
inherited |
Empty template method to provide Record classes with the ability to alter DQL update queries at runtime
Definition at line 579 of file Record.php.
|
inherited |
Empty template method to provide Record classes with the ability to alter hydration before it runs
Definition at line 593 of file Record.php.
|
inherited |
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.
Definition at line 543 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the saving procedure.
Definition at line 498 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the serializing procedure.
Definition at line 470 of file Record.php.
|
inherited |
Empty template method to provide concrete Record classes with the possibility to hook into the serializing procedure.
Definition at line 484 of file Record.php.
|
inherited |
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.
Definition at line 527 of file Record.php.
|
inherited |
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.
Definition at line 559 of file Record.php.
|
inherited |
returns the value of a property (column). If the property is not yet loaded this method does NOT load it.
| $name | name of the property |
| Doctrine_Record_Exception | if trying to get an unknown property |
Definition at line 1130 of file Record.php.
|
inherited |
gets a related component
| string | $name |
Definition at line 2313 of file Record.php.
|
inherited |
refresh refresh internal data from the database
| bool | $deep | If true, fetch also current relations. Caution: this deletes any aggregated values you may have queried beforee |
| Doctrine_Record_Exception | When the refresh operation fails (when the database row this record represents does not exist anymore) |
Definition at line 967 of file Record.php.
|
inherited |
refresh refresh data of related objects from the database
| string | $name | name of a related component. if set, this method only refreshes the specified related component |
Definition at line 1021 of file Record.php.
|
inherited |
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.
| string | $name |
Definition at line 1077 of file Record.php.
|
inherited |
Remove the element with the specified offset
| mixed | $offset | The offset to remove |
Definition at line 154 of file Access.php.
|
inherited |
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.
The REPLACE type of query does not make part of the SQL standards. Since practically only MySQL and SQLIte implement it natively, this type of query isemulated through this method for other DBMS using standard types of queries inside a transaction to assure the atomicity of the operation.
| Doctrine_Connection | $conn | optional connection parameter |
| Doctrine_Connection_Exception | if some of the key values was null |
| Doctrine_Connection_Exception | if there were no key fields |
| Doctrine_Connection_Exception | if something fails at database level |
Definition at line 1756 of file Record.php.
|
inherited |
resets pending record unlinks
Definition at line 1697 of file Record.php.
|
inherited |
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
this method also saves the related components
| Doctrine_Connection | $conn | optional connection parameter |
| Exception | if record is not valid and validation is active |
Definition at line 1713 of file Record.php.
|
inherited |
serialize this method is automatically called when an instance of Doctrine_Record is serialized
Definition at line 799 of file Record.php.
|
inherited |
Set whether or not to serialize references. This is used by caching since we want to serialize references when caching but not when just normally serializing a instance
| boolean | $bool |
Definition at line 279 of file Record.php.
|
inherited |
Set the offset to the value
| mixed | $offset | The offset to set |
| mixed | $value | The value to set the offset to |
Definition at line 177 of file Access.php.
|
inherited |
alters mapped values, properties and related components.
| mixed | $name | name of the property or reference |
| mixed | $value | value of the property or reference |
| boolean | $load | whether or not to refresh / load the uninitialized record data |
| Doctrine_Record_Exception | if trying to set a value for unknown property / related component |
| Doctrine_Record_Exception | if trying to set a value of wrong type for related component |
Definition at line 1443 of file Record.php.
|
inherited |
Set an entire aray to the data
| array | $array | An array of key => value pairs |
Definition at line 41 of file Access.php.
|
inherited |
Set an individual column option
| string | $columnName | |
| string | $option | |
| string | $value |
Definition at line 310 of file Abstract.php.
|
inherited |
Customize the array of options for a column or multiple columns. First argument can be a single field/column name or an array of them. The second argument is an array of options.
[php]
public function setTableDefinition()
{
parent::setTableDefinition();
$this->setColumnOptions('username', array(
'unique' => true
));
}
| string | $columnName | |
| array | $validators |
Definition at line 297 of file Abstract.php.
|
inherited |
setListener
| Doctrine_EventListener_Interface | Doctrine_Overloadable | $listener |
Definition at line 90 of file Abstract.php.
|
inherited |
setLocator this method can be used for setting the locator object locally
| Doctrine_Locator | the locator object |
Definition at line 60 of file Injectable.php.
|
finalinherited |
set a related component
| string | $alias | |
| Doctrine_Access | $coll |
Definition at line 2349 of file Record.php.
|
inherited |
assigns the state of this record or returns it if called without parameters
| integer | string | $state | if set, this method tries to set the record state to $state |
| Doctrine_Record_State_Exception | if trying to set an unknown state |
Definition at line 922 of file Record.php.
|
inherited |
synchronizes a Doctrine_Record instance and its relations with data from an array
it expects an array representation of a Doctrine_Record similar to the return value of the toArray() method. If the array contains relations it will create those that don't exist, update the ones that do, and delete the ones missing on the array but available on the Doctrine_Record (unlike
| array | $array | representation of a Doctrine_Record |
| bool | $deep | whether or not to act on relations |
Definition at line 2023 of file Record.php.
|
inherited |
returns the record representation as an array
boolean $deep whether to include relations boolean $prefixKey not used array
Definition at line 1892 of file Record.php.
|
inherited |
|
inherited |
tries to save the object and all its related components. In contrast to Doctrine_Record::save(), this method does not throw an exception when validation fails but returns TRUE on success or FALSE on failure.
| Doctrine_Connection | $conn | optional connection parameter |
Definition at line 1730 of file Record.php.
|
inherited |
Defines a n-uple of fields that must be unique for every record.
This method Will automatically add UNIQUE index definition and validate the values on save. The UNIQUE index is not created in the database until you use
| array | $fields | values are fieldnames |
| array | $options | array of options for unique validator |
| bool | $createUniqueIndex | Whether or not to create a unique index in the database |
Definition at line 128 of file Abstract.php.
|
inherited |
unlink removes links from this record to given records if no ids are given, it removes all links
| string | $alias | related component alias |
| array | $ids | the identifiers of the related records |
| boolean | $now | whether or not to execute now or set as pending unlinks |
Definition at line 2428 of file Record.php.
|
inherited |
unlink now the related components, querying the db
| string | $alias | related component alias |
| array | $ids | the identifiers of the related records |
Definition at line 2473 of file Record.php.
|
inherited |
this method is automatically called everytime an instance is unserialized
| string | $serialized | Doctrine_Record as serialized string |
| Doctrine_Record_Exception | if the cleanData operation fails somehow |
Definition at line 857 of file Record.php.
|
protectedinherited |
Empty template method to provide concrete Record classes with the possibility to hook into the validation procedure, doing any custom / specialized validations that are neccessary.
Definition at line 447 of file Record.php.
|
protectedinherited |
Empty template method to provide concrete Record classes with the possibility to hook into the validation procedure only when the record is going to be inserted into the data store the first time.
Definition at line 463 of file Record.php.
|
protectedinherited |
Empty template method to provide concrete Record classes with the possibility to hook into the validation procedure only when the record is going to be updated.
Definition at line 455 of file Record.php.
|
protectedinherited |
Array of pending un links in format alias => keys to be executed after save
Definition at line 160 of file Record.php.
|
protectedinherited |
| Doctrine_Table | $_table | reference to associated Doctrine_Table instance |
Definition at line 38 of file Abstract.php.
|
inherited |
CLEAN STATE a Doctrine_Record is in clean state when all of its properties are loaded from the database and none of its properties are changed
Definition at line 58 of file Record.php.
|
inherited |
STATE CONSTANTS DIRTY STATE a Doctrine_Record is in dirty state when its properties are changed
Definition at line 44 of file Record.php.
|
inherited |
LOCKED STATE a Doctrine_Record is temporarily locked during deletes and saves
This state is used internally to ensure that circular deletes and saves will not cause infinite loops
Definition at line 79 of file Record.php.
|
inherited |
PROXY STATE a Doctrine_Record is in proxy state when its properties are not fully loaded
Definition at line 64 of file Record.php.
|
inherited |
NEW TCLEAN a Doctrine_Record is in transient clean state when it is created and none of its fields are modified
Definition at line 70 of file Record.php.
|
inherited |
TDIRTY STATE a Doctrine_Record is in transient dirty state when it is created and some of its fields are modified but it is NOT yet persisted into database
Definition at line 51 of file Record.php.
|
inherited |
TLOCKED STATE a Doctrine_Record is temporarily locked (and transient) during deletes and saves
This state is used internally to ensure that circular deletes and saves will not cause infinite loops
Definition at line 88 of file Record.php.