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 |
|
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 |
|
string |
exportTo(mixed $parser, boolean $includeLazyLoadColumns = true)
Export the current object properties to a string, using a given parser format |
|
__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. |
|
BaseObject |
fromXML(string $data)
Populate the object from an XML string |
|
BaseObject |
fromYAML(string $data)
Populate the object from a YAML string |
|
BaseObject |
fromJSON(string $data)
Populate the object from a JSON string |
|
BaseObject |
fromCSV(string $data)
Populate the object from a CSV string |
|
string |
toXML(boolean $includeLazyLoadColumns)
Export the object to an XML string |
|
string |
toYAML(boolean $includeLazyLoadColumns)
Export the object to a YAML string |
|
string |
toJSON(boolean $includeLazyLoadColumns)
Export the object to a JSON string |
|
string |
toCSV(boolean $includeLazyLoadColumns)
Export the object to a CSV string |
Details
at line 66
public
__construct()
Empty constructor (this allows people with their own BaseObject implementation to use its constructor)
at line 75
public boolean
isModified()
Returns whether the object has been modified.
at line 87
public boolean
isColumnModified(string $col)
Has specified column been modified?
at line 97
public array
getModifiedColumns()
Get the columns that have been modified in this object.
at line 109
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 120
public
setNew(boolean $b)
Setter for the isNew attribute.
This method will be called by Propel-generated children and Peers.
at line 130
public boolean
isDeleted()
Whether this object has been deleted.
at line 142
public void
setDeleted(boolean $b)
Specify whether this object has been deleted.
at line 154
public boolean
preSave(PropelPDO $con = null)
Code to be run before persisting the object
at line 164
public
postSave(PropelPDO $con = null)
Code to be run after persisting the object
at line 175
public boolean
preInsert(PropelPDO $con = null)
Code to be run before inserting to database
at line 185
public
postInsert(PropelPDO $con = null)
Code to be run after inserting to database
at line 196
public boolean
preUpdate(PropelPDO $con = null)
Code to be run before updating the object in database
at line 206
public
postUpdate(PropelPDO $con = null)
Code to be run after updating the object in database
at line 217
public boolean
preDelete(PropelPDO $con = null)
Code to be run before deleting the object in database
at line 227
public
postDelete(PropelPDO $con = null)
Code to be run after deleting the object in database
at line 236
public
postHydrate($row, $startcol, $rehydrate = false)
Code to be run after object hydration
at line 247
public void
resetModified(string $col = null)
Sets the modified state for the object to be false.
at line 267
public Whether
equals(obj $obj)
Compares this with another BaseObject
instance.
If
obj
is an instance of BaseObject
, delegates to
equals(BaseObject)
. Otherwise, returns false
.
at line 289
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 305
public array
getVirtualColumns()
Get the associative array of the virtual columns in this object
at line 315
public boolean
hasVirtualColumn($name)
Checks the existence of a virtual column in this object
at line 327
public mixed
getVirtualColumn($name)
Get the value of a virtual column in this object
at line 344
public BaseObject
setVirtualColumn(string $name, mixed $value)
Set the value of a virtual column in this object
at line 377
public BaseObject
importFrom(mixed $parser, string $data)
Populate the current object from a string, using a given parser format $book = new Book(); $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
at line 399
public string
exportTo(mixed $parser, boolean $includeLazyLoadColumns = true)
Export the current object properties to a string, using a given parser format $book = BookQuery::create()->findPk(9012); echo $book->exportTo('JSON'); => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
at line 412
public
__sleep()
Clean up internal collections prior to serializing Avoids recursive loops that turn into segmentation faults when serializing
at line 432
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
at line 30
BaseObject
fromXML(string $data)
Populate the object from an XML string
at line 30
BaseObject
fromYAML(string $data)
Populate the object from a YAML string
at line 30
BaseObject
fromJSON(string $data)
Populate the object from a JSON string
at line 30
BaseObject
fromCSV(string $data)
Populate the object from a CSV string
at line 30
string
toXML(boolean $includeLazyLoadColumns)
Export the object to an XML string
at line 30
string
toYAML(boolean $includeLazyLoadColumns)
Export the object to a YAML string
at line 30
string
toJSON(boolean $includeLazyLoadColumns)
Export the object to a JSON string
at line 30
string
toCSV(boolean $includeLazyLoadColumns)
Export the object to a CSV string