Methods
All methods in the Solar_Sql_Model_Collection
class.
Public
-
__construct()
-
Constructor.
-
__destruct()
-
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
__get()
-
Returns a record from the collection based on its key value.
-
__isset()
-
Does a certain key exist in the data?
-
__set()
-
Sets a key value and marks the struct as "dirty".
-
__toString()
-
Returns a string representation of the object.
-
__unset()
-
Sets a key in the data to null.
-
appendNew()
-
Fetches a new record and appends it to the collection.
-
count()
-
Countable: how many keys are there?
-
deleteAll()
-
Deletes each record in the collection one-by-one.
-
deleteOne()
-
Deletes a record from the database and removes it from the collection.
-
dump()
-
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
free()
-
Frees memory used by this struct.
-
getColVals()
-
Returns an array of all values for a single column in the collection.
-
getInvalid()
-
Returns an array of invalidation messages from each invalid record, keyed on the record offset within the collection.
-
getInvalidRecords()
-
Returns an array of the invalid record objects within the collection, keyed on the record offset within the collection.
-
getIterator()
-
IteratorAggregate: returns an external iterator for this struct.
-
getKeys()
-
Returns all the keys for this struct.
-
getModel()
-
Returns the model from which the data originates.
-
getPagerInfo()
-
Gets the injected pager information for the collection.
-
getPrimaryVals()
-
Returns an array of the unique primary keys contained in this collection.
-
getRecordOffset()
-
Given a record object, looks up its offset value in the collection.
-
isDirty()
-
Is the struct dirty?
-
isEmpty()
-
Are there any records in the collection?
-
isInvalid()
-
Are there any invalid records in the collection?
-
load()
-
Loads the struct with data from an array or another struct.
-
locale()
-
Overrides normal locale() to use the model locale strings.
-
offsetExists()
-
ArrayAccess: does the requested key exist?
-
offsetGet()
-
ArrayAccess: get a key value.
-
offsetSet()
-
ArrayAccess: set a key value; appends to the array when using [] notation.
-
offsetUnset()
-
ArrayAccess: unset a key.
-
removeAll()
-
Removes all records from the collection but does not delete them from the database.
-
removeOne()
-
Removes one record from the collection but does not delete it from the database.
-
save()
-
Saves all the records from this collection to the database one-by-one, inserting or updating as needed.
-
setModel()
-
Injects the model from which the data originates.
-
setPagerInfo()
-
Injects pager information for the collection.
-
toArray()
-
Returns the data for each record in this collection as an array.
-
toString()
-
Returns a string representation of the struct.
Protected
-
_buildConfig()
-
Builds and returns the default config for a class, including all configs inherited from its parents.
-
_exception()
-
Convenience method for returning exceptions with localized text.
-
_free()
-
Recursively descends and calls free() on child structs.
-
_load()
-
Overridable method to load the struct with array data.
-
_postConfig()
-
A hook that activates after _buildConfig() in the constructor.
-
_postConstruct()
-
Post-construction tasks to complete object construction.
-
_postDeleteAll()
-
User-defined post-delete logic.
-
_postSave()
-
User-defined post-save logic for the collection.
-
_preConfig()
-
A hook that activates before _buildConfig() in the constructor.
-
_preDeleteAll()
-
User-defined pre-delete logic.
-
_preSave()
-
User-defined pre-save logic for the collection.
-
_setIsDirty()
-
Marks the struct as dirty.
-
_toArray()
-
Support method for toArray().
Private
None.