abstract class BaseObject
This class contains attributes and methods that are used by all business objects within the system.
Methods
__construct()
Empty constructor (this allows people with their own BaseObject implementation to use its constructor) |
||
boolean |
isModified()
Returns whether the object has been modified. |
|
boolean |
isColumnModified(string $col)
Has specified column been modified? |
|
array |
getModifiedColumns()
Get the columns that have been modified in this object. |
|
true, |
isNew()
Returns whether the object has ever been saved. |
|
setNew(boolean $b)
Setter for the isNew attribute. |
||
boolean |
isDeleted()
Whether this object has been deleted. |
|
void |
setDeleted(boolean $b)
Specify whether this object has been deleted. |
|
boolean |
preSave(PropelPDO $con = null)
Code to be run before persisting the object |
|
postSave(PropelPDO $con = null)
Code to be run after persisting the object |
||
boolean |
preInsert(PropelPDO $con = null)
Code to be run before inserting to database |
|
postInsert(PropelPDO $con = null)
Code to be run after inserting to database |
||
boolean |
preUpdate(PropelPDO $con = null)
Code to be run before updating the object in database |
|
postUpdate(PropelPDO $con = null)
Code to be run after updating the object in database |
||
boolean |
preDelete(PropelPDO $con = null)
Code to be run before deleting the object in database |
|
postDelete(PropelPDO $con = null)
Code to be run after deleting the object in database |
||
postHydrate($row, $startcol, $rehydrate = false)
Code to be run after object hydration |
||
void |
resetModified(string $col = null)
Sets the modified state for the object to be false. |
|
Whether |
equals(obj $obj)
Compares this with another <code>BaseObject</code> instance. |
|
int |
hashCode()
If the primary key is not null, return the hashcode of the primary key. |
|
array |
getVirtualColumns()
Get the associative array of the virtual columns in this object |
|
boolean |
hasVirtualColumn($name)
Checks the existence of a virtual column in this object |
|
mixed |
getVirtualColumn($name)
Get the value of a virtual column in this object |
|
BaseObject |
setVirtualColumn(string $name, mixed $value)
Set the value of a virtual column in this object |
|
BaseObject |
importFrom(mixed $parser, string $data)
Populate the current object from a string, using a given parser format <code> $book = new Book(); $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); </code> |
|
string |
exportTo(mixed $parser, boolean $includeLazyLoadColumns = true)
Export the current object properties to a string, using a given parser format <code> $book = BookQuery::create()->findPk(9012); echo $book->exportTo('JSON'); => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); </code> |
|
__sleep()
Clean up internal collections prior to serializing Avoids recursive loops that turn into segmentation faults when serializing |
||
array|string |
__call(string $name, mixed $params)
Catches calls to undefined methods. |
Details
at line 62
public
__construct()
Empty constructor (this allows people with their own BaseObject implementation to use its constructor)
at line 71
public boolean
isModified()
Returns whether the object has been modified.
at line 82
public boolean
isColumnModified(string $col)
Has specified column been modified?
at line 91
public array
getModifiedColumns()
Get the columns that have been modified in this object.
at line 103
public true,
isNew()
Returns whether the object has ever been saved.
This will
be false, if the object was retrieved from storage or was created
and then saved.
at line 114
public
setNew(boolean $b)
Setter for the isNew attribute.
This method will be called
by Propel-generated children and Peers.
at line 123
public boolean
isDeleted()
Whether this object has been deleted.
at line 133
public void
setDeleted(boolean $b)
Specify whether this object has been deleted.
at line 143
public boolean
preSave(PropelPDO $con = null)
Code to be run before persisting the object
at line 152
public
postSave(PropelPDO $con = null)
Code to be run after persisting the object
at line 161
public boolean
preInsert(PropelPDO $con = null)
Code to be run before inserting to database
at line 170
public
postInsert(PropelPDO $con = null)
Code to be run after inserting to database
at line 179
public boolean
preUpdate(PropelPDO $con = null)
Code to be run before updating the object in database
at line 188
public
postUpdate(PropelPDO $con = null)
Code to be run after updating the object in database
at line 197
public boolean
preDelete(PropelPDO $con = null)
Code to be run before deleting the object in database
at line 206
public
postDelete(PropelPDO $con = null)
Code to be run after deleting the object in database
at line 214
public
postHydrate($row, $startcol, $rehydrate = false)
Code to be run after object hydration
at line 223
public void
resetModified(string $col = null)
Sets the modified state for the object to be false.
at line 242
public Whether
equals(obj $obj)
Compares this with another <code>BaseObject</code> instance.
If
<code>obj</code> is an instance of <code>BaseObject</code>, delegates to
<code>equals(BaseObject)</code>. Otherwise, returns <code>false</code>.
at line 264
public int
hashCode()
If the primary key is not null, return the hashcode of the primary key.
Otherwise, return the hash code of the object.
at line 280
public array
getVirtualColumns()
Get the associative array of the virtual columns in this object
at line 290
public boolean
hasVirtualColumn($name)
Checks the existence of a virtual column in this object
at line 302
public mixed
getVirtualColumn($name)
Get the value of a virtual column in this object
at line 319
public BaseObject
setVirtualColumn(string $name, mixed $value)
Set the value of a virtual column in this object
at line 351
public BaseObject
importFrom(mixed $parser, string $data)
Populate the current object from a string, using a given parser format <code> $book = new Book(); $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); </code>
at line 372
public string
exportTo(mixed $parser, boolean $includeLazyLoadColumns = true)
Export the current object properties to a string, using a given parser format <code> $book = BookQuery::create()->findPk(9012); echo $book->exportTo('JSON'); => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); </code>
at line 385
public
__sleep()
Clean up internal collections prior to serializing Avoids recursive loops that turn into segmentation faults when serializing
at line 405
public array|string
__call(string $name, mixed $params)
Catches calls to undefined methods.
Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.).
Allows to define default __call() behavior if you use a custom BaseObject