Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
PKPAuthorDAO Class Reference
Inheritance diagram for PKPAuthorDAO:
DAO AuthorDAO

Public Member Functions

_returnAuthorFromRow (&$row)
 
_returnSimpleAuthorFromRow (&$row)
 
 deleteAuthor (&$author)
 
 deleteAuthorById ($authorId, $submissionId=null)
 
getAuthor ($authorId, $submissionId=null)
 
 getAuthorCountBySubmissionId ($submissionId)
 
getAuthorsBySubmissionId ($submissionId, $sortByAuthorId=false)
 
 getInsertAuthorId ()
 
 getLocaleFieldNames ()
 
getPrimaryContact ($submissionId)
 
 newDataObject ()
 
 PKPAuthorDAO ()
 
 resequenceAuthors ($submissionId)
 
 resetPrimaryContact ($authorId, $submissionId)
 
 updateLocaleFields (&$author)
 
- 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 PKPAuthor objects.

See Also
PKPAuthor

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

Member Function Documentation

& PKPAuthorDAO::_returnAuthorFromRow ( $row)

Internal function to return an Author object from a row.

Parameters
$rowarray
Returns
Author

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

References HookRegistry\call(), and newDataObject().

Referenced by getAuthor(), getAuthorsBySubmissionId(), and getPrimaryContact().

& PKPAuthorDAO::_returnSimpleAuthorFromRow ( $row)

Internal function to return an Author object from a row. Simplified not to include object settings.

Parameters
$rowarray
Returns
Author

Definition at line 151 of file PKPAuthorDAO.inc.php.

References HookRegistry\call(), and newDataObject().

PKPAuthorDAO::deleteAuthor ( $author)

Delete an Author.

Parameters
$authorAuthor

Definition at line 193 of file PKPAuthorDAO.inc.php.

References deleteAuthorById().

Referenced by AuthorDAO\deleteAuthorsByArticle().

PKPAuthorDAO::deleteAuthorById (   $authorId,
  $submissionId = null 
)

Delete an author by ID.

Parameters
$authorIdint
$submissionIdint optional

Definition at line 202 of file PKPAuthorDAO.inc.php.

References DAO\update().

Referenced by deleteAuthor().

& PKPAuthorDAO::getAuthor (   $authorId,
  $submissionId = null 
)

Retrieve an author by ID.

Parameters
$authorIdint
$submissionIdint optional
Returns
Author

Definition at line 34 of file PKPAuthorDAO.inc.php.

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

PKPAuthorDAO::getAuthorCountBySubmissionId (   $submissionId)

Retrieve the number of authors assigned to a submission

Parameters
$submissionIdint
Returns
int

Definition at line 91 of file PKPAuthorDAO.inc.php.

References DAO\retrieve().

& PKPAuthorDAO::getAuthorsBySubmissionId (   $submissionId,
  $sortByAuthorId = false 
)

Retrieve all authors for a submission.

Parameters
$submissionIdint
$sortByAuthorIdbool Use author Ids as indexes in the array
Returns
array Authors ordered by sequence

Definition at line 60 of file PKPAuthorDAO.inc.php.

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

Referenced by AuthorDAO\deleteAuthorsByArticle().

PKPAuthorDAO::getInsertAuthorId ( )

Get the ID of the last inserted author.

Returns
int

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

References DAO\getInsertId().

Referenced by AuthorDAO\insertAuthor().

PKPAuthorDAO::getLocaleFieldNames ( )

Get field names for which data is localized.

Returns
array

Definition at line 185 of file PKPAuthorDAO.inc.php.

& PKPAuthorDAO::getPrimaryContact (   $submissionId)

Retrieve the primary author for a submission.

Parameters
$submissionIdint
Returns
Author

Definition at line 247 of file PKPAuthorDAO.inc.php.

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

PKPAuthorDAO::newDataObject ( )

Get a new data object

Returns
DataObject

Definition at line 177 of file PKPAuthorDAO.inc.php.

Referenced by _returnAuthorFromRow(), and _returnSimpleAuthorFromRow().

PKPAuthorDAO::PKPAuthorDAO ( )

Constructor

Definition at line 24 of file PKPAuthorDAO.inc.php.

PKPAuthorDAO::resequenceAuthors (   $submissionId)

Sequentially renumber a submission's authors in their sequence order.

Parameters
$submissionIdint

Definition at line 219 of file PKPAuthorDAO.inc.php.

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

PKPAuthorDAO::resetPrimaryContact (   $authorId,
  $submissionId 
)

Remove other primary contacts from a submission and set to authorId

Parameters
$authorIdint
$submissionIdint

Definition at line 266 of file PKPAuthorDAO.inc.php.

References DAO\update().

PKPAuthorDAO::updateLocaleFields ( $author)

Update the localized data for this object

Parameters
$authorobject

Definition at line 109 of file PKPAuthorDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by AuthorDAO\insertAuthor(), and AuthorDAO\updateAuthor().


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