PHP Класс SubmissionDAO, pkp-lib

Наследование: extends DAO
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$authorDao
$cache

Открытые методы

Метод Описание
__construct ( ) Constructor.
_cacheMiss ( $cache, $id ) : Monograph Callback for a cache miss.
_fromRow ( $row ) : Submission Internal function to return a Submission object from a row.
_getCache ( ) : Cache Get the submission cache.
changePubId ( $submissionId, $pubIdType, $pubId )
deleteAllPubIds ( $contextId, $pubIdType )
deleteByContextId ( $contextId ) Delete all submissions by context ID.
deleteById ( $submissionId ) Delete a submission by ID.
deleteObject ( $submission ) Delete a submission.
deletePermissions ( $contextId ) Delete the attached licenses of all submissions in a context.
deletePubId ( $submissionId, $pubIdType )
flushCache ( ) Flush the submission cache.
getActiveSubmissions ( $contextId = null, $title = null, $author = null, $editor = null, $stageId = null, $rangeInfo = null, $orphaned = false ) : DAOResultFactory Get all active submissions for a context.
getAdditionalFieldNames ( ) : array Get a list of additional fields that do not have dedicated accessors.
getAssignedById ( integer $submissionId, integer $userId, integer $contextId = null, boolean $useCache = false ) : Submission Retrieve a submission by ID only if the submission is not published, has been submitted, and does not belong to the user in question and is not STATUS_DECLINED.
getAssignedToOthers ( $userId, $contextId = null, $title = null, $author = null, $editor = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory Get all submissions that are assigned to users other than the passed one.
getAssignedToUser ( $userId, $contextId = null, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory Get all submissions that are considered assigned to the passed user, excluding author participation.
getByContextId ( $contextId ) : DAOResultFactory Get all submissions for a context.
getById ( $submissionId, $contextId = null, $useCache = false ) : Submission Retrieve a submission by ID.
getByStatus ( $status, $userId = null, $contextId = null, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory Get all submissions for a status.
getBySubEditorId ( $contextId, $subEditorId = null, $includeDeclined = true, $includePublished = true, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory Get all unassigned submissions for a context or all contexts
getByUserId ( $userId, $contextId = null ) : array Get all submissions for a user.
getInsertId ( ) : integer Get the ID of the last inserted submission.
getLocaleFieldNames ( ) : array Get a list of fields for which localized data is supported
getReviewerArchived ( $reviewerId, $contextId = null, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory Get all submissions that a reviewer denied a review request.
getUnpublishedByUserId ( $userId, $contextId = null, $title = null, $stageId = null, $rangeInfo = null ) : array Get all unpublished submissions for a user.
newDataObject ( ) : Submission Instantiate a new data object.
pubIdExists ( $pubIdType, $pubId, $submissionId, $contextId )
updateLocaleFields ( $submission ) Update the settings for this object

Защищенные методы

Метод Описание
_arrayWalkIntCast ( string $value ) : integer Sanity test to cast values to int for database queries.
getCompletionConditions ( $completed ) : string Get conditions required to establish whether the submission is "completed".
getCompletionJoins ( ) : string Get additional joins required to establish whether the submission is "completed".
getFetchColumns ( ) : string Return a SQL snippet of extra columns to fetch during submission fetch queries.
getFetchJoins ( ) : string Return a SQL snippet of extra joins to include during fetch queries.
getFetchParameters ( ) : array Return a list of extra parameters to bind to the submission fetch queries.
getGroupByColumns ( ) : string Return a SQL snippet of columns to group by the submission fetch queries.
getSubEditorJoin ( ) : string Return a SQL snippet of extra sub editor related join to include during fetch queries.

Приватные методы

Метод Описание
_getEditorSearchQuery ( ) : string Get the editor search query for submissions.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( )

_arrayWalkIntCast() защищенный Метод

Sanity test to cast values to int for database queries.
protected _arrayWalkIntCast ( string $value ) : integer
$value string
Результат integer

_cacheMiss() публичный Метод

Callback for a cache miss.
public _cacheMiss ( $cache, $id ) : Monograph
$cache Cache
$id string
Результат Monograph

_fromRow() публичный Метод

Internal function to return a Submission object from a row.
public _fromRow ( $row ) : Submission
$row array
Результат Submission

_getCache() публичный Метод

Get the submission cache.
public _getCache ( ) : Cache
Результат Cache

changePubId() публичный Метод

public changePubId ( $submissionId, $pubIdType, $pubId )

deleteAllPubIds() публичный Метод

public deleteAllPubIds ( $contextId, $pubIdType )

deleteByContextId() публичный Метод

Delete all submissions by context ID.
public deleteByContextId ( $contextId )
$contextId int

deleteById() публичный Метод

Delete a submission by ID.
public deleteById ( $submissionId )
$submissionId int

deleteObject() публичный Метод

Delete a submission.
public deleteObject ( $submission )
$submission Submission

deletePermissions() публичный Метод

Delete the attached licenses of all submissions in a context.
public deletePermissions ( $contextId )

deletePubId() публичный Метод

public deletePubId ( $submissionId, $pubIdType )

flushCache() публичный Метод

Flush the submission cache.
public flushCache ( )

getActiveSubmissions() публичный Метод

Get all active submissions for a context.
public getActiveSubmissions ( $contextId = null, $title = null, $author = null, $editor = null, $stageId = null, $rangeInfo = null, $orphaned = false ) : DAOResultFactory
$contextId int optional
$title string|null optional Filter by title.
$author string|null optional Filter by author.
$editor int|null optional Filter by editor name.
$stageId int|null optional Filter by stage id.
$rangeInfo DBResultRange optional
$orphaned boolean Whether the incomplete submissions that have no author assigned should be considered too
Результат DAOResultFactory

getAdditionalFieldNames() публичный Метод

Get a list of additional fields that do not have dedicated accessors.
public getAdditionalFieldNames ( ) : array
Результат array

getAssignedById() публичный Метод

Retrieve a submission by ID only if the submission is not published, has been submitted, and does not belong to the user in question and is not STATUS_DECLINED.
public getAssignedById ( integer $submissionId, integer $userId, integer $contextId = null, boolean $useCache = false ) : Submission
$submissionId integer
$userId integer
$contextId integer
$useCache boolean
Результат Submission

getAssignedToOthers() публичный Метод

Get all submissions that are assigned to users other than the passed one.
public getAssignedToOthers ( $userId, $contextId = null, $title = null, $author = null, $editor = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory
$userId int
$contextId int optional
$title string|null optional Filter by title.
$author string|null optional Filter by author.
$editor int|null optional Filter by editor name.
$stageId int|null optional Filter by stage id.
$rangeInfo DBResultRange optional
Результат DAOResultFactory

getAssignedToUser() публичный Метод

Get all submissions that are considered assigned to the passed user, excluding author participation.
public getAssignedToUser ( $userId, $contextId = null, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory
$userId int
$contextId int optional
$title string|null optional Filter by title.
$author string|null optional Filter by author.
$stageId int|null optional Filter by stage id.
$rangeInfo DBResultRange optional
Результат DAOResultFactory

getByContextId() публичный Метод

Get all submissions for a context.
public getByContextId ( $contextId ) : DAOResultFactory
$contextId int
Результат DAOResultFactory containing matching Submissions

getById() публичный Метод

Retrieve a submission by ID.
public getById ( $submissionId, $contextId = null, $useCache = false ) : Submission
$submissionId int
$contextId int optional
$useCache boolean optional
Результат Submission

getByStatus() публичный Метод

Get all submissions for a status.
public getByStatus ( $status, $userId = null, $contextId = null, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory
$status int Status to get submissions for
$userId int optional User to require an assignment for
$contextId mixed optional Context(s) to fetch submissions for
$title string optional
$author string optional
$stageId int optional
$rangeInfo DBResultRange optional
Результат DAOResultFactory

getBySubEditorId() публичный Метод

Get all unassigned submissions for a context or all contexts
public getBySubEditorId ( $contextId, $subEditorId = null, $includeDeclined = true, $includePublished = true, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory
$contextId int optional the ID of the context to query.
$subEditorId int optional the ID of the sub editor whose section will be included in the results (excluding others).
$includeDeclined boolean optional include submissions which have STATUS_DECLINED
$includePublished boolean optional include submissions which are published
$title string|null optional Filter by title.
$author string|null optional Filter by author.
$stageId int|null optional Filter by stage id.
$rangeInfo DBRangeInfo
Результат DAOResultFactory containing matching Submissions

getByUserId() публичный Метод

Get all submissions for a user.
public getByUserId ( $userId, $contextId = null ) : array
$userId int
$contextId int optional
Результат array Submissions

getCompletionConditions() абстрактный защищенный Метод

Get conditions required to establish whether the submission is "completed".
abstract protected getCompletionConditions ( $completed ) : string
$completed boolean True for completed submissions; false for incomplete
Результат string

getCompletionJoins() защищенный Метод

Get additional joins required to establish whether the submission is "completed".
protected getCompletionJoins ( ) : string
Результат string

getFetchColumns() абстрактный защищенный Метод

Return a SQL snippet of extra columns to fetch during submission fetch queries.
abstract protected getFetchColumns ( ) : string
Результат string

getFetchJoins() абстрактный защищенный Метод

Return a SQL snippet of extra joins to include during fetch queries.
abstract protected getFetchJoins ( ) : string
Результат string

getFetchParameters() абстрактный защищенный Метод

Return a list of extra parameters to bind to the submission fetch queries.
abstract protected getFetchParameters ( ) : array
Результат array

getGroupByColumns() абстрактный защищенный Метод

See bug #8557, all tables that have columns selected must have one column listed here to keep PostgreSQL happy.
abstract protected getGroupByColumns ( ) : string
Результат string

getInsertId() публичный Метод

Get the ID of the last inserted submission.
public getInsertId ( ) : integer
Результат integer

getLocaleFieldNames() публичный Метод

Get a list of fields for which localized data is supported
public getLocaleFieldNames ( ) : array
Результат array

getReviewerArchived() публичный Метод

It will list only the submissions that a review has denied ALL review assignments.
public getReviewerArchived ( $reviewerId, $contextId = null, $title = null, $author = null, $stageId = null, $rangeInfo = null ) : DAOResultFactory
$reviewerId int
$contextId int optional
$title string optional
$author string optional
$stageId int optional
$rangeInfo DBResultRange optional
Результат DAOResultFactory

getSubEditorJoin() абстрактный защищенный Метод

Return a SQL snippet of extra sub editor related join to include during fetch queries.
abstract protected getSubEditorJoin ( ) : string
Результат string

getUnpublishedByUserId() публичный Метод

Get all unpublished submissions for a user.
public getUnpublishedByUserId ( $userId, $contextId = null, $title = null, $stageId = null, $rangeInfo = null ) : array
$userId int
$contextId int optional
$rangeInfo DBResultRange optional
Результат array Submissions

newDataObject() публичный Метод

Instantiate a new data object.
public newDataObject ( ) : Submission
Результат Submission

pubIdExists() публичный Метод

public pubIdExists ( $pubIdType, $pubId, $submissionId, $contextId )

updateLocaleFields() публичный Метод

Update the settings for this object
public updateLocaleFields ( $submission )
$submission object

Описание свойств

$authorDao публичное свойство

public $authorDao

$cache публичное свойство

public $cache