PHP Class ArticleAuthor

Inheritance: extends DatabaseObject
Exibir arquivo Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_columnNames array
$m_dbTableName string
$m_keyColumnNames array

Public Methods

Method Description
BuildAuthorIdsQuery ( array $p_names )
GetArticleAuthorList ( $p_articleNumber, $p_languageId ) : array
GetArticlesByAuthor ( integer $p_authorId ) : array
GetAuthorsByArticle ( integer $p_articleNumber, integer $p_languageId = NULL ) : array Get all the authors that wrote this article.
GetList ( array $p_parameters, string $p_order = null, integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array Returns an article authors list based on the given parameters.
OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void Copy all the pointers for the given article.
OnArticleDelete ( integer $p_articleNumber ) : void Remove author pointers for the given article.
OnArticleLanguageDelete ( $p_articleNumber, $p_languageId ) : void
OnAuthorDelete ( $p_authorId ) : void Remove article pointers for the given author.
OnAuthorTypeDelete ( integer $p_authorTypeId ) : void Remove author pointers for the given author type.
__construct ( integer $p_articleNumber = null, integer $p_languageId = null, integer $p_authorId = null, integer $p_typeId = null, $p_order = null ) The ArticleAuthors table links together articles with authors.
getArticleNumber ( ) : integer
getAuthorId ( ) : integer
getLanguageId ( ) : integer
getType ( ) : AuthorType
getTypeId ( ) : integer

Private Methods

Method Description
ProcessListOrder ( array $p_order ) : array Processes an order directive coming from template tags.
ProcessListParameters ( array $p_param ) : array Processes a paremeter (condition) coming from template tags.

Method Details

BuildAuthorIdsQuery() public static method

public static BuildAuthorIdsQuery ( array $p_names )
$p_names array

GetArticleAuthorList() public static method

public static GetArticleAuthorList ( $p_articleNumber, $p_languageId ) : array
return array

GetArticlesByAuthor() public static method

public static GetArticlesByAuthor ( integer $p_authorId ) : array
$p_authorId integer
return array

GetAuthorsByArticle() public static method

Get all the authors that wrote this article.
public static GetAuthorsByArticle ( integer $p_articleNumber, integer $p_languageId = NULL ) : array
$p_articleNumber integer
$p_languageId integer
return array $returnArray An array of Author objects

GetList() public static method

Returns an article authors list based on the given parameters.
public static GetList ( array $p_parameters, string $p_order = null, integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array
$p_parameters array An array of ComparisonOperation objects
$p_order string An array of columns and directions to order by
$p_start integer The record number to start the list
$p_limit integer The offset. How many records from $p_start will be retrieved.
$p_count integer The total count of the elements; this count is computed without applying the start ($p_start) and limit parameters ($p_limit)
return array $articleAuthorsList An array of Author objects

OnArticleCopy() public static method

Copy all the pointers for the given article.
public static OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void
$p_srcArticleNumber integer
$p_destArticleNumber integer
return void

OnArticleDelete() public static method

Remove author pointers for the given article.
public static OnArticleDelete ( integer $p_articleNumber ) : void
$p_articleNumber integer
return void

OnArticleLanguageDelete() public static method

public static OnArticleLanguageDelete ( $p_articleNumber, $p_languageId ) : void
return void

OnAuthorDelete() public static method

Remove article pointers for the given author.
public static OnAuthorDelete ( $p_authorId ) : void
return void

OnAuthorTypeDelete() public static method

Remove author pointers for the given author type.
public static OnAuthorTypeDelete ( integer $p_authorTypeId ) : void
$p_authorTypeId integer
return void

__construct() public method

The ArticleAuthors table links together articles with authors.
public __construct ( integer $p_articleNumber = null, integer $p_languageId = null, integer $p_authorId = null, integer $p_typeId = null, $p_order = null )
$p_articleNumber integer
$p_languageId integer
$p_authorId integer
$p_typeId integer

getArticleNumber() public method

public getArticleNumber ( ) : integer
return integer

getAuthorId() public method

public getAuthorId ( ) : integer
return integer

getLanguageId() public method

public getLanguageId ( ) : integer
return integer

getType() public method

public getType ( ) : AuthorType
return AuthorType

getTypeId() public method

public getTypeId ( ) : integer
return integer

Property Details

$m_columnNames public_oe property

public array $m_columnNames
return array

$m_dbTableName public_oe property

public string $m_dbTableName
return string

$m_keyColumnNames public_oe property

public array $m_keyColumnNames
return array