Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
ArticleGalleyDAO Class Reference
Inheritance diagram for ArticleGalleyDAO:
DAO ArticleXMLGalleyDAO

Public Member Functions

_galleyCacheMiss (&$cache, $id)
 
_getGalleyCache ()
 
_returnGalleyFromRow (&$row)
 
 ArticleGalleyDAO ()
 
 changePubId ($galleyId, $pubIdType, $pubId)
 
 deleteAllPubIds ($journalId, $pubIdType)
 
 deleteGalley (&$galley)
 
 deleteGalleyById ($galleyId, $articleId=null)
 
 deleteGalleyImage ($galleyId, $fileId)
 
 deleteGalleysByArticle ($articleId)
 
 deleteImagesByGalley ($galleyId)
 
 deletePubId ($galleyId, $pubIdType)
 
 flushCache ()
 
 galleyExistsByFileId ($articleId, $fileId)
 
 getAdditionalFieldNames ()
 
getGalley ($galleyId, $articleId=null, $useCache=false)
 
getGalleyByBestGalleyId ($galleyId, $articleId)
 
getGalleyByPubId ($pubIdType, $pubId, $articleId=null)
 
getGalleyImages ($galleyId)
 
getGalleysByArticle ($articleId)
 
getGalleysByJournalId ($journalId)
 
getGalleysBySetting ($settingName, $settingValue, $articleId=null, $journalId=null)
 
 getInsertGalleyId ()
 
 getLocaleFieldNames ()
 
 getNextGalleySequence ($articleId)
 
 incrementViews ($galleyId)
 
 insertGalley (&$galley)
 
 insertGalleyImage ($galleyId, $fileId)
 
 pubIdExists ($pubIdType, $pubId, $galleyId, $journalId)
 
 resequenceGalleys ($articleId)
 
 updateGalley (&$galley)
 
 updateLocaleFields (&$galley)
 
- 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)
 

Public Attributes

 $articleFileDao
 
- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying ArticleGalley/ArticleHTMLGalley objects.

See Also
ArticleGalley

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

Member Function Documentation

& ArticleGalleyDAO::_galleyCacheMiss ( $cache,
  $id 
)

Callback when there is no object in cache.

Parameters
$cacheGenericCache
$idint The wanted object id.
Returns
ArticleGalley

Definition at line 50 of file ArticleGalleyDAO.inc.php.

References getGalley().

& ArticleGalleyDAO::_getGalleyCache ( )

Get galley objects cache.

Returns
GenericCache

Definition at line 36 of file ArticleGalleyDAO.inc.php.

Referenced by flushCache(), and getGalley().

& ArticleGalleyDAO::_returnGalleyFromRow ( $row)

Internal function to return an ArticleGalley object from a row.

Parameters
$rowarray
Returns
ArticleGalley

Definition at line 292 of file ArticleGalleyDAO.inc.php.

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

Referenced by ArticleXMLGalleyDAO\_getXMLGalleyFromId(), getGalley(), getGalleysByArticle(), and getGalleysBySetting().

ArticleGalleyDAO::ArticleGalleyDAO ( )

Constructor.

Definition at line 27 of file ArticleGalleyDAO.inc.php.

References DAORegistry\getDAO().

ArticleGalleyDAO::changePubId (   $galleyId,
  $pubIdType,
  $pubId 
)

Change the public ID of a galley.

Parameters
$galleyIdint
$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

Definition at line 597 of file ArticleGalleyDAO.inc.php.

References DAO\replace().

ArticleGalleyDAO::deleteAllPubIds (   $journalId,
  $pubIdType 
)

Delete the public IDs of all galleys in a journal.

Parameters
$journalIdint
$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).

Definition at line 618 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::deleteGalley ( $galley)

Delete an ArticleGalley.

Parameters
$galleyArticleGalley

Definition at line 396 of file ArticleGalleyDAO.inc.php.

References deleteGalleyById().

ArticleGalleyDAO::deleteGalleyById (   $galleyId,
  $articleId = null 
)

Delete a galley by ID.

Parameters
$galleyIdint
$articleIdint optional

Definition at line 405 of file ArticleGalleyDAO.inc.php.

References HookRegistry\call(), deleteImagesByGalley(), DAO\getAffectedRows(), and DAO\update().

Referenced by deleteGalley(), and deleteGalleysByArticle().

ArticleGalleyDAO::deleteGalleyImage (   $galleyId,
  $fileId 
)

Delete an image from an HTML galley.

Parameters
$galleyIdint
$fileIdint

Definition at line 570 of file ArticleGalleyDAO.inc.php.

References DAO\update().

ArticleGalleyDAO::deleteGalleysByArticle (   $articleId)

Delete galleys (and dependent galley image entries) by article. NOTE that this will not delete article_file entities or the respective files.

Parameters
$articleIdint

Definition at line 430 of file ArticleGalleyDAO.inc.php.

References deleteGalleyById(), and getGalleysByArticle().

ArticleGalleyDAO::deleteImagesByGalley (   $galleyId)

Delete HTML galley images by galley.

Parameters
$galleyIdint

Definition at line 582 of file ArticleGalleyDAO.inc.php.

References DAO\update().

Referenced by deleteGalleyById().

ArticleGalleyDAO::deletePubId (   $galleyId,
  $pubIdType 
)

