PHP Class IssueDAO, ojs

Inheritance: extends DAO, implements PKPPubIdPluginDAO
Mostrar archivo Open project: pkp/ojs Class Usage Examples

Public Properties

Property Type Description
$caches

Public Methods

Method Description
_cacheMiss ( $cache, $id ) : Issue Handle a cache miss.
_getCache ( $cacheId ) : GenericCache Get an issue cache by cache ID.
_returnIssueFromRow ( $row ) : Issue creates and returns an issue object from a row
changePubId ( $issueId, $pubIdType, $pubId )
customIssueOrderingExists ( $journalId ) : boolean Check if a journal has custom issue ordering.
deleteAllPubIds ( $journalId, $pubIdType )
deleteByJournalId ( $journalId ) Delete issues by journal id. Deletes dependent entities.
deleteCustomIssueOrdering ( $journalId ) Delete the custom ordering of a published issue.
deleteObject ( $issue ) Delete issue. Deletes associated issue galleys, cover pages, and published articles.
deletePubId ( $issueId, $pubIdType )
flushCache ( ) Flush the issue cache.
getAdditionalFieldNames ( ) : array Get a list of additional fields that do not have dedicated accessors.
getByBestId ( $issueId, $journalId = null, $useCache = false ) : Issue Retrieve Issue by "best" issue id -- public ID if it exists, falling back on the internal issue ID otherwise.
getById ( $issueId, $journalId = null, $useCache = false ) : Issue Retrieve Issue by issue id
getByPubId ( $pubIdType, $pubId, $journalId = null, $useCache = false ) : Issue Retrieve Issue by public issue id
getBySetting ( $settingName, $settingValue, $journalId = null ) : array Find issues by querying issue settings.
getCurrent ( $journalId, $useCache = false ) : Issue Retrieve current issue
getCustomIssueOrder ( $journalId, $issueId ) : integer Get the custom issue order of a journal.
getExportable ( $contextId, $pubIdType = null, $pubIdSettingName = null, $pubIdSettingValue = null, $rangeInfo = null ) : DAOResultFactory Get all published issues (eventually with a pubId assigned and) matching the specified settings.
getInsertId ( ) : integer Get the ID of the last inserted issue.
getIssueByArticleId ( $articleId, $journalId = null ) : Issue Get issue by article id
getIssues ( $journalId, $rangeInfo = null ) : ItemIterator Get all issues organized by published date
getIssuesByIdentification ( $journalId, $volume = null, $number = null, $year = null, $titles = [] ) : DAOResultFactory Retrieve Issues by identification
getLocaleFieldNames ( ) : array Get a list of fields for which localized data is supported
getNumArticles ( $issueId ) : integer Return number of articles assigned to an issue.
getPublishedIssues ( $journalId, $rangeInfo = null ) : ItemIterator Get published issues organized by published date
getPublishedIssuesByNumber ( $journalId, $volume = null, $number = null, $year = null ) : Iterator Retrieve Issue by some combination of volume, number, and year
getUnpublishedIssues ( $journalId, $rangeInfo = null ) : ItemIterator Get unpublished issues organized by published date
insertCustomIssueOrder ( $journalId, $issueId, $seq ) INTERNAL USE ONLY: Insert a custom issue ordering
insertObject ( $issue ) : Issue inserts a new issue into issues table
issueExists ( $journalId, $volume, $number, $year, $issueId ) : boolean Check if volume, number and year have already been issued
issueIdExists ( $issueId, $journalId ) : boolean Checks if issue exists
moveCustomIssueOrder ( $journalId, $issueId, $newPos ) Move a custom issue ordering up or down, resequencing as necessary.
newDataObject ( ) : Issue Construct a new data object.
pubIdExists ( $pubIdType, $pubId, $issueId, $journalId )
resequenceCustomIssueOrders ( $journalId ) Sequentially renumber custom issue orderings in their sequence order.
setDefaultCustomIssueOrders ( $journalId ) Import the current issue orders into the specified journal as custom issue orderings.
updateCurrent ( $journalId, $issue = null ) : Issue update current issue
updateLocaleFields ( &$issue ) Update the localized fields for this object.
updateObject ( $issue ) updates an issue

Method Details

_cacheMiss() public method

Handle a cache miss.
public _cacheMiss ( $cache, $id ) : Issue
$cache GenericCache
$id string
return Issue

_getCache() public method

Get an issue cache by cache ID.
public _getCache ( $cacheId ) : GenericCache
$cacheId string
return GenericCache

_returnIssueFromRow() public method

creates and returns an issue object from a row
public _returnIssueFromRow ( $row ) : Issue
$row array
return Issue object

changePubId() public method

public changePubId ( $issueId, $pubIdType, $pubId )

customIssueOrderingExists() public method

Check if a journal has custom issue ordering.
public customIssueOrderingExists ( $journalId ) : boolean
$journalId int
return boolean

deleteAllPubIds() public method

public deleteAllPubIds ( $journalId, $pubIdType )

deleteByJournalId() public method

Delete issues by journal id. Deletes dependent entities.
public deleteByJournalId ( $journalId )
$journalId int

deleteCustomIssueOrdering() public method

Delete the custom ordering of a published issue.
public deleteCustomIssueOrdering ( $journalId )
$journalId int

deleteObject() public method

Delete issue. Deletes associated issue galleys, cover pages, and published articles.
public deleteObject ( $issue )
$issue object issue

deletePubId() public method

public deletePubId ( $issueId, $pubIdType )

flushCache() public method

Flush the issue cache.
public flushCache ( )

getAdditionalFieldNames() public method

Get a list of additional fields that do not have dedicated accessors.
public getAdditionalFieldNames ( ) : array
return array

getByBestId() public method

Retrieve Issue by "best" issue id -- public ID if it exists, falling back on the internal issue ID otherwise.
public getByBestId ( $issueId, $journalId = null, $useCache = false ) : Issue
$issueId string
$journalId int optional
$useCache boolean optional
return Issue object

getById() public method

Retrieve Issue by issue id
public getById ( $issueId, $journalId = null, $useCache = false ) : Issue
$issueId int
$journalId int optional
$useCache boolean optional
return Issue object

getByPubId() public method

Retrieve Issue by public issue id
public getByPubId ( $pubIdType, $pubId, $journalId = null, $useCache = false ) : Issue
$pubIdType string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see ).
$pubId string
$journalId int optional
$useCache boolean optional
return Issue object

getBySetting() public method

Find issues by querying issue settings.
public getBySetting ( $settingName, $settingValue, $journalId = null ) : array
$settingName string
$settingValue mixed
$journalId int optional
return array The issues identified by setting.

getCurrent() public method

Retrieve current issue
public getCurrent ( $journalId, $useCache = false ) : Issue
$journalId int
$useCache boolean optional
return Issue object

getCustomIssueOrder() public method

Get the custom issue order of a journal.
public getCustomIssueOrder ( $journalId, $issueId ) : integer
$journalId int
$issueId int
return integer

getExportable() public method

Get all published issues (eventually with a pubId assigned and) matching the specified settings.
public getExportable ( $contextId, $pubIdType = null, $pubIdSettingName = null, $pubIdSettingValue = null, $rangeInfo = null ) : DAOResultFactory
$contextId integer optional
$pubIdType string
$pubIdSettingName string optional (e.g. crossref::registeredDoi)
$pubIdSettingValue string optional
$rangeInfo DBResultRange optional
return DAOResultFactory

getInsertId() public method

Get the ID of the last inserted issue.
public getInsertId ( ) : integer
return integer

getIssueByArticleId() public method

Get issue by article id
public getIssueByArticleId ( $articleId, $journalId = null ) : Issue
return Issue object

getIssues() public method

Get all issues organized by published date
public getIssues ( $journalId, $rangeInfo = null ) : ItemIterator
$journalId int
$rangeInfo object DBResultRange (optional)
return ItemIterator

getIssuesByIdentification() public method

Retrieve Issues by identification
public getIssuesByIdentification ( $journalId, $volume = null, $number = null, $year = null, $titles = [] ) : DAOResultFactory
$journalId int
$volume int
$number string
$year int
$titles array
return DAOResultFactory

getLocaleFieldNames() public method

Get a list of fields for which localized data is supported
public getLocaleFieldNames ( ) : array
return array

getNumArticles() public method

Return number of articles assigned to an issue.
public getNumArticles ( $issueId ) : integer
$issueId int
return integer

getPublishedIssues() public method

Get published issues organized by published date
public getPublishedIssues ( $journalId, $rangeInfo = null ) : ItemIterator
$journalId int
$rangeInfo object DBResultRange
return ItemIterator

getPublishedIssuesByNumber() public method

Retrieve Issue by some combination of volume, number, and year
public getPublishedIssuesByNumber ( $journalId, $volume = null, $number = null, $year = null ) : Iterator
$journalId int
$volume int
$number int
$year int
return Iterator object

getUnpublishedIssues() public method

Get unpublished issues organized by published date
public getUnpublishedIssues ( $journalId, $rangeInfo = null ) : ItemIterator
$journalId int
$rangeInfo object DBResultRange
return ItemIterator

insertCustomIssueOrder() public method

INTERNAL USE ONLY: Insert a custom issue ordering
public insertCustomIssueOrder ( $journalId, $issueId, $seq )
$journalId int
$issueId int
$seq int

insertObject() public method

inserts a new issue into issues table
public insertObject ( $issue ) : Issue
return Issue Id int

issueExists() public method

Check if volume, number and year have already been issued
public issueExists ( $journalId, $volume, $number, $year, $issueId ) : boolean
$journalId int
$volume int
$number int
$year int
$issueId int Issue ID to exclude from results
return boolean

issueIdExists() public method

Checks if issue exists
public issueIdExists ( $issueId, $journalId ) : boolean
$issueId int
$journalId int
return boolean

moveCustomIssueOrder() public method

Move a custom issue ordering up or down, resequencing as necessary.
public moveCustomIssueOrder ( $journalId, $issueId, $newPos )
$journalId int
$issueId int
$newPos int The new position (0-based) of this section

newDataObject() public method

Construct a new data object.
public newDataObject ( ) : Issue
return Issue

pubIdExists() public method

public pubIdExists ( $pubIdType, $pubId, $issueId, $journalId )

resequenceCustomIssueOrders() public method

Sequentially renumber custom issue orderings in their sequence order.
public resequenceCustomIssueOrders ( $journalId )
$journalId int

setDefaultCustomIssueOrders() public method

Import the current issue orders into the specified journal as custom issue orderings.
public setDefaultCustomIssueOrders ( $journalId )
$journalId int

updateCurrent() public method

update current issue
public updateCurrent ( $journalId, $issue = null ) : Issue
return Issue object

updateLocaleFields() public method

Update the localized fields for this object.
public updateLocaleFields ( &$issue )
$issue

updateObject() public method

updates an issue
public updateObject ( $issue )

Property Details

$caches public_oe property

public $caches