Open Monograph Press  3.3.0
ONIXCodelistItemDAO Class Reference
Inheritance diagram for ONIXCodelistItemDAO:
DAO

Public Member Functions

 __construct ()
 
 _cacheMiss ($cache, $id)
 
_fromRow ($code, &$entry)
 
_getCache ($locale=null)
 
 codeExistsInList ($code, $list)
 
 getCodeFromValue ($value, $list)
 
getCodelistItems ($list, $locale=null)
 
getCodes ($list, $codesToExclude=array(), $codesFilter=null, $locale=null)
 
 getFilename ($locale)
 
 getListName ()
 
 newDataObject ()
 
 setListName ($list)
 
- 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)
 

Data Fields

 $_list
 
- Data Fields inherited from DAO
 $_dataSource
 

Additional Inherited Members

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

Detailed Description

Parent class for operations involving Codelist objects.

See also
CodelistItem

Definition at line 20 of file ONIXCodelistItemDAO.inc.php.

Constructor & Destructor Documentation

◆ __construct()

ONIXCodelistItemDAO::__construct ( )

Constructor.

Definition at line 28 of file ONIXCodelistItemDAO.inc.php.

Member Function Documentation

◆ _cacheMiss()

ONIXCodelistItemDAO::_cacheMiss (   $cache,
  $id 
)

◆ _fromRow()

& ONIXCodelistItemDAO::_fromRow (   $code,
$entry 
)

Internal function to return a Codelist object from a row.

Parameters
$rowarray
Returns
CodelistItem

Definition at line 230 of file ONIXCodelistItemDAO.inc.php.

References HookRegistry\call(), and newDataObject().

Referenced by getCodelistItems().

◆ _getCache()

& ONIXCodelistItemDAO::_getCache (   $locale = null)

◆ codeExistsInList()

ONIXCodelistItemDAO::codeExistsInList (   $code,
  $list 
)

Determines if a particular code value is valid for a given list.

Returns
boolean

Definition at line 207 of file ONIXCodelistItemDAO.inc.php.

References getCodes().

◆ getCodeFromValue()

ONIXCodelistItemDAO::getCodeFromValue (   $value,
  $list 
)

Returns an ONIX code based on a unique value and List number.

Returns
string

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

References getCodes().

◆ getCodelistItems()

& ONIXCodelistItemDAO::getCodelistItems (   $list,
  $locale = null 
)

Retrieve an array of all the codelist items.

Parameters
$listthe List string for this code list (i.e., List30)
$localean optional locale to use
Returns
array of CodelistItems

Definition at line 169 of file ONIXCodelistItemDAO.inc.php.

References _fromRow(), _getCache(), and setListName().

◆ getCodes()

& ONIXCodelistItemDAO::getCodes (   $list,
  $codesToExclude = array(),
  $codesFilter = null,
  $locale = null 
)

Retrieve an array of all codelist codes and values for a given list.

Parameters
$listthe List string for this code list (i.e., List30)
$codesToExcludean optional list of codes to exclude from the returned list
$codesFilteran optional filter to match codes against.
$localean optional locale to use
Returns
array of CodelistItem names

Definition at line 187 of file ONIXCodelistItemDAO.inc.php.

References _getCache(), and setListName().

Referenced by codeExistsInList(), and getCodeFromValue().

◆ getFilename()

ONIXCodelistItemDAO::getFilename (   $locale)

Get the filename for the ONIX codelist document. Use a localized version if available, but if not, fall back on the master locale.

Parameters
$localestring Locale code
Returns
string Path and filename to ONIX codelist document

Definition at line 128 of file ONIXCodelistItemDAO.inc.php.

References PKPLocale\isLocaleValid().

Referenced by _cacheMiss(), and _getCache().

◆ getListName()

ONIXCodelistItemDAO::getListName ( )

Get the base node name particular codelist database.

Returns
string

Definition at line 151 of file ONIXCodelistItemDAO.inc.php.

References $_list.

Referenced by _cacheMiss(), and _getCache().

◆ newDataObject()

ONIXCodelistItemDAO::newDataObject ( )

Get the name of the CodelistItem subclass.

Returns
ONIXCodelistItem

Definition at line 159 of file ONIXCodelistItemDAO.inc.php.

Referenced by _fromRow().

◆ setListName()

ONIXCodelistItemDAO::setListName (   $list)

Set the name of the list we want.

Parameters
$liststring

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

Referenced by getCodelistItems(), and getCodes().

Field Documentation

◆ $_list

ONIXCodelistItemDAO::$_list

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

Referenced by getListName().


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