| Server IP : 195.134.90.114 / Your IP : 216.73.216.86 Web Server : Apache/2.4.58 System : Linux nepub 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/public_html/lib/pkp/classes/controlledVocab/ |
Upload File : |
<?php
/**
* @defgroup controlled_vocab Controlled Vocabulary
*/
/**
* @file classes/controlledVocab/ControlledVocab.inc.php
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class ControlledVocab
* @ingroup controlled_vocab
* @see ControlledVocabDAO
*
* @brief Basic class describing an controlled vocab.
*/
class ControlledVocab extends DataObject {
//
// Get/set methods
//
/**
* get assoc id
* @return int
*/
function getAssocId() {
return $this->getData('assocId');
}
/**
* set assoc id
* @param $assocId int
*/
function setAssocId($assocId) {
$this->setData('assocId', $assocId);
}
/**
* Get associated type.
* @return int
*/
function getAssocType() {
return $this->getData('assocType');
}
/**
* Set associated type.
* @param $assocType int
*/
function setAssocType($assocType) {
$this->setData('assocType', $assocType);
}
/**
* Get symbolic name.
* @return string
*/
function getSymbolic() {
return $this->getData('symbolic');
}
/**
* Set symbolic name.
* @param $symbolic string
*/
function setSymbolic($symbolic) {
$this->setData('symbolic', $symbolic);
}
/**
* Get a list of controlled vocabulary options.
* @param $settingName string optional
* @return array $controlledVocabEntryId => name
*/
function enumerate($settingName = 'name') {
$controlledVocabDao = DAORegistry::getDAO('ControlledVocabDAO'); /* @var $controlledVocabDao ControlledVocabDAO */
return $controlledVocabDao->enumerate($this->getId(), $settingName);
}
}