Public Member Functions

SpotlightDAO Class Reference

Operations for retrieving and modifying Spotlight objects. More...

List of all members.

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)
getByTypeId ($typeId, $rangeInfo=null)
 getInsertSpotlightId ()
 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)

Detailed Description

Operations for retrieving and modifying Spotlight objects.

See also:
Spotlight

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


Member Function Documentation

& SpotlightDAO._fromRow ( &$  row  ) 

Internal function to return an Spotlight object from a row.

Parameters:
$row array
Returns:
Spotlight

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

References newDataObject().

Referenced by getById(), and getMostRecentSpotlightByAssoc().

SpotlightDAO.deleteByAssoc ( assocType,
assocId 
)

Delete spotlights by Assoc ID

Parameters:
$assocType int
$assocId int

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

References deleteById().

SpotlightDAO.deleteById ( spotlightId  ) 

Delete an spotlight by spotlight ID.

Parameters:
$spotlightId int
Returns:
boolean

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

Referenced by deleteByAssoc(), and deleteObject().

SpotlightDAO.deleteByTypeId ( typeId  ) 

Delete spotlights by spotlight type ID.

Parameters:
$typeId int
Returns:
boolean

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

References deleteObject(), and getByTypeId().

SpotlightDAO.deleteObject ( spotlight  ) 

Delete a spotlight.

Parameters:
$spotlight Spotlight
Returns:
boolean

Definition at line 167 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:
$assocType int
$assocId int
Returns:
object DAOResultFactory containing matching Spotlights

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

& SpotlightDAO.getById ( spotlightId  ) 

Retrieve a spotlight by spotlight ID.

Parameters:
$spotlightId int
Returns:
Spotlight

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

References _fromRow().

& SpotlightDAO.getByPressId ( pressId,
rangeInfo = null 
)

Retrieve an array of spotlights matching a press id.

Parameters:
$pressId int
Returns:
array Array containing matching Spotlights

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

Referenced by getRandomByPressId().

& SpotlightDAO.getByTypeId ( typeId,
rangeInfo = null 
)

Retrieve an array of spotlights matching a particular type ID.

Parameters:
$typeId int
Returns:
object DAOResultFactory containing matching Spotlights

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

Referenced by deleteByTypeId().

SpotlightDAO.getInsertSpotlightId (  ) 

Get the ID of the last inserted spotlight.

Returns:
int

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

Referenced by insertObject().

SpotlightDAO.getLocaleFieldNames (  ) 

Get the list of localized field names for this table

Returns:
array

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

& SpotlightDAO.getMostRecentSpotlightByAssoc ( assocType,
assocId 
)

Retrieve most recent spotlight by Assoc ID.

Parameters:
$assocType int
Returns:
Spotlight

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

References _fromRow().

& SpotlightDAO.getNumSpotlightsByAssoc ( assocType,
assocId,
rangeInfo = null 
)

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

Parameters:
$assocType int
Returns:
object DAOResultFactory containing matching Spotlights

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

SpotlightDAO.getRandomByPressId ( pressId,
quantity = 1 
)

Retrieve a random spotlight matching a press id.

Parameters:
$pressId int
$quantity int (optional) If more than one is needed, specify here.
Returns:
array or null

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

References getByPressId().

SpotlightDAO.getSpotlightAssocId ( spotlightId  ) 

Retrieve spotlight Assoc ID by spotlight ID.

Parameters:
$spotlightId int
Returns:
int

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

SpotlightDAO.getSpotlightAssocType ( spotlightId  ) 

Retrieve spotlight Assoc ID by spotlight ID.

Parameters:
$spotlightId int
Returns:
int

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

SpotlightDAO.insertObject ( &$  spotlight  ) 

Insert a new Spotlight.

Parameters:
$spotlight Spotlight
Returns:
int

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

References getInsertSpotlightId(), and updateLocaleFields().

SpotlightDAO.newDataObject (  ) 

Get a new data object.

Returns:
DataObject

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

Referenced by _fromRow().

SpotlightDAO.SpotlightDAO (  ) 

Constructor

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

SpotlightDAO.updateLocaleFields ( &$  spotlight  ) 

Update the settings for this object

Parameters:
$spotlight object

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

Referenced by insertObject(), and updateObject().

SpotlightDAO.updateObject ( &$  spotlight  ) 

Update an existing spotlight.

Parameters:
$spotlight Spotlight
Returns:
boolean

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

References updateLocaleFields().


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