Delete the public ID of a galley.

Parameters
$galleyIdint
$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).

Definition at line 643 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::flushCache ( )

Flush the article galley cache.

Definition at line 658 of file ArticleGalleyDAO.inc.php.

References _getGalleyCache().

Referenced by deleteAllPubIds(), and deletePubId().

ArticleGalleyDAO::galleyExistsByFileId (   $articleId,
  $fileId 
)

Check if a galley exists with the associated file ID.

Parameters
$articleIdint
$fileIdint
Returns
boolean

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

References DAO\retrieve().

ArticleGalleyDAO::getAdditionalFieldNames ( )

Get a list of additional fields that do not have dedicated accessors.

Returns
array

Definition at line 270 of file ArticleGalleyDAO.inc.php.

& ArticleGalleyDAO::getGalley (   $galleyId,
  $articleId = null,
  $useCache = false 
)

Retrieve a galley by ID.

Parameters
$galleyIdint
$articleIdint optional
$useCacheboolean optional
Returns
ArticleGalley

Definition at line 63 of file ArticleGalleyDAO.inc.php.

References _getGalleyCache(), _returnGalleyFromRow(), HookRegistry\call(), and DAO\retrieve().

Referenced by _galleyCacheMiss(), and getGalleyByBestGalleyId().

& ArticleGalleyDAO::getGalleyByBestGalleyId (   $galleyId,
  $articleId 
)

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

Parameters
$galleyIdstring
$articleIdint
Returns
galley object

Definition at line 251 of file ArticleGalleyDAO.inc.php.

References getGalley(), and getGalleyByPubId().

& ArticleGalleyDAO::getGalleyByPubId (   $pubIdType,
  $pubId,
  $articleId = null 
)

Retrieve a galley by 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
$articleIdint
Returns
ArticleGalley

Definition at line 135 of file ArticleGalleyDAO.inc.php.

References getGalleysBySetting().

Referenced by getGalleyByBestGalleyId().

& ArticleGalleyDAO::getGalleyImages (   $galleyId)

Retrieve array of the images for an HTML galley.

Parameters
$galleyIdint
Returns
array ArticleFile

Definition at line 530 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

Referenced by _returnGalleyFromRow().

& ArticleGalleyDAO::getGalleysByArticle (   $articleId)

Retrieve all galleys for an article.

Parameters
$articleIdint
Returns
array ArticleGalleys

Definition at line 198 of file ArticleGalleyDAO.inc.php.

References _returnGalleyFromRow(), HookRegistry\call(), and DAO\retrieve().

Referenced by deleteGalleysByArticle().

& ArticleGalleyDAO::getGalleysByJournalId (   $journalId)

Retrieve all galleys of a journal.

Parameters
$journalIdint
Returns
DAOResultFactory

Definition at line 228 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

Referenced by deleteAllPubIds().

& ArticleGalleyDAO::getGalleysBySetting (   $settingName,
  $settingValue,
  $articleId = null,
  $journalId = null 
)

Find galleys by querying galley settings.

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

Definition at line 155 of file ArticleGalleyDAO.inc.php.

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

Referenced by getGalleyByPubId().

ArticleGalleyDAO::getInsertGalleyId ( )

Get the ID of the last inserted gallery.

Returns
int

Definition at line 516 of file ArticleGalleyDAO.inc.php.

References DAO\getInsertId().

Referenced by insertGalley().

ArticleGalleyDAO::getLocaleFieldNames ( )

Get the list of fields for which data is localized.

Returns
array

Definition at line 261 of file ArticleGalleyDAO.inc.php.

ArticleGalleyDAO::getNextGalleySequence (   $articleId)

Get the the next sequence number for an article's galleys (i.e., current max + 1).

Parameters
$articleIdint
Returns
int

Definition at line 499 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

Referenced by insertGalley().

ArticleGalleyDAO::incrementViews (   $galleyId)

Increment the views count for a galley.

Parameters
$galleyIdint

Definition at line 462 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::insertGalley ( $galley)
ArticleGalleyDAO::insertGalleyImage (   $galleyId,
  $fileId 
)

Attach an image to an HTML galley.

Parameters
$galleyIdint
$fileIdint

Definition at line 555 of file ArticleGalleyDAO.inc.php.

References DAO\update().

ArticleGalleyDAO::pubIdExists (   $pubIdType,
  $pubId,
  $galleyId,
  $journalId 
)

Checks if public identifier exists (other than for the specified galley ID, which is treated as an exception).

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
$galleyIdint An ID to be excluded from the search.
$journalIdint
Returns
boolean

Definition at line 107 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

ArticleGalleyDAO::resequenceGalleys (   $articleId)

Sequentially renumber galleys for an article in their sequence order.

Parameters
$articleIdint

Definition at line 475 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::updateGalley ( $galley)

Update an existing ArticleGalley.

Parameters
$galleyArticleGalley

Definition at line 366 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::updateLocaleFields ( $galley)

Update the localized fields for this galley.

Parameters
$galley

Definition at line 281 of file ArticleGalleyDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertGalley(), and updateGalley().

Member Data Documentation

ArticleGalleyDAO::$articleFileDao

Helper file DAOs.

Definition at line 22 of file ArticleGalleyDAO.inc.php.


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