Overview
Represents a collection of Solar_Sql_Model_Record objects.
Configuration Keys
data
: Key-value pairs.
Constants
None.
Public Properties
The Solar_Sql_Model_Collection class has no public properties; try the list of all properties.
Public Methods
These are all the public methods in the Solar_Sql_Model_Collection class.
You can also view the list of all public, protected, and private methods.
-
__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.