Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PublishedArticleDAO Class Reference
Inheritance diagram for PublishedArticleDAO:
DAO

Public Member Functions

_returnPublishedArticleFromRow ($row, $callHooks=true)
 
 deletePublishedArticleByArticleId ($articleId)
 
 deletePublishedArticleById ($publishedArticleId)
 
 deletePublishedArticlesByIssueId ($issueId)
 
 deletePublishedArticlesBySectionId ($sectionId)
 
 getArticleYearRange ($journalId=null)
 
getBySetting ($settingName, $settingValue, $journalId=null)
 
 getInsertPublishedArticleId ()
 
 getPublishedArticleAuthors ($issueId)
 
getPublishedArticleByArticleId ($articleId, $journalId=null, $useCache=false)
 
getPublishedArticleByBestArticleId ($journalId, $articleId, $useCache=false)
 
getPublishedArticleById ($publishedArticleId, $simple=false)
 
getPublishedArticleByPubId ($pubIdType, $pubId, $journalId=null, $useCache=false)
 
 getPublishedArticleCountByJournalId ($journalId)
 
getPublishedArticleIdsAlphabetizedByJournal ($journalId=null, $useCache=true)
 
getPublishedArticleIdsByJournal ($journalId=null, $useCache=true)
 
 getPublishedArticleIdsBySection ($sectionId, $useCache=true)
 
getPublishedArticles ($issueId)
 
getPublishedArticlesByJournalId ($journalId=null, $rangeInfo=null, $reverse=false)
 
getPublishedArticlesBySectionId ($sectionId, $issueId, $simple=false)
 
getPublishedArticlesInSections ($issueId, $useCache=false)
 
 incrementViewsByArticleId ($articleId)
 
 insertPublishedArticle (&$publishedArticle)
 
 PublishedArticleDAO ()
 
 resequencePublishedArticles ($sectionId, $issueId)
 
 updatePublishedArticle ($publishedArticle)
 
 updatePublishedArticleField ($publishedArticleId, $field, $value)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($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

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying PublishedArticle objects.

See Also
PublishedArticle

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

Member Function Documentation

& PublishedArticleDAO::_returnPublishedArticleFromRow (   $row,
  $callHooks = true 
)

creates and returns a published article object from a row, including all supp files etc.

Parameters
$rowarray
$callHooksboolean Whether or not to call hooks
Returns
PublishedArticle object

Definition at line 615 of file PublishedArticleDAO.inc.php.

References HookRegistry\call(), and DAO\datetimeFromDB().

Referenced by getBySetting(), getPublishedArticleByArticleId(), getPublishedArticles(), and getPublishedArticlesInSections().

PublishedArticleDAO::deletePublishedArticleByArticleId (   $articleId)

Delete published article by article ID NOTE: This does not delete the related Article or any dependent entities

Parameters
$articleIdint

Definition at line 685 of file PublishedArticleDAO.inc.php.

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

PublishedArticleDAO::deletePublishedArticleById (   $publishedArticleId)

removes an published Article by id

Parameters
$publishedArticleIdint

Definition at line 672 of file PublishedArticleDAO.inc.php.

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

PublishedArticleDAO::deletePublishedArticlesByIssueId (   $issueId)

Delete published articles by issue ID

Parameters
$issueIdint

Definition at line 718 of file PublishedArticleDAO.inc.php.

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

PublishedArticleDAO::deletePublishedArticlesBySectionId (   $sectionId)

Delete published articles by section ID

Parameters
$sectionIdint

Definition at line 696 of file PublishedArticleDAO.inc.php.

References DAO\flushCache(), DAO\retrieve(), and DAO\update().

PublishedArticleDAO::getArticleYearRange (   $journalId = null)

Return years of oldest/youngest published article on site or within a journal

Parameters
$journalIdint
Returns
array

Definition at line 858 of file PublishedArticleDAO.inc.php.

References DAO\retrieve().

& PublishedArticleDAO::getBySetting (   $settingName,
  $settingValue,
  $journalId = null 
)

Find published articles by querying article settings.

Parameters
$settingNamestring
$settingValuemixed
$journalIdint optional
Returns
array The articles identified by setting.

Definition at line 443 of file PublishedArticleDAO.inc.php.

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

Referenced by getPublishedArticleByPubId().

PublishedArticleDAO::getInsertPublishedArticleId ( )

Get the ID of the last inserted published article.

Returns
int

Definition at line 664 of file PublishedArticleDAO.inc.php.

References DAO\getInsertId().

Referenced by insertPublishedArticle().

PublishedArticleDAO::getPublishedArticleAuthors (   $issueId)

Retrieve all authors from published articles

Parameters
$issueIdint
Returns
$authors array Author Objects

Definition at line 797 of file PublishedArticleDAO.inc.php.

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

& PublishedArticleDAO::getPublishedArticleByArticleId (   $articleId,
  $journalId = null,
  $useCache = false 
)

Retrieve published article by article id

Parameters
$articleIdint
$journalIdint optional
$useCacheboolean optional
Returns
PublishedArticle object

Definition at line 355 of file PublishedArticleDAO.inc.php.

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

Referenced by getPublishedArticleByBestArticleId().

& PublishedArticleDAO::getPublishedArticleByBestArticleId (   $journalId,
  $articleId,
  $useCache = false 
)

Retrieve published article by public article id or, failing that, internal article ID; public article ID takes precedence.

Parameters
$journalIdint
$articleIdstring
$useCacheboolean optional
Returns
PublishedArticle object

Definition at line 503 of file PublishedArticleDAO.inc.php.

References getPublishedArticleByArticleId(), and getPublishedArticleByPubId().

& PublishedArticleDAO::getPublishedArticleById (   $publishedArticleId,
  $simple = false 
)

Retrieve Published Article by pub id

Parameters
$publishedArticleIdint
$simpleboolean Whether or not to skip fetching dependent objects; default false
Returns
PublishedArticle object

Definition at line 326 of file PublishedArticleDAO.inc.php.

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

& PublishedArticleDAO::getPublishedArticleByPubId (   $pubIdType,
  $pubId,
  $journalId = null,
  $useCache = false 
)

Retrieve published article by public article id

Parameters
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).
$pubIdstring
$journalIdint
$useCacheboolean optional
Returns
PublishedArticle object

