Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPAuthorDAO Class Reference
Inheritance diagram for PKPAuthorDAO:
DAO AuthorDAO

Public Member Functions

 _fromRow ($row)
 
 _returnSimpleAuthorFromRow ($row)
 
 deleteById ($authorId, $submissionId=null)
 
 deleteBySubmissionId ($submissionId)
 
 deleteObject ($author)
 
 getAuthorCountBySubmissionId ($submissionId)
 
 getById ($authorId, $submissionId=null)
 
 getBySubmissionId ($submissionId, $sortByAuthorId=false)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 getPrimaryContact ($submissionId)
 
 insertObject ($author)
 
 newDataObject ()
 
 PKPAuthorDAO ()
 
 resequenceAuthors ($submissionId)
 
 resetPrimaryContact ($authorId, $submissionId)
 
 updateLocaleFields ($author)
 
 updateObject ($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 ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 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

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

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::_fromRow (   $row)

Internal function to return an Author object from a row.

Parameters
$rowarray
Returns
Author

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

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

Referenced by getById(), getBySubmissionId(), 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 153 of file PKPAuthorDAO.inc.php.

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

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

Delete an author by ID.

Parameters
$authorIdint
$submissionIdint optional

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

References DAO\update().

Referenced by deleteObject().

PKPAuthorDAO::deleteBySubmissionId (   $submissionId)

Delete authors by submission.

Parameters
$submissionIdint

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

References getBySubmissionId().

PKPAuthorDAO::deleteObject (   $author)

Delete an Author.

Parameters
$authorAuthor

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

References deleteById().

PKPAuthorDAO::getAuthorCountBySubmissionId (   $submissionId)

Retrieve the number of authors assigned to a submission

Parameters
$submissionIdint
Returns
int

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

References DAO\retrieve().

Referenced by insertObject().

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

Retrieve an author by ID.

Parameters
$authorIdint Author ID
$submissionIdint optional
Returns
Author

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

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

PKPAuthorDAO::getBySubmissionId (   $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 62 of file PKPAuthorDAO.inc.php.

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

Referenced by deleteBySubmissionId().

PKPAuthorDAO::getInsertId ( )

Get the ID of the last inserted author.

Returns
int

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

References DAO\_getInsertId().

Referenced by insertObject().

PKPAuthorDAO::getLocaleFieldNames ( )

Get field names for which data is localized.

Returns
array

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

PKPAuthorDAO::getPrimaryContact (   $submissionId)

Retrieve the primary author for a submission.

Parameters
$submissionIdint
Returns
Author

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

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

PKPAuthorDAO::insertObject (   $author)

Insert a new Author.

Parameters
$authorAuthor

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

References getAuthorCountBySubmissionId(), getInsertId(), resetPrimaryContact(), DAO\update(), and updateLocaleFields().

PKPAuthorDAO::newDataObject ( )

Get a new data object

Returns
DataObject

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

Referenced by _fromRow(), 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 302 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 350 of file PKPAuthorDAO.inc.php.

References DAO\update().

Referenced by insertObject(), and updateObject().

PKPAuthorDAO::updateLocaleFields (   $author)

Update the localized data for this object

Parameters
$authorobject

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

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

PKPAuthorDAO::updateObject (   $author)

Update an existing Author.

Parameters
$authorAuthor

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

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


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