[cough] element index

Package indexes

All elements
a b c d e f g h i k l m n o q r s t u v _
_
top
__clone
CoughObject::__clone() in CoughObject.class.php
Clone only the non-primary key fields.
__construct
CoughObject::__construct() in CoughObject.class.php
Construct an empty CoughObject or an object with pre-initialized data.
__construct
CoughKeyValueIterator::__construct() in CoughKeyValueIterator.class.php
__construct
CoughCollection::__construct() in CoughCollection.class.php
a
top
add
CoughCollection::add() in CoughCollection.class.php
Adds a single element (even if it doesn't have a key ID yet).
add
CoughInstancePool::add() in CoughInstancePool.class.php
addConfig
CoughDatabaseFactory::addConfig() in CoughDatabaseFactory.class.php
Adds the database config for later use. Make sure to specified the 'aliases' or the 'db_name_hash' value.
addDatabase
CoughDatabaseFactory::addDatabase() in CoughDatabaseFactory.class.php
Adds the database object for the specified alias name.
b
top
buildSelectQuery
CoughObject::buildSelectQuery() in CoughObject.class.php
Builds a basic SELECT table.* FROM db.table query object (making it easy to inject joins, where criteria, order by, group by, etc.)
c
top
$collections
CoughObject::$collections in CoughObject.class.php
An array of all the loaded collections in form [collectionName] => [CoughCollection]
$configs
CoughDatabaseFactory::$configs in CoughDatabaseFactory.class.php
An array of database config info.
clearValidationErrors
CoughObject::clearValidationErrors() in CoughObject.class.php
Clear validation status.
constructByConfig
CoughDatabaseInterface::constructByConfig() in CoughDatabaseInterface.class.php
constructByFields
CoughObjectStaticInterface::constructByFields() in CoughObjectStaticInterface.class.php
constructByKey
CoughObjectStaticInterface::constructByKey() in CoughObjectStaticInterface.class.php
constructByKey
CoughObject::constructByKey() in CoughObject.class.php
Constructs a new object from a single id (for single key PKs) or a hash of [field_name] => [field_value].
constructBySql
CoughObjectStaticInterface::constructBySql() in CoughObjectStaticInterface.class.php
constructBySql
CoughObject::constructBySql() in CoughObject.class.php
Constructs a new object from custom SQL.
constructDatabaseByConfig
CoughDatabaseFactory::constructDatabaseByConfig() in CoughDatabaseFactory.class.php
returns the correct database adapter object
CoughCollection.class.php
CoughCollection.class.php in CoughCollection.class.php
CoughDatabaseFactory.class.php
CoughDatabaseFactory.class.php in CoughDatabaseFactory.class.php
CoughDatabaseInterface.class.php
CoughDatabaseInterface.class.php in CoughDatabaseInterface.class.php
CoughDatabaseResultInterface.class.php
CoughDatabaseResultInterface.class.php in CoughDatabaseResultInterface.class.php
CoughInstancePool.class.php
CoughInstancePool.class.php in CoughInstancePool.class.php
CoughIterator.class.php
CoughIterator.class.php in CoughIterator.class.php
CoughKeyValueIterator.class.php
CoughKeyValueIterator.class.php in CoughKeyValueIterator.class.php
CoughObject.class.php
CoughObject.class.php in CoughObject.class.php
CoughObjectStaticInterface.class.php
CoughObjectStaticInterface.class.php in CoughObjectStaticInterface.class.php
CoughCollection
CoughCollection in CoughCollection.class.php
CoughCollection collects CoughObjects.
CoughDatabaseFactory
CoughDatabaseFactory in CoughDatabaseFactory.class.php
A simple factory that provides access to an application's database objects.
CoughDatabaseInterface
CoughDatabaseInterface in CoughDatabaseInterface.class.php
Any database object that Cough uses must implement this interface.
CoughDatabaseResultInterface
CoughDatabaseResultInterface in CoughDatabaseResultInterface.class.php
Any database result object that Cough uses must implement this interface.
CoughInstancePool
CoughInstancePool in CoughInstancePool.class.php
Unused class, but will be available in the future.
CoughIterator
CoughIterator in CoughIterator.class.php
CoughCollection objects use CoughIterator
CoughKeyValueIterator
CoughKeyValueIterator in CoughKeyValueIterator.class.php
Custom iterator constructed by CoughCollection::getKeyValueIterator()
CoughObject
CoughObject in CoughObject.class.php
CoughObject is the foundation for which all other "Model" / "ORM" classes extend. There will usually be one class extending CoughObject for each table in the database that an ORM is needed for.
CoughObjectStaticInterface
CoughObjectStaticInterface in CoughObjectStaticInterface.class.php
This interface must be implemented in the concrete/generated classes.
current
CoughKeyValueIterator::current() in CoughKeyValueIterator.class.php
d
top
$databaseNames
CoughDatabaseFactory::$databaseNames in CoughDatabaseFactory.class.php
Format:
$databases
CoughDatabaseFactory::$databases in CoughDatabaseFactory.class.php
Format:
$derivedFieldDefinitions
CoughObject::$derivedFieldDefinitions in CoughObject.class.php
An array of derived field definitions
$derivedFields
CoughObject::$derivedFields in CoughObject.class.php
An array of derived fields (read-only, as in not saved back to the database).
defineDerivedFields
CoughObject::defineDerivedFields() in CoughObject.class.php
Override in sub-class to define derived fields the object may possess.
defineFields
CoughObject::defineFields() in CoughObject.class.php
Override in sub-class to define fields the object possesses, including $pkFieldNames.
defineObjects
CoughObject::defineObjects() in CoughObject.class.php
Override in sub-class to define objects the object possesses.
deflate
CoughObject::deflate() in CoughObject.class.php
Returns object to it's own state, except what you want to keep. By default it empties everything; overridden version only empties yours.
delete
CoughObject::delete() in CoughObject.class.php
Deletes the record from the database, if hasKeyId returns true.
doValidateData
CoughObject::doValidateData() in CoughObject.class.php
Do the actual data validation. Override in sub classes.
e
top
$elementClassName
CoughCollection::$elementClassName in CoughCollection.class.php
The name of the element class that will be used when adding new elements to the collection
execute
CoughDatabaseInterface::execute() in CoughDatabaseInterface.class.php
f
top
$fieldDefinitions
CoughObject::$fieldDefinitions in CoughObject.class.php
An array of all the columns in the database, including the primary key column and name columns.
$fields
CoughObject::$fields in CoughObject.class.php
An array of all the currently initialized or set fields.
finishConstruction
CoughObject::finishConstruction() in CoughObject.class.php
Called at the end of __construct(). Override for special construction behavior that is dependent on the object's state.
g
top
get
CoughCollection::get() in CoughCollection.class.php
Returns the element at the given key.
get
CoughInstancePool::get() in CoughInstancePool.class.php
getConfigs
CoughDatabaseFactory::getConfigs() in CoughDatabaseFactory.class.php
Get all the database configs CoughDatabaseFactory is currently aware of.
getDatabase
CoughDatabaseFactory::getDatabase() in CoughDatabaseFactory.class.php
Get the database object for the specified alias
getDatabaseName
CoughDatabaseFactory::getDatabaseName() in CoughDatabaseFactory.class.php
Get the actual database name for the specified alias.
getDatabases
CoughDatabaseFactory::getDatabases() in CoughDatabaseFactory.class.php
Get all the currently constructed database objects.
getDb
CoughCollection::getDb() in CoughCollection.class.php
Returns a reference to the database object to use for queries.
getDb
CoughObjectStaticInterface::getDb() in CoughObjectStaticInterface.class.php
getDbName
CoughObjectStaticInterface::getDbName() in CoughObjectStaticInterface.class.php
getDerivedField
CoughObject::getDerivedField() in CoughObject.class.php
Returns the specified derived field name.
getField
CoughObject::getField() in CoughObject.class.php
Returns the current value of the requested field name.
getFieldAliases
CoughObject::getFieldAliases() in CoughObject.class.php
Helper method for generating SELECT criteria for other join tables.
getFields
CoughObject::getFields() in CoughObject.class.php
Returns the object's fields as an array of [key] => [value] pairs.
getFieldsWithoutPk
CoughObject::getFieldsWithoutPk() in CoughObject.class.php
Get all non-primary key related fields and their values.
getFirst
CoughCollection::getFirst() in CoughCollection.class.php
The first element in the array/collection.
getInsertFields
CoughObject::getInsertFields() in CoughObject.class.php
Returns the fields that should be used for inserting. This logic is separate from the insert method to make it easy to override the behavior.
getIterator
CoughCollection::getIterator() in CoughCollection.class.php
Returns a new iterator for the collection.
getKeyId
CoughObject::getKeyId() in CoughObject.class.php
Returns the current value of the object's primary key id.
getKeysWithPrefix
CoughObject::getKeysWithPrefix() in CoughObject.class.php
Returns a sub array of the given array containing all elements that have keys starting with the specified prefix. The resulting array's keys have the prefix removed.
getKeyValueIterator
CoughCollection::getKeyValueIterator() in CoughCollection.class.php
Returns a new key-value iterator for the collection.
getLast
CoughCollection::getLast() in CoughCollection.class.php
The last element in the array/collection.
getLastInsertId
CoughDatabaseInterface::getLastInsertId() in CoughDatabaseInterface.class.php
getLoadSql
CoughObjectStaticInterface::getLoadSql() in CoughObjectStaticInterface.class.php
getLoadSql
CoughCollection::getLoadSql() in CoughCollection.class.php
Returns the base SQL to use for the collection.
getModifiedFields
CoughObject::getModifiedFields() in CoughObject.class.php
Get a list of all of this object's modified values.
getPk
CoughObject::getPk() in CoughObject.class.php
Returns the primary key as an array of [field_name] => field_value pairs
getPkFieldNames
CoughObjectStaticInterface::getPkFieldNames() in CoughObjectStaticInterface.class.php
getPosition
CoughCollection::getPosition() in CoughCollection.class.php
Get the $n-th position in the array, regardless of key indices.
getRow
CoughDatabaseResultInterface::getRow() in CoughDatabaseResultInterface.class.php
getTableName
CoughObjectStaticInterface::getTableName() in CoughObjectStaticInterface.class.php
getTemporaryKey
CoughCollection::getTemporaryKey() in CoughCollection.class.php
Returns a temporary key for adding an object that does not have a key ID yet.
getUniqueDatabases
CoughDatabaseFactory::getUniqueDatabases() in CoughDatabaseFactory.class.php
Same as getDatabases(), except it rolls up all aliases using the same connection into one array entry.
getUpdateFields
CoughObject::getUpdateFields() in CoughObject.class.php
Returns the fields that should be used for updating. This logic is separate from the update method to make it easy to override the behavior.
getValidationErrors
CoughObject::getValidationErrors() in CoughObject.class.php
Returns the validation errors set by `validateData()`.
h
top
has
CoughInstancePool::has() in CoughInstancePool.class.php
hasKeyId
CoughObject::hasKeyId() in CoughObject.class.php
Returns true if all the key fields that make up the primary key are set to non-null values.
hasModifiedFields
CoughObject::hasModifiedFields() in CoughObject.class.php
Whether or not there is at least one modified field.
i
top
$instances
CoughInstancePool::$instances in CoughInstancePool.class.php
$isDeleted
CoughObject::$isDeleted in CoughObject.class.php
Stores whether or not the object has been deleted from the database.
$isNew
CoughObject::$isNew in CoughObject.class.php
Stores whether or not the object is new (i.e. not in database yet).
inflate
CoughObject::inflate() in CoughObject.class.php
Inflate/Invigorate the object with data.
inflateObject
CoughObject::inflateObject() in CoughObject.class.php
This helper method for inflate() handles inflation of related objects.
initializeDefinitions
CoughObject::initializeDefinitions() in CoughObject.class.php
Sets the cough object's basic identity:
insert
CoughObject::insert() in CoughObject.class.php
Inserts a new row to the database and sets the object's key id with the returned database insert id.
invalidateField
CoughObject::invalidateField() in CoughObject.class.php
Invalidates a field with an optional message.
isDataValid
CoughObject::isDataValid() in CoughObject.class.php
Returns true if the data is valid (i.e. no validation errors set), otherwise it returns false.
isDeleted
CoughObject::isDeleted() in CoughObject.class.php
Specifies whether or not the object has been deleted from the database.
isEmpty
CoughCollection::isEmpty() in CoughCollection.class.php
Find out whether or not the collection is empty.
isEqualTo
CoughObject::isEqualTo() in CoughObject.class.php
This will compare two CoughObjects and return true if they are of the same type and have the same field values (excluding the primary key).
isFieldModified
CoughObject::isFieldModified() in CoughObject.class.php
Whether or not the specified field has been modified.
isFieldValid
CoughObject::isFieldValid() in CoughObject.class.php
Returns true if the field is valid (i.e. no validation errors set), otherwise it returns false.
isInflated
CoughObject::isInflated() in CoughObject.class.php
Returns whether or not the object is inflated (i.e. pulled from persistent storage)
isNew
CoughObject::isNew() in CoughObject.class.php
Returns whether or not the object is new (i.e. not in persistent storage)
k
top
$keyMethod
CoughKeyValueIterator::$keyMethod in CoughKeyValueIterator.class.php
key
CoughKeyValueIterator::key() in CoughKeyValueIterator.class.php
l
top
load
CoughCollection::load() in CoughCollection.class.php
Loads the collection using the SQL provided by getLoadSql()
loadBySql
CoughCollection::loadBySql() in CoughCollection.class.php
Loads the collection using the provided SQL
m
top
$modifiedFields
CoughObject::$modifiedFields in CoughObject.class.php
An array of fields that have been modified.
n
top
notifyChildrenOfKeyChange
This method's job is to notify related collections (if any) of the key change.
o
top
$objectDefinitions
CoughObject::$objectDefinitions in CoughObject.class.php
An array of all the objects and their attributes.
$objects
CoughObject::$objects in CoughObject.class.php
An array of all the loaded objects in form [objectName] => [CoughObject]
q
top
query
CoughDatabaseInterface::query() in CoughDatabaseInterface.class.php
quote
CoughDatabaseInterface::quote() in CoughDatabaseInterface.class.php
r
top
$removedElements
CoughCollection::$removedElements in CoughCollection.class.php
Holds all the (unsaved) removed elements
remove
CoughInstancePool::remove() in CoughInstancePool.class.php
remove
CoughCollection::remove() in CoughCollection.class.php
Removes a single element given either an ID or the object itself.
removeAll
CoughInstancePool::removeAll() in CoughInstancePool.class.php
removeByKey
CoughCollection::removeByKey() in CoughCollection.class.php
Removes a single element from the collection by key.
removeByReference
CoughCollection::removeByReference() in CoughCollection.class.php
Removes a single element from the collection by comparing references.
reset
CoughDatabaseFactory::reset() in CoughDatabaseFactory.class.php
Restore CoughDatabaseFactory to its initial state (no configs, no database objects).
resetModified
CoughObject::resetModified() in CoughObject.class.php
Clear the list of modified fields and other modified flags.
s
top
save
CoughObject::save() in CoughObject.class.php
Creates a new entry if needed, otherwise it updates an existing one.
save
CoughCollection::save() in CoughCollection.class.php
Run save on each collected (or removed) element.
saveLoadedCollections
CoughObject::saveLoadedCollections() in CoughObject.class.php
Saves all the loaded collections (if it wasn't loaded there would be nothing to save)
saveLoadedObjects
CoughObject::saveLoadedObjects() in CoughObject.class.php
Saves all the loaded objects (if it wasn't loaded there would be nothing to save)
selectDb
CoughDatabaseInterface::selectDb() in CoughDatabaseInterface.class.php
setConfigs
CoughDatabaseFactory::setConfigs() in CoughDatabaseFactory.class.php
Sets all the database configs at once.
setDerivedField
CoughObject::setDerivedField() in CoughObject.class.php
Sets a read-only field; It's usually a derived field from a complex SQL query such as when overriding the getLoadSql() function.
setField
CoughObject::setField() in CoughObject.class.php
Sets the current value of $fieldName to $value.
setFields
CoughObject::setFields() in CoughObject.class.php
Sets the current value of the all the object's defined fields equal to the values passed in the $fields associative array.
setFieldsIfDifferent
CoughObject::setFieldsIfDifferent() in CoughObject.class.php
Sets fields in the given hash, but only if they new values are different from the existing values
setKeyId
CoughObject::setKeyId() in CoughObject.class.php
Sets the object's primary key id to the passed value.
setModifiedField
CoughObject::setModifiedField() in CoughObject.class.php
Add a field to the list of modified fields
shouldInsert
CoughObject::shouldInsert() in CoughObject.class.php
Indicates whether or not a save should insert a new record or update an existing one.
sortByKeys
CoughCollection::sortByKeys() in CoughCollection.class.php
Sort the collection from an array of keys (where the keys are in the desired order).
sortByMethod
CoughCollection::sortByMethod() in CoughCollection.class.php
Sort the collection from the return value of the specified method name of the collected objects.
sortByMethods
CoughCollection::sortByMethods() in CoughCollection.class.php
Sort the collection from the return value of the specified method names of the collected objects.
splitArrayWithPrefix
CoughObject::splitArrayWithPrefix() in CoughObject.class.php
Returns a sub array of the given array containing all elements that have keys starting with the specified prefix. The resulting array's keys have the prefix removed.
t
top
titleCase
CoughObject::titleCase() in CoughObject.class.php
u
top
underscore
CoughObject::underscore() in CoughObject.class.php
unsetKeysWithPrefix
CoughObject::unsetKeysWithPrefix() in CoughObject.class.php
Unsets all keys on the given array that start with the specified prefix.
update
CoughObject::update() in CoughObject.class.php
Updates the database with modified values, if any.
v
top
$validatedData
CoughObject::$validatedData in CoughObject.class.php
Keep track of whether or not data has been validated.
$validationErrors
CoughObject::$validationErrors in CoughObject.class.php
Stores validation errors set by `validateData` function.
$valueMethod
CoughKeyValueIterator::$valueMethod in CoughKeyValueIterator.class.php
validateData
CoughObject::validateData() in CoughObject.class.php
Validates data stored in the model. It is called automatically by `save`, which will return false if this function sets any errors.
a b c d e f g h i k l m n o q r s t u v _