PHP Класс ArticleDAO, ojs

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

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

Метод Описание
__construct ( ) Constructor.
_fromRow ( $row ) : Article Internal function to return an Article object from a row.
changeStatus ( $articleId, $status ) Change the status of the article
deleteById ( $submissionId )
flushCache ( )
getBySetting ( $settingName, $settingValue, $journalId = null, $rangeInfo = null ) : array Find articles by querying article settings.
getJournalId ( $articleId ) : integer Get the ID of the journal an article is in.
getLocaleFieldNames ( ) : array Get a list of fields for which localized data is supported
insertObject ( $article ) Insert a new Article.
newDataObject ( ) : Article Return a new data object.
removeArticlesFromSection ( $sectionId ) Removes articles from a section by section ID
updateObject ( $article ) Update an existing article.
updateSetting ( $articleId, $name, $value, $type, $isLocalized = false ) Add/update an article setting.

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

Метод Описание
getCompletionConditions ( $completed )
getCompletionJoins ( )
getFetchColumns ( )
getFetchJoins ( )
getFetchParameters ( )
getGroupByColumns ( )
getSubEditorJoin ( )

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

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

Constructor.
public __construct ( )

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

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

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

Change the status of the article
public changeStatus ( $articleId, $status )
$articleId int
$status int

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

public deleteById ( $submissionId )

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

public flushCache ( )

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

Find articles by querying article settings.
public getBySetting ( $settingName, $settingValue, $journalId = null, $rangeInfo = null ) : array
$settingName string
$settingValue mixed
$journalId int optional
$rangeInfo DBResultRange optional
Результат array The articles identified by setting. WARNING: This query is selectively indexed for PostgreSQL. Ensure that the settings you wish to query are specified in dbscripts/xml/indexes.xml to avoid a potentially costly query.

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

protected getCompletionConditions ( $completed )

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

protected getCompletionJoins ( )

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

protected getFetchColumns ( )

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

protected getFetchJoins ( )

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

protected getFetchParameters ( )

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

protected getGroupByColumns ( )

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

Get the ID of the journal an article is in.
public getJournalId ( $articleId ) : integer
$articleId int
Результат integer

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

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

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

protected getSubEditorJoin ( )

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

Insert a new Article.
public insertObject ( $article )
$article Article

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

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

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

Removes articles from a section by section ID
public removeArticlesFromSection ( $sectionId )
$sectionId int

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

Update an existing article.
public updateObject ( $article )
$article Article

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

Add/update an article setting.
public updateSetting ( $articleId, $name, $value, $type, $isLocalized = false )
$articleId int
$name string
$value mixed
$type string Data type of the setting.
$isLocalized boolean