Method List
ActiveTable's API makes heavy use of #__call() method. The PHP manual explains #__call() as:
The magic method __call() allows to capture invocation of non existing methods. That way __call() can be used to implement user defined method handling that depends on the name of the actual method being called. This is for instance useful for proxy implementations. The arguments that were passed in the function will be defined as an array in the $arguments parameter. The value returned from the __call() method will be returned to the caller of the method.
So, methods that are called but not explicitly defined by the class or one of its ancestors are handed to #__call().
#get() Family
- #get(string column_name, string|null table_name) - Returns the value from a physical or virtual column. The table name may be specified to avoid column name collisions.
- #getColumnName() - Returns the value from a physical or virtual column. The method is never defined, but the appropriate #get() is generated from the method name.
- #getColumn_name() - A variation of #getColumnName() that does not rely on studly caps.
#set() Family
- #set(mixed value, string column_name, string|null table_name) - Set a column to a new value in-memory. The table name may be specified if there are write-enabled lookup tables to avoid column-name collision.
- #setColumnName(mixed value) - Sets a column to a new value in-memory. The method is never defined, but the appropriate #set() is generated from the method name.
- #setColumn_name() - A variation of #setColumnName() that does not rely on studly caps.
#findBy() Family
- #findBy(array conditions, string|null order_by_sql_fragment) - Perform a query with a WHERE clause and return an array of results.
- #findByColumnName(mixed value, string|null order_by_sql_fragment) - Perform a query with a ''WHERE column_name = value'' and return an array of results.
- #findByColumn_name(mixed value, string|null order_by_sql_fragment) - A variation of #findByColumnName() which does not rely on studly caps.
- #findOneBy(array, string|null order_by_sql_fragment) - An alias for #findBy() that places a LIMIT 1 on to the query and returns an object (or null, if no matching records are found) instead of an array of results.
- #findOneByColumnName(mixed value, string|null order_by_sql_fragment) - Perform a #findOneBy() with a ''WHERE column_name = value'' and return the result.
- #findByColumn_name(mixed value, string|null order_by_sql_fragment) - A variation of #findOneByColumnName() which does not rely on studly caps.
#grab() Family
- #grab(string recordset_name) - Perform a query to find and return an array of related (by a one-to-many relationship) records.
- #grabRecordsetName() - Perform a #grab() and return an array of related records.
- #grabRecordset_name() - A variation of #grabRecordSetName() that does not rely on studly caps.
CRUD
- #save() - Insert or update the record.
- #create() - Insert a record.
- #destroy() - Delete a record.
- #load() - Select a record and load it into the object.
Miscellaneous
- #sysdate() - Returns the current time in the correct format for the RDBMS that the object is connected to.
- #tableName() - Returns the primary table.
- #primaryKey() - Returns the primary key name.
- #database() - Returns the database being used.