Definition at line 417 of file PublishedArticleDAO.inc.php.

References getBySetting().

Referenced by getPublishedArticleByBestArticleId().

PublishedArticleDAO::getPublishedArticleCountByJournalId (   $journalId)

Retrieve a count of published articles in a journal.

Definition at line 124 of file PublishedArticleDAO.inc.php.

References DAO\retrieve().

& PublishedArticleDAO::getPublishedArticleIdsAlphabetizedByJournal (   $journalId = null,
  $useCache = true 
)

Retrieve "article_id"s for published articles for a journal, sorted alphabetically. Note that if journalId is null, alphabetized article IDs for all journals are returned.

Parameters
$journalIdint optional
$useCacheboolean optional
Returns
Array

Definition at line 518 of file PublishedArticleDAO.inc.php.

References AppLocale\getLocale().

& PublishedArticleDAO::getPublishedArticleIdsByJournal (   $journalId = null,
  $useCache = true 
)

Retrieve "article_id"s for published articles for a journal, sorted by reverse publish date. Note that if journalId is null, alphabetized article IDs for all journals are returned.

Parameters
$journalIdint
Returns
Array

Definition at line 564 of file PublishedArticleDAO.inc.php.

PublishedArticleDAO::getPublishedArticleIdsBySection (   $sectionId,
  $useCache = true 
)

Retrieve "article_id"s for published articles for a journal section, sorted by reverse publish date.

Parameters
$sectionIdint
Returns
Array

Definition at line 589 of file PublishedArticleDAO.inc.php.

& PublishedArticleDAO::getPublishedArticles (   $issueId)

Retrieve Published Articles by issue id. Limit provides number of records to retrieve

Parameters
$issueIdint
Returns
PublishedArticle objects array

Definition at line 71 of file PublishedArticleDAO.inc.php.

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

& PublishedArticleDAO::getPublishedArticlesByJournalId (   $journalId = null,
  $rangeInfo = null,
  $reverse = false 
)

Retrieve all published articles in a journal.

Parameters
$journalIdint
$rangeInfoobject
$reverseboolean Whether to reverse the sort order
Returns
object

Definition at line 141 of file PublishedArticleDAO.inc.php.

References AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and DAO\retrieveRange().

& PublishedArticleDAO::getPublishedArticlesBySectionId (   $sectionId,
  $issueId,
  $simple = false 
)

Retrieve Published Articles by section id

Parameters
$sectionIdint
$issueIdint
$simpleboolean Whether or not to skip fetching dependent objects; default false
Returns
PublishedArticle objects array

Definition at line 269 of file PublishedArticleDAO.inc.php.

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

& PublishedArticleDAO::getPublishedArticlesInSections (   $issueId,
  $useCache = false 
)

Retrieve Published Articles by issue id

Parameters
$issueIdint
$useCacheboolean optional
Returns
PublishedArticle objects array

Definition at line 186 of file PublishedArticleDAO.inc.php.

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

PublishedArticleDAO::incrementViewsByArticleId (   $articleId)

Increment the views count for a galley.

Parameters
$articleIdint

Definition at line 846 of file PublishedArticleDAO.inc.php.

References DAO\update().

PublishedArticleDAO::insertPublishedArticle ( $publishedArticle)

inserts a new published article into published_articles table

Parameters
PublishedArticleobject
Returns
pubId int

Definition at line 641 of file PublishedArticleDAO.inc.php.

References DAO\datetimeToDB(), getInsertPublishedArticleId(), and DAO\update().

PublishedArticleDAO::PublishedArticleDAO ( )

Constructor.

Definition at line 58 of file PublishedArticleDAO.inc.php.

References DAORegistry\getDAO().

PublishedArticleDAO::resequencePublishedArticles (   $sectionId,
  $issueId 
)

Sequentially renumber published articles in their sequence order.

Definition at line 770 of file PublishedArticleDAO.inc.php.

References DAO\flushCache(), DAO\retrieve(), and DAO\update().

PublishedArticleDAO::updatePublishedArticle (   $publishedArticle)

updates a published article

Parameters
PublishedArticleobject

Definition at line 730 of file PublishedArticleDAO.inc.php.

References DAO\datetimeToDB(), DAO\flushCache(), and DAO\update().

PublishedArticleDAO::updatePublishedArticleField (   $publishedArticleId,
  $field,
  $value 
)

updates a published article field

Parameters
$publishedArticleIdint
$fieldstring
$valuemixed

Definition at line 759 of file PublishedArticleDAO.inc.php.

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


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