-
$className
-
-
$clientFlags
-
-
$collections
-
An array of all the loaded collections in form [collectionName] => [CoughCollection]
-
$columnName
-
-
$columns
-
-
$config
-
Configuration object for this class
-
$config
-
Configuration object for this class
-
$config
-
Configuration object for this class
-
$config
-
-
$config
-
Configuration object for this class
-
$config
-
Configuration object for this class
-
$configs
-
An array of database config info.
-
$connected
-
-
$connection
-
-
$contents
-
-
clearQueryLog
-
-
clearValidationErrors
-
Clear validation status.
-
commit
-
Commit a transaction.
-
constructByConfig
-
-
constructByConfig
-
creates a new As_Database connection from a DSN
-
constructByFields
-
-
constructByKey
-
-
constructByKey
-
Constructs a new object from a single id (for single key PKs) or a hash of [field_name] => [field_value].
-
constructBySql
-
Constructs a new object from custom SQL.
-
constructBySql
-
-
constructDatabaseByConfig
-
returns the correct database adapter object
-
constructFromFile
-
-
constructFromFile
-
-
constructFromFile
-
-
convertIdToEntityName
-
Converts an id field into an object name (in most cases this simply involves stripping off an "_id" suffix).
-
CoughCollection.class.php
-
-
CoughDatabaseFactory.class.php
-
-
CoughDatabaseInterface.class.php
-
-
CoughDatabaseResultInterface.class.php
-
-
CoughInstancePool.class.php
-
-
CoughIterator.class.php
-
-
CoughKeyValueIterator.class.php
-
-
CoughObject.class.php
-
-
CoughObjectStaticInterface.class.php
-
-
CoughAsDatabase
-
Cough DAL (Database Adapter Layer) for the "as_database" module.
-
CoughAsDatabaseResult
-
The query result object returned by CoughAsDatabase::query().
-
CoughClass
-
CoughGenerator creates these, CoughWriter compares them to what's on disk and chooses which ones to write to disk (and where).
-
CoughCollection
-
CoughCollection collects CoughObjects.
-
CoughConfig
-
Base config class for other config classes to extend.
-
CoughDatabaseFactory
-
A simple factory that provides access to an application's database objects.
-
CoughDatabaseInterface
-
Any database object that Cough uses must implement this interface.
-
CoughDatabaseResultInterface
-
Any database result object that Cough uses must implement this interface.
-
CoughGenerator
-
CoughGenerator takes config and schema and generates CoughClass objects.
-
CoughGeneratorConfig
-
Config class for CoughGenerator.
-
CoughGeneratorFacade
-
The CoughGeneratorFacade class provides a simple interface to the process of generating a schema from a database, manipulating it and converting FKs to relationships, and passing that info to the CoughGenerator which generates the classes.
-
CoughInstancePool
-
Unused class, but will be available in the future.
-
CoughIterator
-
CoughCollection objects use CoughIterator
-
CoughKeyValueIterator
-
Custom iterator constructed by CoughCollection::getKeyValueIterator()
-
CoughObject
-
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
-
This interface must be implemented in the concrete/generated classes.
-
CoughWriter
-
Takes CoughClass objects and writes them disk.
-
CoughClass.class.php
-
-
CoughConfig.class.php
-
-
CoughGenerator.class.php
-
-
CoughGeneratorConfig.class.php
-
-
CoughGeneratorFacade.class.php
-
-
CoughWriter.class.php
-
-
current
-
-
CoughAsDatabase.class.php
-
-
CoughAsDatabaseResult.class.php
-
-
$database
-
-
$databaseName
-
-
$databaseName
-
-
$databaseNames
-
Format:
-
$databases
-
-
$databases
-
Stores the databases (SchemaDatabase) that have been loaded into memory so far.
-
$databases
-
Format:
-
$db
-
-
$dbConfigs
-
An array of database config info.
-
$dbHost
-
-
$dbLink
-
-
$dbLink
-
-
$dbLink
-
-
$dbName
-
-
$dbPassword
-
-
$dbPort
-
-
$dbUser
-
-
$debug
-
-
$defaultValue
-
-
$derivedFieldDefinitions
-
An array of derived field definitions
-
$derivedFields
-
An array of derived fields (read-only, as in not saved back to the database).
-
DatabaseSchemaGenerator
-
Takes database config info and generates a schema (a collection of databases each containing a collection of tables each containing a collection of columns)
-
DatabaseSchemaGeneratorConfig
-
Config class for DatabaseSchemaGenerator.
-
defineDerivedFields
-
Override in sub-class to define derived fields the object may possess.
-
defineFields
-
Override in sub-class to define fields the object possesses, including $pkFieldNames.
-
defineObjects
-
Override in sub-class to define objects the object possesses.
-
deflate
-
Returns object to it's own state, except what you want to keep. By default it empties everything; overridden version only empties yours.
-
delete
-
-
delete
-
Deletes the record from the database, if hasKeyId returns true.
-
disableVerbose
-
Disable verbose mode
-
disableVerbose
-
Disable verbose mode
-
disableVerbose
-
Disable verbose mode
-
doValidateData
-
Do the actual data validation. Override in sub classes.
-
DriverDatabase
-
Defines the interface for a Database Driver.
-
DriverServer
-
Defines the interface for a Server Driver.
-
DriverTable
-
Defines the interface for a Table Driver, which should:
-
DatabaseSchemaGenerator.class.php
-
-
DatabaseSchemaGeneratorConfig.class.php
-
-
DriverDatabase.class.php
-
-
DriverServer.class.php
-
-
DriverTable.class.php
-
-
$generatedClasses
-
Storage for the generated CoughClass objects
-
$groupBy
-
-
generate
-
-
generateBaseCollection
-
Generates the base collection class
-
generateBaseObject
-
Generates the base object class
-
generateCoughClasses
-
Generates Cough classes from a Schema or SchemaTable object. (It just calls the appropriate generation method based on the object type.)
-
generateCoughClassesFromSchema
-
Generates Cough classes from a Schema object.
-
generateCoughClassesFromSchemaTable
-
Generates Cough classes from a SchemaTable object.
-
generateError
-
-
generateError
-
-
generateError
-
-
generateFromConfigPath
-
-
generateLoadSql
-
Generate the loadSql for a given SchemaTable object (excluding WHERE clause).
-
generatePhpdocTags
-
Generates an array of common phpDoc tags.
-
generateSchema
-
-
generateSchema
-
Traverse all the databases, tables, and columns to build a schema, which basically contains the same information with the addition of relationships between tables.
-
generateSchema
-
Generate/load the schema and return it.
-
generateSet
-
-
generateStarterCollection
-
Generates the starter collection class
-
generateStarterObject
-
Generates the starter object class
-
generateWhere
-
-
get
-
Returns the element at the given key.
-
get
-
-
getAffectedRows
-
-
getArrayValueFromMultiKey
-
Takes a source array and an array of keys and attempts to traverse the source array using the keys. It's a way to dynamically retrieve a value deep in an array using keys that are not none until runtime.
-
getAvailableDatabaseNames
-
Get a list of available database names.
-
getAvailableDatabaseNames
-
Get a list of available database names.
-
getAvailableTableNames
-
-
getAvailableTableNames
-
-
getBaseCollectionClassName
-
-
getBaseObjectClassName
-
-
getCamelCase
-
getCamelCase takes the given string and returns it in camelCase format, with underscores removed.
-
getClassFileName
-
-
getClassFilePath
-
-
getClassName
-
-
getClassName
-
-
getClone
-
Hack for versions of PHP that do not work with clone
-
getCollectionExtensionClassName
-
-
getColumn
-
-
getColumnName
-
-
getColumns
-
-
getConfigPath
-
-
getConfigs
-
Get all the database configs CoughDatabaseFactory is currently aware of.
-
getConfigValue
-
Internal method to get a configuration setting. If a database name is given,
-
getContents
-
-
getDatabase
-
-
getDatabase
-
-
getDatabase
-
-
getDatabase
-
Get the database object for the specified alias
-
getDatabase
-
Get the specified database name, or null if it hasn't been set yet.
-
getDatabaseName
-
-
getDatabaseName
-
-
getDatabaseName
-
Get the actual database name for the specified alias.
-
getDatabases
-
Returns the databases that were loaded from the server's DSN.
-
getDatabases
-
Get all the currently constructed database objects.
-
getDb
-
-
getDb
-
Returns a reference to the database object to use for queries.
-
getDbName
-
-
getDefaultValue
-
-
getDerivedField
-
Returns the specified derived field name.
-
getDsn
-
-
getEntityName
-
Given a table object, it gets the "entity name", currently just strips any prefixes specified in the config from the table name, otherwise just returns the table name.
-
getEqualityOperatorFromValue
-
returns the proper equality operator from the value being tested
-
getError
-
Returns the error message from the last query run.
-
getErrorMessages
-
Retrieve any error messages set by other methods.
-
getErrorMessages
-
getErrorMesages() returns an array of error messages, if any.
-
getField
-
Returns the current value of the requested field name.
-
getFieldAliases
-
Helper method for generating SELECT criteria for other join tables.
-
getFields
-
Returns the object's fields as an array of [key] => [value] pairs.
-
getFieldsWithoutPk
-
Get all non-primary key related fields and their values.
-
getForeignCollectionName
-
-
getForeignKey
-
Returns the existing foreign key (with same local key name) if one exists, otherwise returns null.
-
getForeignKeys
-
-
getForeignObjectName
-
-
getForeignTableAliasName
-
-
getFoundRows
-
Returns the number of found rows from the last run query.
-
getFrom
-
-
getGeneratedClasses
-
Get the generated classes
-
getGroupBy
-
-
getHabtmRelationships
-
-
getHasManyRelationship
-
-
getHasManyRelationships
-
-
getHasOneRelationship
-
-
getHasOneRelationships
-
-
getHaving
-
-
getIdRegex
-
Returns an array of regexes to match against in order to determine if a field should be considered an ID field, in order of precedence.
-
getIdToTableRegex
-
Returns an array of regexes to match against in order to determine if a field can be mapped to a table name, in order of precedence.
-
getInsertFields
-
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.
-
getInsertID
-
-
getInsertQuery
-
-
getIterator
-
Returns a new iterator for the collection.
-
getKeyId
-
Returns the current value of the object's primary key id.
-
getKeysWithPrefix
-
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
-
Returns a new key-value iterator for the collection.
-
getLastInsertId
-
-
getLastInsertId
-
-
getLimit
-
-
getLoadSql
-
Returns the base SQL to use for the collection.
-
getLoadSql
-
-
getLocalDatabaseName
-
-
getLocalKey
-
-
getLocalKeyName
-
-
getLocalObjectName
-
-
getLocalObjectName
-
-
getLocalTable
-
-
getLocalTableName
-
-
getLocalTableName
-
-
getModifiedFields
-
Get a list of all of this object's modified values.
-
getNumberOfHasManyRelationships
-
-
getNumberOfHasOneRelationships
-
-
getNumRows
-
-
getObjectExtensionClassName
-
-
getOffset
-
-
getOrderBy
-
-
getPhpdocAuthor
-
-
getPhpdocCopyright
-
-
getPhpdocPackage
-
-
getPk
-
Returns the primary key as an array of [field_name] => field_value pairs
-
getPkFieldNames
-
-
getPosition
-
Get the $n-th position in the array, regardless of key indices.
-
getPrimaryKey
-
-
getPrimaryKeyOverride
-
-
getQuery
-
-
getQueryLog
-
-
getQueryLogTime
-
-
getRefDatabaseName
-
-
getRefKey
-
-
getRefKeyName
-
-
getRefObjectName
-
-
getRefObjectName
-
-
getRefTable
-
-
getRefTableName
-
-
getRefTableName
-
-
getResultObjectFromResource
-
-
getResultObjectFromResource
-
-
getRow
-
-
getRow
-
-
getRows
-
-
getSchema
-
-
getSchema
-
-
getSchema
-
Get the Schema / DriverServer object.
-
getSchema
-
-
getSecondsBehindMaster
-
-
getSelect
-
-
getSelectQuery
-
-
getServer
-
-
getSize
-
-
getStarterCollectionClassName
-
-
getStarterObjectClassName
-
-
getString
-
-
getString
-
-
getString
-
-
getString
-
-
getString
-
-
getTable
-
-
getTable
-
-
getTableName
-
-
getTableName
-
-
getTableName
-
-
getTableNamePrefixes
-
-
getTableNameWithoutPrefix
-
-
getTables
-
-
getTemporaryKey
-
Returns a temporary key for adding an object that does not have a key ID yet.
-
getTestForMatch
-
-
getTestForNonMatch
-
-
getTitleCase
-
getTitleCase() takes the given string and returns it in TitleCase format (sometimes called UpperCamelCase), with underscores removed.
-
getType
-
-
getUniqueDatabases
-
Same as getDatabases(), except it rolls up all aliases using the same connection into one array entry.
-
getUniqueQueryLog
-
Like the query log, but it rolls up all duplicate queries into only one entry in the array. It adds a count value equal to the number of times the query was run, and the time value is equal to the total time of each query run.
-
getUpdateFields
-
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.
-
getUpdateQuery
-
-
getValidationErrors
-
Returns the validation errors set by `validateData()`.
-
getWarnings
-
-
getWhere
-
-
$instances
-
-
$inTransaction
-
Whether or not we are currently in a transaction.
-
$isCollectionClass
-
-
$isDeleted
-
Stores whether or not the object has been deleted from the database.
-
$isLinked
-
-
$isNew
-
Stores whether or not the object is new (i.e. not in database yet).
-
$isNullAllowed
-
-
$isPrimaryKey
-
-
$isStarterClass
-
-
inflate
-
Inflate/Invigorate the object with data.
-
inflateObject
-
This helper method for inflate() handles inflation of related objects.
-
initConfig
-
-
initConfig
-
Initialize the configuration object given an array or pre-constructed configuration object.
-
initConfig
-
-
initConfig
-
Initialize the configuration object given an array or pre-constructed configuration object.
-
initConfig
-
Initializes config to the defaults
-
initConfig
-
Initialize the configuration object given an array or pre-constructed configuration object.
-
initConfig
-
-
initConfig
-
Initialize the configuration object given an array or pre-constructed configuration object.
-
initConfig
-
Initialize the configuration object given an array or pre-constructed configuration object.
-
initConnection
-
-
initializeDefinitions
-
Sets the cough object's basic identity:
-
insert
-
Perform an INSERT.
-
INSERT
-
-
insert
-
Inserts a new row to the database and sets the object's key id with the returned database insert id.
-
insertMultiple
-
-
insertOnDupUpdate
-
Like insertOrUpdate, except a WHERE clause is not required
-
insertOrCancel
-
-
insertOrUpdate
-
-
invalidateField
-
Invalidates a field with an optional message.
-
isCollectionClass
-
-
isDataValid
-
Returns true if the data is valid (i.e. no validation errors set), otherwise it returns false.
-
isDeleted
-
Specifies whether or not the object has been deleted from the database.
-
isEmpty
-
Find out whether or not the collection is empty.
-
isEqualTo
-
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
-
Whether or not the specified field has been modified.
-
isFieldValid
-
Returns true if the field is valid (i.e. no validation errors set), otherwise it returns false.
-
isInflated
-
Returns whether or not the object is inflated (i.e. pulled from persistent storage)
-
isInTransaction
-
-
isKeyNullable
-
Returns false if all keys are NOT NULL, true otherwise.
-
isLinked
-
-
isNew
-
Returns whether or not the object is new (i.e. not in persistent storage)
-
isNullAllowed
-
-
isPrimaryKey
-
-
isStarterClass
-
-
$limit
-
-
$localDatabaseName
-
-
$localKey
-
-
$localKeyName
-
-
$localObjectName
-
-
$localRefObjectName
-
-
$localTable
-
-
$localTableName
-
-
$logBacktraces
-
Whether or not to log backtraces when logging queries
-
$logQueries
-
Whether or not to log all queries (to variable)
-
linkRelationships
-
Traverses all tables and uses any Foreign Key information to generate
-
load
-
Loads the collection using the SQL provided by getLoadSql()
-
loadBySql
-
Loads the collection using the provided SQL
-
loadColumns
-
-
loadColumns
-
-
loadDatabase
-
Load a specific database schema into memory.
-
loadDatabase
-
Load a specific database schema into memory.
-
loadDatabases
-
Load all database schemas for the currently connected server into memory.
-
loadDatabases
-
Load all database schemas for the currently connected server into memory.
-
loadDrivers
-
Load database schema drivers for the specified path and driver prefix.
-
loadSchema
-
Loads the schema into memory according to the config (e.g. only includes databases and tables the config allows).
-
loadSchema
-
Loads the schema into memory according to the config (e.g. only includes databases and tables the config allows).
-
loadTable
-
Load a specific database table into memory.
-
loadTable
-
-
loadTables
-
Load all tables for the database into memory.
-
loadTables
-
-
logException
-
Logs the given exception (currently just saves the message to the error array)
-
$schema
-
A reference to the schema to manipulate
-
$schema
-
Schema object (mostly likely an instanceof Schema)
-
$schema
-
Schema object (mostly likely an instanceof Schema)
-
$select
-
-
$server
-
-
$size
-
-
$sqlFunction
-
-
save
-
Creates a new entry if needed, otherwise it updates an existing one.
-
save
-
Run save on each collected (or removed) element.
-
saveLoadedCollections
-
Saves all the loaded collections (if it wasn't loaded there would be nothing to save)
-
saveLoadedObjects
-
Saves all the loaded objects (if it wasn't loaded there would be nothing to save)
-
Schema
-
Schema contains one or more databases, which each may have info about one or more tables, which each may have info about one or more columns, which each have info about whether it is a primary key, null is allowed, its type, etc.
-
Schema.class.php
-
-
SchemaColumn.class.php
-
-
SchemaDatabase.class.php
-
-
SchemaForeignKey.class.php
-
-
SchemaManipulator.class.php
-
-
SchemaRelationship.class.php
-
-
SchemaRelationshipHasMany.class.php
-
-
SchemaRelationshipHasOne.class.php
-
-
SchemaTable.class.php
-
-
SchemaColumn
-
SchemaColumn contains information about one column (its attributes).
-
SchemaDatabase
-
SchemaDatabase contains information about one database (its tables).
-
SchemaForeignKey
-
undocumented class
-
SchemaGenerator
-
Defines the interface for all SchemaGenerators.
-
SchemaManipulator
-
Takes a schema (and config) and runs through the schema in an effort to detect foreign keys that may have been missed (or simply weren't specified at the database level).
-
SchemaRelationship
-
The base SchemaRelationship class contains and provides accessors to the local table object and key and the reference (foreign) table object and key.
-
SchemaRelationshipHasMany
-
SchemaRelationshipHasMany adds methods to pull it's "has one" counterpart.
-
SchemaRelationshipHasOne
-
SchemaRelationshipHasOne adds methods to pull it's "has many" counterpart.
-
SchemaTable
-
SchemaTable contains information about one table (its columns).
-
SchemaGenerator.class.php
-
-
SCOPE_DATABASE
-
-
SCOPE_GLOBAL
-
-
SCOPE_TABLE
-
-
select
-
-
selectDB
-
-
selectDb
-
-
selectDb
-
-
selectDb
-
-
setClassName
-
-
setColumnName
-
-
setConfigs
-
Sets all the database configs at once.
-
setContents
-
-
setDatabase
-
-
setDatabaseConfigs
-
Sets all the database configs at once.
-
setDatabaseName
-
-
setDatabaseName
-
-
setDb
-
-
setDefaultValue
-
-
setDerivedField
-
Sets a read-only field; It's usually a derived field from a complex SQL query such as when overriding the getLoadSql() function.
-
setField
-
Sets the current value of $fieldName to $value.
-
setFields
-
-
setFields
-
Sets the current value of the all the object's defined fields equal to the values passed in the $fields associative array.
-
setFieldsIfDifferent
-
Sets fields in the given hash, but only if they new values are different from the existing values
-
setFrom
-
-
setGroupBy
-
-
setHasManyRelationship
-
-
setHasOneRelationship
-
-
setHaving
-
-
setIsCollectionClass
-
-
setIsLinked
-
-
setIsNullAllowed
-
-
setIsPrimaryKey
-
-
setIsStarterClass
-
-
setKeyId
-
Sets the object's primary key id to the passed value.
-
setLimit
-
-
setLocalDatabaseName
-
-
setLocalKey
-
-
setLocalKeyName
-
-
setLocalObjectName
-
-
setLocalObjectName
-
-
setLocalTable
-
-
setLocalTableName
-
-
setModifiedField
-
Add a field to the list of modified fields
-
setOffset
-
-
setOrderBy
-
-
setRefDatabaseName
-
-
setRefKey
-
-
setRefKeyName
-
-
setRefObjectName
-
-
setRefObjectName
-
-
setRefTable
-
-
setRefTableName
-
-
setSchema
-
Set the Schema / DriverServer object.
-
setSelect
-
-
setServer
-
-
setSize
-
-
setTable
-
-
setTableName
-
-
setTableName
-
-
setTableName
-
-
setType
-
-
setWhere
-
-
setWhere
-
-
shouldGenerateForTable
-
-
shouldGenerateHasManyMethods
-
-
shouldGenerateHasOneMethods
-
-
shouldGenerateLoadSqlInnerJoins
-
-
shouldInsert
-
Indicates whether or not a save should insert a new record or update an existing one.
-
shouldProcessDatabase
-
Returns whether not the given database name should be processed.
-
shouldProcessTable
-
Returns whether not the given table name (for the given database name) should be processed.
-
shouldScanForJoin
-
Returns whether or not a the $sourceTable cares about the $refDatabase when looking for joins.
-
showStatus
-
-
showStatusFromConfigPath
-
-
sortByKeys
-
Sort the collection from an array of keys (where the keys are in the desired order).
-
sortByMethod
-
Sort the collection from the return value of the specified method name of the collected objects.
-
sortByMethods
-
Sort the collection from the return value of the specified method names of the collected objects.
-
splitArrayWithPrefix
-
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.
-
startLoggingQueries
-
-
startTransaction
-
Starts a transaction.
-
stopLoggingQueries
-