Methods
All methods in the Solar_Sql_Model_Related_HasManyThrough class.
Public
-
__construct() -
Constructor.
-
__destruct() -
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
_getEmpty() -
Returns an empty related value for an internal array result.
-
dump() -
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
fetch() -
Fetches the related collection for a native ID or record.
-
fetchEmpty() -
Returns a new, empty collection when there is no related data.
-
fetchNew() -
Fetches a new related collection.
-
getForeignConditions() -
Gets the foreign-model WHERE conditions and merges with the WHERE conditions on this relationship.
-
getModel() -
Returns the related (foreign) model instance.
-
isInvalid() -
Are the related "foreign" and "through" collections valid?
-
isMany() -
Is this related to many records?
-
isOne() -
Is this related to one record?
-
load() -
Loads this relationship object with user-defined characteristics (options), and corrects them as needed.
-
locale() -
Looks up class-specific locale strings based on a key.
-
modEagerFetch() -
Fixes the native fetch params and eager params; then, if the join_flag is set on the eager, calles _modEagerFetch() to modify the native fetch params based on the eager params.
-
modEagerResult() -
Modifies the parent result array to add eager records.
-
newObject() -
Returns foreign data as a collection object.
-
preSave() -
Pre-save hook for saving related records or collections from a native record.
-
save() -
Saves the related "through" collection and the foreign collection from a native record.
-
setNativeModel() -
Sets the native (origin) model instance.
-
toArray() -
Returns the relation characteristics as an array.
Protected
-
_buildConfig() -
Builds and returns the default config for a class, including all configs inherited from its parents.
-
_collate() -
Collates a result array by an array key, grouping the results by that value.
-
_exception() -
Convenience method for returning exceptions with localized text.
-
_fetchIntoArrayAll() -
Fetches eager results into an existing native array rowset.
-
_fetchIntoArrayOne() -
Fetches eager results into an existing single native array row.
-
_fixEagerParams() -
Fixes the eager params based on the settings for this related.
-
_fixFetchParams() -
Fixes the native fetch params based on the settings for this related.
-
_fixForeignKey() -
Corrects the foreign_key value in the options; uses the native-model table name as singular when a regular has-many, and the foreign- model primary column as-is when a 'has-many through'.
-
_fixRelatedCol() -
Fixes the related column names in the user-defined options in place.
-
_getNativeBySelect() -
Returns an INNER JOIN specification for joining to the native table as as sub-SELECT.
-
_getNativeByWherein() -
Returns an array of WHERE conditions for selecting only certain native values from the foreign table using "WHERE IN (...)".
-
_modEagerFetch() -
Modifies the native fetch params with eager joins so that the through table and the foreign table are joined properly.
-
_postConfig() -
A hook that activates after _buildConfig() in the constructor.
-
_postConstruct() -
Post-construction tasks to complete object construction.
-
_preConfig() -
A hook that activates before _buildConfig() in the constructor.
-
_setCols() -
Sets the foreign columns to be selected based on user-defined relationship options.
-
_setConditions() -
Sets additional conditions from the relationship definition; these are used in the WHERE and/or JOIN ON conditions.
-
_setForeignClass() -
Sets the base name for the foreign class; assumes the related name is is already plural.
-
_setForeignModel() -
Sets the foreign model instance based on user-defined relationship options.
-
_setMerge() -
Merges are always set to 'client' regardless of the settings.
-
_setNativeBy() -
Sets the native-by strategy ('wherein' or 'select').
-
_setOrder() -
Sets default ORDER clause from the relationship definition.
-
_setRelated() -
A support method for _fixRelated() to handle has-many relationships.
-
_setType() -
Sets the relationship type.
-
_setWhereinMax() -
Sets the 'wherein_max' value (i.e., the number of records in the native collection after which we should use a 'native-by select' strategy).
Private
None.