Open Journal Systems  3.3.0
InterestDAO Class Reference
Inheritance diagram for InterestDAO:
ControlledVocabDAO DAO

Public Member Functions

 build ()
 
 getAllInterests ($filter=null)
 
 getUserIdsByInterest ($interest)
 
 getUserInterestIds ($userId)
 
 setUserInterests ($interests, $userId)
 
- Public Member Functions inherited from ControlledVocabDAO
 _build ($symbolic, $assocType=0, $assocId=0)
 
 _fromRow ($row)
 
 deleteObject ($controlledVocab)
 
 deleteObjectById ($controlledVocabId)
 
 enumerate ($controlledVocabId, $settingName='name')
 
 enumerateBySymbolic ($symbolic, $assocType, $assocId, $settingName='name')
 
 getById ($controlledVocabId)
 
 getBySymbolic ($symbolic, $assocType=0, $assocId=0)
 
 getEntryDAO ()
 
 getInsertId ()
 
 insertObject ($controlledVocab, $dieOnError=true)
 
 installXML ($filename)
 
 newDataObject ()
 
 updateObject (&$controlledVocab)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getLocaleFieldNames ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($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, $content='')
 
- Data Fields inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Detailed Description

Operations for retrieving and modifying a user's review interests.

See also
User

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

Member Function Documentation

◆ build()

InterestDAO::build ( )

Create or return the Controlled Vocabulary for interests

Returns
ControlledVocab

Definition at line 27 of file InterestDAO.inc.php.

Referenced by getAllInterests(), getUserInterestIds(), and setUserInterests().

◆ getAllInterests()

InterestDAO::getAllInterests (   $filter = null)

Get all user's interests

Parameters
$filterstring (optional)
Returns
object

Definition at line 84 of file InterestDAO.inc.php.

References build(), and DAORegistry\getDAO().

◆ getUserIdsByInterest()

InterestDAO::getUserIdsByInterest (   $interest)

Get a list of user IDs attributed to an interest

Parameters
$userIdint
Returns
array

Definition at line 59 of file InterestDAO.inc.php.

References DAO\retrieve().

◆ getUserInterestIds()

InterestDAO::getUserInterestIds (   $userId)

Get a list of controlled vocabulary entry IDs (corresponding to interest keywords) attributed to a user

Parameters
$userIdint
Returns
array

Definition at line 36 of file InterestDAO.inc.php.

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

◆ setUserInterests()

InterestDAO::setUserInterests (   $interests,
  $userId 
)

Update a user's set of interests

Parameters
$interestsarray
$userIdint

Definition at line 105 of file InterestDAO.inc.php.

References build(), DAORegistry\getDAO(), and DAO\update().


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