Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ContextDAO Class Reference
Inheritance diagram for ContextDAO:
DAO PressDAO

Public Member Functions

 _fromRow ($row)
 
 ContextDAO ()
 
 deleteById ($contextId)
 
 deleteObject ($context)
 
 existsByPath ($path)
 
 getAll ($enabledOnly=false, $rangeInfo=null)
 
 getById ($contextId)
 
 getByPath ($path)
 
 getBySetting ($settingName, $settingValue, $contextId=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 getNames ($enabledOnly=false)
 
 resequence ()
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Protected Member Functions

 _getPrimaryKeyColumn ()
 
 _getSettingsTableName ()
 
 _getTableName ()
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying context objects.

See Also
DAO

Definition at line 17 of file ContextDAO.inc.php.

Member Function Documentation

ContextDAO::_fromRow (   $row)

Internal function to return a Context object from a row.

Parameters
$rowarray
Returns
Context

Definition at line 71 of file ContextDAO.inc.php.

References _getPrimaryKeyColumn(), and _getSettingsTableName().

Referenced by getById(), and getByPath().

ContextDAO::_getPrimaryKeyColumn ( )
protected

Get the name of the primary key column for this context.

Returns
string

Definition at line 234 of file ContextDAO.inc.php.

Referenced by _fromRow(), deleteById(), getById(), getBySetting(), getInsertId(), and resequence().

ContextDAO::_getSettingsTableName ( )
protected

Get the table name for this context's settings table.

Returns
string

Definition at line 226 of file ContextDAO.inc.php.

Referenced by _fromRow(), and getBySetting().

ContextDAO::_getTableName ( )
protected

Get the table name for this context.

Returns
string

Definition at line 218 of file ContextDAO.inc.php.

Referenced by deleteById(), existsByPath(), getAll(), getById(), getByPath(), getBySetting(), getInsertId(), and resequence().

ContextDAO::ContextDAO ( )

Constructor

Definition at line 21 of file ContextDAO.inc.php.

ContextDAO::deleteById (   $contextId)

Delete a context by ID.

Parameters
$contextIdint

Definition at line 174 of file ContextDAO.inc.php.

References _getPrimaryKeyColumn(), _getTableName(), DAORegistry\getDAO(), and DAO\update().

Referenced by deleteObject().

ContextDAO::deleteObject (   $context)

Delete a context by object

Parameters
$contextContext

Definition at line 166 of file ContextDAO.inc.php.

References deleteById().

ContextDAO::existsByPath (   $path)

Check if a context exists with a specified path.

Parameters
$pathstring the path for the context
Returns
boolean

Definition at line 85 of file ContextDAO.inc.php.

References _getTableName(), and DAO\retrieve().

ContextDAO::getAll (   $enabledOnly = false,
  $rangeInfo = null 
)

Retrieve all contexts.

Parameters
$enabledOnlytrue iff only enabled contexts should be included
$rangeInfoObject optional
Returns
DAOResultFactory containing matching Contexts

Definition at line 118 of file ContextDAO.inc.php.

References _getTableName(), and DAO\retrieveRange().

Referenced by getNames().

ContextDAO::getById (   $contextId)

Retrieve a context by context ID.

Parameters
$contextIdint
Returns
Context

Definition at line 30 of file ContextDAO.inc.php.

References _fromRow(), _getPrimaryKeyColumn(), _getTableName(), and DAO\retrieve().

ContextDAO::getByPath (   $path)

Retrieve a context by path.

Parameters
$pathstring
Returns
Context

Definition at line 100 of file ContextDAO.inc.php.

References _fromRow(), _getTableName(), and DAO\retrieve().

ContextDAO::getBySetting (   $settingName,
  $settingValue,
  $contextId = null 
)

Get journals by setting.

Parameters
$settingNamestring
$settingValuemixed
$contextIdint
Returns
DAOResultFactory

Definition at line 137 of file ContextDAO.inc.php.

References _getPrimaryKeyColumn(), _getSettingsTableName(), _getTableName(), and DAO\retrieve().

ContextDAO::getInsertId ( )

Get the ID of the last inserted context.

Returns
int

Definition at line 158 of file ContextDAO.inc.php.

References DAO\_getInsertId(), _getPrimaryKeyColumn(), and _getTableName().

Referenced by PressDAO\insertObject().

ContextDAO::getLocaleFieldNames ( )

Get a list of localized settings.

Returns
array

Definition at line 62 of file ContextDAO.inc.php.

ContextDAO::getNames (   $enabledOnly = false)

Retrieve the IDs and names of all contexts in an associative array.

Parameters
$enabledOnlytrue iff only enabled contexts are to be included
Returns
array

Definition at line 49 of file ContextDAO.inc.php.

References getAll().

ContextDAO::resequence ( )

Sequentially renumber each context according to their sequence order.

Definition at line 191 of file ContextDAO.inc.php.

References _getPrimaryKeyColumn(), _getTableName(), DAO\retrieve(), and DAO\update().


The documentation for this class was generated from the following file: