PHP Class PublishedArticleDAO, ojs

Inheritance: extends DAO
Mostra file Open project: pkp/ojs

Public Properties

Property Type Description
$articleCache GenericCache
$articlesInSectionsCache GenericCache
$galleyDao ArticleGalleyDAO

Public Methods

Method Description
__construct ( ) Constructor.
_articleCacheMiss ( $cache, $id ) : PublishedArticle Handle an article cache miss
_articlesInSectionsCacheMiss ( $cache, $id ) : array Handle a cache miss from the "articles in sections" cache
_fromRow ( $row, $callHooks = true ) : PublishedArticle creates and returns a published article object from a row
_getArticlesInSectionsCache ( ) : GenericCache Get a the "articles in sections" article cache
_getPublishedArticleCache ( ) : GenericCache Get a the published article cache
deletePublishedArticleByArticleId ( $articleId ) Delete published article by article ID NOTE: This does not delete the related Article or any dependent entities
deletePublishedArticleById ( $publishedArticleId ) removes an published Article by id
deletePublishedArticlesByIssueId ( $issueId ) Delete published articles by issue ID
deletePublishedArticlesBySectionId ( $sectionId ) Delete published articles by section ID
getArticleYearRange ( $journalId = null ) : array Return years of oldest/youngest published article on site or within a journal
getBySetting ( $settingName, $settingValue, $journalId = null ) : array Find published articles by querying article settings.
getExportable ( $contextId, $pubIdType = null, $title = null, $author = null, $issueId = null, $pubIdSettingName = null, $pubIdSettingValue = null, $rangeInfo = null ) : DAOResultFactory Get all published submissions (eventually with a pubId assigned and) matching the specified settings.
getInsertId ( ) : integer Get the ID of the last inserted published article.
getPublishedArticleByArticleId ( $articleId, $journalId = null, $useCache = false ) : PublishedArticle Retrieve published article by article id
getPublishedArticleByBestArticleId ( $journalId, $articleId, $useCache = false ) : PublishedArticle Retrieve published article by public article id or, failing that, internal article ID; public article ID takes precedence.
getPublishedArticleById ( $publishedArticleId ) : PublishedArticle Retrieve Published Article by pub id
getPublishedArticleByPubId ( $pubIdType, $pubId, $journalId = null, $useCache = false ) : PublishedArticle Retrieve published article by public article id
getPublishedArticleCountByJournalId ( $journalId ) Retrieve a count of published articles in a journal.
getPublishedArticleIdsAlphabetizedByJournal ( $journalId = null, $useCache = true ) : Array Retrieve "submission_id"s for published articles for a journal, sorted alphabetically.
getPublishedArticleIdsByJournal ( $journalId = null, $useCache = true ) : array Retrieve "submission_id"s for published articles for a journal, sorted by reverse publish date.
getPublishedArticleIdsBySection ( $sectionId, $useCache = true ) : array Retrieve "submission_id"s for published articles for a journal section, sorted by reverse publish date.
getPublishedArticles ( $issueId ) : PublishedArticle Retrieve Published Articles by issue id. Limit provides number of records to retrieve
getPublishedArticlesByJournalId ( $journalId = null, $rangeInfo = null, $reverse = false ) : DAOResultFactory Retrieve all published articles in a journal.
getPublishedArticlesBySectionId ( $sectionId, $issueId ) : PublishedArticle Retrieve Published Articles by section id
getPublishedArticlesInSections ( $issueId, $useCache = false ) : array Retrieve Published Articles by issue id
insertObject ( $publishedArticle ) : pubId inserts a new published article into published_submissions table
newDataObject ( ) : PublishedArticle Get a new data object.
resequencePublishedArticles ( $sectionId, $issueId ) Sequentially renumber published articles in their sequence order.
updatePublishedArticle ( $publishedArticle ) updates a published article
updatePublishedArticleField ( $publishedArticleId, $field, $value ) Updates a published article field

Method Details

__construct() public method

Constructor.
public __construct ( )

_articleCacheMiss() public method

Handle an article cache miss
public _articleCacheMiss ( $cache, $id ) : PublishedArticle
$cache GenericCache
$id mixed Article ID (potentially non-numeric)
return PublishedArticle

_articlesInSectionsCacheMiss() public method

Handle a cache miss from the "articles in sections" cache
public _articlesInSectionsCacheMiss ( $cache, $id ) : array
$cache GenericCache
$id int Issue ID
return array

_fromRow() public method

creates and returns a published article object from a row
public _fromRow ( $row, $callHooks = true ) : PublishedArticle
$row array
$callHooks boolean Whether or not to call hooks
return PublishedArticle object

_getArticlesInSectionsCache() public method

Get a the "articles in sections" article cache
public _getArticlesInSectionsCache ( ) : GenericCache
return GenericCache

_getPublishedArticleCache() public method

Get a the published article cache
public _getPublishedArticleCache ( ) : GenericCache
return GenericCache

deletePublishedArticleByArticleId() public method

