Previous Page
Properties

Solar_Model
Methods

Next Page
__call()

Methods

Public

__call()
Magic call implements "fetchOneBy...()" and "fetchAllBy...()" for columns listed in the method name.
__construct()
Constructor.
__destruct()
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
__get()
Read-only access to protected model properties.
_fetchResultSelect()
Returns a data result and the select used to fetch the data.
apiVersion()
Reports the API version for this class.
countPages()
Fetches count and pages of available records.
delete()
Deletes rows from the model table and deletes cache entries.
dump()
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
fetch()
Fetches a record or collection by primary key value(s).
fetchAll()
Fetches a collection of all records by arbitrary parameters.
fetchArray()
Fetches an array of rows by arbitrary parameters.
fetchAssoc()
The same as fetchAll(), except the record collection is keyed on the first column of the results (instead of being a strictly sequential array.) Recognized parameters for the fetch are: eager : (string|array) Eager-fetch records from these related models.
fetchCol()
Fetches a sequential array of values from the model, using only the first column of the results.
fetchNew()
Returns a new record with default values.
fetchOne()
Fetches one record by arbitrary parameters.
fetchPairs()
Fetches an array of key-value pairs from the model, where the first column is the key and the second column is the value.
fetchValue()
Fetches a single value from the model (i.e., the first column of the first record of the returned page set).
fixSelectParams()
"Cleans up" SELECT clause parameters.
free()
Call this before you unset the instance so that you release the memory from all the internal child objects.
getPaging()
Gets the number of records per page.
getRelated()
Gets the control object for a named relationship.
insert()
Inserts one row to the model table and deletes cache entries.
locale()
Looks up class-specific locale strings based on a key.
newCollection()
Returns the appropriate collection object for this model.
newRecord()
Returns the appropriate record object for an inheritance model.
newSelect()
Returns a new Solar_Sql_Select tool, with the proper SQL object injected automatically, and with eager "to-one" associations joined.
serializeCols()
Serializes data values in-place based on $this->_serialize_cols.
setPaging()
Sets the number of records per page.
unserializeCols()
Un-serializes data values in-place based on $this->_serialize_cols.
update()
Updates rows in the model table and deletes cache entries.

Protected

_addFilter()
Adds a column filter.
_addRelated()
Support method for adding relations.
_belongsTo()
Adds a named belongs-to relationship.
_createTableAndIndexes()
Creates the table and indexes in the database using $this->_table_cols and $this->_index.
_exception()
Convenience method for returning exceptions with localized text.
_fixCache()
Fixes the cache class name.
_fixFilters()
Loads the baseline data filters for each column.
_fixIndex()
Fixes $this->_index listings.
_fixModelName()
Fixes the array-name and table-alias for user input to this model.
_fixOrder()
Fixes the default order when fetching records from this model.
_fixPropertyCols()
Fixes up special column indicator properties, and post-sets the $_inherit_model value based on the existence of the inheritance column.
_fixStack()
Fixes the stack of parent classes for the model.
_fixTableCols()
Fixes table column definitions into $_table_cols, and post-sets inheritance values.
_fixTableName()
Loads table name into $this->_table_name, and pre-sets the value of $this->_inherit_model based on the class name.
_hasMany()
Adds a named has-many relationship.
_hasOne()
Adds a named has-one relationship.
_setCollectionPagerInfo()
Sets the pager info in a collection, calling countPages() along the way.
_setup()
User-defined setup.

Private

None.