Open Journal Systems  3.3.0
ControlledVocabDAO Class Reference
Inheritance diagram for ControlledVocabDAO:
DAO InterestDAO SubmissionAgencyDAO SubmissionDisciplineDAO SubmissionKeywordDAO SubmissionLanguageDAO SubmissionSubjectDAO

Public Member Functions

 _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 ControlledVocab objects.

See also
ControlledVocab

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

Member Function Documentation

◆ _build()

ControlledVocabDAO::_build (   $symbolic,
  $assocType = 0,
  $assocId = 0 
)

Fetch a controlled vocab by symbolic info, building it if needed.

Parameters
$symbolicstring
$assocTypeint
$assocIdint
Returns
$controlledVocab

Definition at line 54 of file ControlledVocabDAO.inc.php.

References getBySymbolic(), insertObject(), and newDataObject().

Referenced by installXML().

◆ _fromRow()

ControlledVocabDAO::_fromRow (   $row)

Internal function to return an ControlledVocab object from a row.

Parameters
$rowarray
Returns
ControlledVocab

Definition at line 86 of file ControlledVocabDAO.inc.php.

References newDataObject().

Referenced by getById(), and getBySymbolic().

◆ deleteObject()

ControlledVocabDAO::deleteObject (   $controlledVocab)

Delete a controlled vocab.

Parameters
$controlledVocabControlledVocab
Returns
boolean

Definition at line 149 of file ControlledVocabDAO.inc.php.

References deleteObjectById().

◆ deleteObjectById()

ControlledVocabDAO::deleteObjectById (   $controlledVocabId)

Delete a controlled vocab by controlled vocab ID.

Parameters
$controlledVocabIdint
Returns
boolean

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

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

Referenced by deleteObject().

◆ enumerate()

ControlledVocabDAO::enumerate (   $controlledVocabId,
  $settingName = 'name' 
)

Get a list of controlled vocabulary options.

Parameters
$controlledVocabIdint
$settingNamestring optional
Returns
array $controlledVocabEntryId => name

Definition at line 212 of file ControlledVocabDAO.inc.php.

References DAO\convertFromDB(), AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and DAO\retrieve().

Referenced by deleteObjectById().

◆ enumerateBySymbolic()

ControlledVocabDAO::enumerateBySymbolic (   $symbolic,
  $assocType,
  $assocId,
  $settingName = 'name' 
)

Get a list of controlled vocabulary options.

Parameters
$symbolicstring
$assocTypeint
$assocIdint
$settingNamestring optional
Returns
array $controlledVocabEntryId => $settingValue

Definition at line 197 of file ControlledVocabDAO.inc.php.

References getBySymbolic().

◆ getById()

ControlledVocabDAO::getById (   $controlledVocabId)

Retrieve a controlled vocab by controlled vocab ID.

Parameters
$controlledVocabIdint
Returns
ControlledVocab

Definition at line 34 of file ControlledVocabDAO.inc.php.

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

◆ getBySymbolic()

ControlledVocabDAO::getBySymbolic (   $symbolic,
  $assocType = 0,
  $assocId = 0 
)

Retrieve an array of controlled vocabs matching the specified symbolic name and assoc info.

Parameters
$symbolicstring
$assocTypeint
$assocIdint

Definition at line 175 of file ControlledVocabDAO.inc.php.

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

Referenced by _build(), enumerateBySymbolic(), and installXML().

◆ getEntryDAO()

ControlledVocabDAO::getEntryDAO ( )

Return the Controlled Vocab Entry DAO for this Controlled Vocab. Can be subclassed to provide extended DAOs.

Definition at line 25 of file ControlledVocabDAO.inc.php.

References DAORegistry\getDAO().

Referenced by installXML().

◆ getInsertId()

ControlledVocabDAO::getInsertId ( )

Get the ID of the last inserted controlled vocab.

Returns
int

Definition at line 248 of file ControlledVocabDAO.inc.php.

Referenced by insertObject().

◆ insertObject()

ControlledVocabDAO::insertObject (   $controlledVocab,
  $dieOnError = true 
)

Insert a new ControlledVocab.

Parameters
$controlledVocabControlledVocab
Returns
int? New insert ID on insert, or null on error

Definition at line 101 of file ControlledVocabDAO.inc.php.

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

Referenced by _build().

◆ installXML()

ControlledVocabDAO::installXML (   $filename)

Parse and install a controlled vocabulary from an XML file.

Parameters
$filenamestring Filename (including path) of XML file to install.
Returns
array Array of parsed controlled vocabularies

Definition at line 257 of file ControlledVocabDAO.inc.php.

References _build(), getBySymbolic(), and getEntryDAO().

◆ newDataObject()

ControlledVocabDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
ControlledVocabEntry

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

Referenced by _build(), and _fromRow().

◆ updateObject()

ControlledVocabDAO::updateObject ( $controlledVocab)

Update an existing controlled vocab.

Parameters
$controlledVocabControlledVocab
Returns
boolean

Definition at line 127 of file ControlledVocabDAO.inc.php.

References DAO\update().


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