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

Public Member Functions

 _fromRow ($row)
 
 deleteByAssoc ($assocType, $assocId)
 
 deleteById ($spotlightId)
 
 deleteByTypeId ($typeId)
 
 deleteObject ($spotlight)
 
 getByAssoc ($assocType, $assocId, $rangeInfo=null)
 
 getById ($spotlightId)
 
 getByPressId ($pressId, $rangeInfo=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 getMostRecentSpotlightByAssoc ($assocType, $assocId)
 
 getNumSpotlightsByAssoc ($assocType, $assocId, $rangeInfo=null)
 
 getRandomByPressId ($pressId, $quantity=1)
 
 getSpotlightAssocId ($spotlightId)
 
 getSpotlightAssocType ($spotlightId)
 
 insertObject ($spotlight)
 
 newDataObject ()
 
 SpotlightDAO ()
 
 updateLocaleFields (&$spotlight)
 
 updateObject ($spotlight)
 
- 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)
 

Additional Inherited Members

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

Detailed Description

Operations for retrieving and modifying Spotlight objects.

See Also
Spotlight

Definition at line 19 of file SpotlightDAO.inc.php.

Member Function Documentation

SpotlightDAO::_fromRow (   $row)

Internal function to return an Spotlight object from a row.

Parameters
$rowarray
Returns
Spotlight

Definition at line 99 of file SpotlightDAO.inc.php.

References newDataObject().

Referenced by getById(), and getMostRecentSpotlightByAssoc().

SpotlightDAO::deleteByAssoc (   $assocType,
  $assocId 
)

Delete spotlights by Assoc ID

Parameters
$assocTypeint
$assocIdint

Definition at line 203 of file SpotlightDAO.inc.php.

References deleteById().

SpotlightDAO::deleteById (   $spotlightId)

Delete an spotlight by spotlight ID.

Parameters
$spotlightIdint
Returns
boolean

Definition at line 181 of file SpotlightDAO.inc.php.

References DAO\update().

Referenced by deleteByAssoc(), and deleteObject().

SpotlightDAO::deleteByTypeId (   $typeId)

Delete spotlights by spotlight type ID.

Parameters
$typeIdint
Returns
boolean

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

References deleteObject().

SpotlightDAO::deleteObject (   $spotlight)

Delete a spotlight.

Parameters
$spotlightSpotlight
Returns
boolean

Definition at line 172 of file SpotlightDAO.inc.php.

References deleteById().

Referenced by deleteByTypeId().

SpotlightDAO::getByAssoc (   $assocType,
  $assocId,
  $rangeInfo = null 
)

Retrieve an array of spotlights matching a particular assoc ID.

Parameters
$assocTypeint
$assocIdint
Returns
object DAOResultFactory containing matching Spotlights

Definition at line 279 of file SpotlightDAO.inc.php.

References DAO\retrieveRange().

SpotlightDAO::getById (   $spotlightId)

Retrieve a spotlight by spotlight ID.

Parameters
$spotlightIdint
Returns
Spotlight

Definition at line 32 of file SpotlightDAO.inc.php.

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

SpotlightDAO::getByPressId (   $pressId,
  $rangeInfo = null 
)

Retrieve an array of spotlights matching a press id.

Parameters
$pressIdint
Returns
array Array containing matching Spotlights

Definition at line 216 of file SpotlightDAO.inc.php.

References DAO\retrieveRange().

Referenced by getRandomByPressId().

SpotlightDAO::getInsertId ( )

Get the ID of the last inserted spotlight.

Returns
int

Definition at line 338 of file SpotlightDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

SpotlightDAO::getLocaleFieldNames ( )

Get the list of localized field names for this table

Returns
array

Definition at line 82 of file SpotlightDAO.inc.php.

SpotlightDAO::getMostRecentSpotlightByAssoc (   $assocType,
  $assocId 
)

Retrieve most recent spotlight by Assoc ID.

Parameters
$assocTypeint
Returns
Spotlight

Definition at line 316 of file SpotlightDAO.inc.php.

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

SpotlightDAO::getNumSpotlightsByAssoc (   $assocType,
  $assocId,
  $rangeInfo = null 
)

Retrieve an array of numSpotlights spotlights matching a particular Assoc ID.

Parameters
$assocTypeint
Returns
object DAOResultFactory containing matching Spotlights

Definition at line 297 of file SpotlightDAO.inc.php.

References DAO\retrieveRange().

SpotlightDAO::getRandomByPressId (   $pressId,
  $quantity = 1 
)

Retrieve a random spotlight matching a press id.

Parameters
$pressIdint
$quantityint (optional) If more than one is needed, specify here.
Returns
array or null

Definition at line 247 of file SpotlightDAO.inc.php.

References getByPressId().

SpotlightDAO::getSpotlightAssocId (   $spotlightId)

Retrieve spotlight Assoc ID by spotlight ID.

Parameters
$spotlightIdint
Returns
int

Definition at line 51 of file SpotlightDAO.inc.php.

References DAO\retrieve().

SpotlightDAO::getSpotlightAssocType (   $spotlightId)

Retrieve spotlight Assoc ID by spotlight ID.

Parameters
$spotlightIdint
Returns
int

Definition at line 67 of file SpotlightDAO.inc.php.

References DAO\retrieve().

SpotlightDAO::insertObject (   $spotlight)

Insert a new Spotlight.

Parameters
$spotlightSpotlight
Returns
int

Definition at line 126 of file SpotlightDAO.inc.php.

References getInsertId(), DAO\update(), and updateLocaleFields().

SpotlightDAO::newDataObject ( )

Get a new data object.

Returns
DataObject

Definition at line 90 of file SpotlightDAO.inc.php.

Referenced by _fromRow().

SpotlightDAO::SpotlightDAO ( )

Constructor

Definition at line 23 of file SpotlightDAO.inc.php.

SpotlightDAO::updateLocaleFields ( $spotlight)

Update the settings for this object

Parameters
$spotlightobject

Definition at line 115 of file SpotlightDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

SpotlightDAO::updateObject (   $spotlight)

Update an existing spotlight.

Parameters
$spotlightSpotlight
Returns
boolean

Definition at line 148 of file SpotlightDAO.inc.php.

References DAO\update(), and updateLocaleFields().


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