Delete published article by article ID NOTE: This does not delete the related Article or any dependent entities
public deletePublishedArticleByArticleId ( $articleId )
$articleId int

deletePublishedArticleById() public method

removes an published Article by id
public deletePublishedArticleById ( $publishedArticleId )
$publishedArticleId int

deletePublishedArticlesByIssueId() public method

Delete published articles by issue ID
public deletePublishedArticlesByIssueId ( $issueId )
$issueId int

deletePublishedArticlesBySectionId() public method

Delete published articles by section ID
public deletePublishedArticlesBySectionId ( $sectionId )
$sectionId int

getArticleYearRange() public method

Return years of oldest/youngest published article on site or within a journal
public getArticleYearRange ( $journalId = null ) : array
$journalId int Optional
return array (maximum date published, minimum date published)

getBySetting() public method

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

getExportable() public method

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

getInsertId() public method

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

getPublishedArticleByArticleId() public method

Retrieve published article by article id
public getPublishedArticleByArticleId ( $articleId, $journalId = null, $useCache = false ) : PublishedArticle
$articleId int
$journalId int optional
$useCache boolean optional
return PublishedArticle object

getPublishedArticleByBestArticleId() public method

Retrieve published article by public article id or, failing that, internal article ID; public article ID takes precedence.
public getPublishedArticleByBestArticleId ( $journalId, $articleId, $useCache = false ) : PublishedArticle
$journalId int
$articleId string
$useCache boolean optional
return PublishedArticle object

getPublishedArticleById() public method

Retrieve Published Article by pub id
public getPublishedArticleById ( $publishedArticleId ) : PublishedArticle
$publishedArticleId int
return PublishedArticle object

getPublishedArticleByPubId() public method

Retrieve published article by public article id
public getPublishedArticleByPubId ( $pubIdType, $pubId, $journalId = null, $useCache = false ) : PublishedArticle
$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
$useCache boolean optional
return PublishedArticle object

getPublishedArticleCountByJournalId() public method

Retrieve a count of published articles in a journal.
public getPublishedArticleCountByJournalId ( $journalId )
$journalId int

getPublishedArticleIdsAlphabetizedByJournal() public method

Note that if journalId is null, alphabetized article IDs for all enabled journals are returned.
public getPublishedArticleIdsAlphabetizedByJournal ( $journalId = null, $useCache = true ) : Array
$journalId int Optional journal ID to restrict results to
$useCache boolean optional
return Array

getPublishedArticleIdsByJournal() public method

Note that if journalId is null, alphabetized article IDs for all journals are returned.
public getPublishedArticleIdsByJournal ( $journalId = null, $useCache = true ) : array
$journalId int Journal ID (optional)
$useCache boolean (optional; default true)
return array

getPublishedArticleIdsBySection() public method

Retrieve "submission_id"s for published articles for a journal section, sorted by reverse publish date.
public getPublishedArticleIdsBySection ( $sectionId, $useCache = true ) : array
$sectionId int
$useCache boolean Optional (default true)
return array

getPublishedArticles() public method

Retrieve Published Articles by issue id. Limit provides number of records to retrieve
public getPublishedArticles ( $issueId ) : PublishedArticle
$issueId int
return PublishedArticle objects array

getPublishedArticlesByJournalId() public method

Retrieve all published articles in a journal.
public getPublishedArticlesByJournalId ( $journalId = null, $rangeInfo = null, $reverse = false ) : DAOResultFactory
$journalId int
$rangeInfo object
$reverse boolean Whether to reverse the sort order
return DAOResultFactory

getPublishedArticlesBySectionId() public method

Retrieve Published Articles by section id
public getPublishedArticlesBySectionId ( $sectionId, $issueId ) : PublishedArticle
$sectionId int
$issueId int
return PublishedArticle objects array

getPublishedArticlesInSections() public method

Retrieve Published Articles by issue id
public getPublishedArticlesInSections ( $issueId, $useCache = false ) : array
$issueId int
$useCache boolean optional
return array Array of PublishedArticle objects

insertObject() public method

inserts a new published article into published_submissions table
public insertObject ( $publishedArticle ) : pubId
return pubId int

newDataObject() public method

Get a new data object.
public newDataObject ( ) : PublishedArticle
return PublishedArticle

resequencePublishedArticles() public method

Sequentially renumber published articles in their sequence order.
public resequencePublishedArticles ( $sectionId, $issueId )
$sectionId int
$issueId int

updatePublishedArticle() public method

updates a published article
public updatePublishedArticle ( $publishedArticle )

updatePublishedArticleField() public method

Updates a published article field
public updatePublishedArticleField ( $publishedArticleId, $field, $value )
$publishedArticleId int
$field string
$value mixed

Property Details

$articleCache public_oe property

public GenericCache $articleCache
return GenericCache

$articlesInSectionsCache public_oe property

public GenericCache $articlesInSectionsCache
return GenericCache

$galleyDao public_oe property

public ArticleGalleyDAO $galleyDao
return ArticleGalleyDAO