Omeka_Controller_Action_Helper_Db

class Omeka_Controller_Action_Helper_Db

Package: Controller\ActionHelper

An action helper replacement for the database-oriented methods that were baked into Omeka_Controller_AbstractActionController in v1.x.

property _db
property _defaultTable
property _defaultModel
property _findByLimit
__construct(Omeka_Db $db)
Parameters:
init()
__call($method, $args)

Delegate to the default table object for all other method calls.

Parameters:
  • $method (unknown) –
  • $args (unknown) –
setDefaultModelName($modelName)

Set the class name corresponding to the default model.

Parameters:
  • $modelName (unknown) –
getDefaultModelName()
setDefaultTable(Omeka_Db_Table $table)
Parameters:
getDb()
getTable(string|null $tableName)
Parameters:
  • $tableName (string|null) –
Returns:

Omeka_Db_Table

findById($id, $table)

Find a particular record given its unique ID # and (optionally) its class name.

Parameters:
  • $id (unknown) –
  • $table (unknown) –
Returns:

Omeka_Record_AbstractRecord