PHP Class Newscoop\Entity\Comment

Exibir arquivo Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$status_enum to code mapper for status

Protected Properties

Property Type Description
$allowedEmpty
$allowedTags
$commenter Newscoop\Entity\Comment\Commenter
$dislikes integer
$forum Newscoop\Entity\Publication
$id integer
$indexed DateTim\DateTime
$ip integer
$language Newscoop\Entity\Language
$likes integer
$message text
$parent Newscoop\Entity\Comment
$recommended integer
$source string
$status integer
$subject string
$thread integer
$thread_level integer
$thread_order integer
$time_created DateTim\DateTime
$time_updated DateTim\DateTime

Public Methods

Method Description
SameAs ( Comment $comment ) : boolean Check if the comment is the same as this one
__construct ( )
exists ( ) : boolean Check if the comment exists Test if there is set an id
getCommenter ( ) : Commenter Get commenter
getCommenterEmail ( ) : string Get commenter email
getCommenterName ( ) : string Get commenter name
getDislikes ( ) : integer Get the dislikes count
getEmail ( ) : string Get the commenter's email
getForum ( ) : Newscoop\Entity\Publication Get forum
getId ( ) : integer Get id
getIndexed ( ) : DateTim\DateTime Get indexed
getIp ( ) : string Get comment ip address
getLanguage ( ) : Newscoop\Entity\Language Get Language
getLikes ( ) : integer Get the likes count
getMessage ( ) : string Get comment message.
getName ( ) : string Get the commenter's name
getParent ( ) : Newscoop\Entity\Comment Get Parent
getParentId ( ) : Newscoop\Entity\Comment Get Parent Id
getProperty ( $key ) : mixed Get an enity property
getRealName ( ) : string Get username witch should be the real name
getRecommended ( ) : string Get comment recommended
getSource ( ) : string Get comment source
getStatus ( ) : string Get status string
getSubject ( ) : string Get comment subject.
getThread ( ) : integer Get thread
getThreadLevel ( ) : integer Get thread level
getThreadOrder ( ) : integer Get thread level
getTimeCreated ( ) : DateTim\DateTime Get creation time.
getTimeUpdated ( ) : DateTim\DateTime Get creation time.
setCommenter ( Commenter $commenter ) : Newscoop\Entity\Comment Set commenter
setForum ( Publication $forum ) : Newscoop\Entity\Comment Set forum
setId ( integer $id ) : Newscoop\Entity\Comment Set id
setIndexed ( DateTim\DateTime $indexed = null ) : self Set indexed
setIp ( string $ip ) : Newscoop\Entity\Comment Set comment ip address
setLanguage ( Language $language ) : Newscoop\Entity\Comment Set Language
setMessage ( string $message ) : Newscoop\Entity\Comment Set comment message.
setParent ( Comment $parent = null ) : Newscoop\Entity\Comment Set Parent
setRecommended ( string $recommended ) : Newscoop\Entity\Comment Set recommended
setSource ( string $source ) : string Set comment source
setStatus ( $status ) : Newscoop\Entity\Comment Set status string
setSubject ( string $subject ) : Newscoop\Entity\Comment Set comment subject.
setThread ( $thread ) : Newscoop\Entity\Comment Set thread
setThreadLevel ( $level ) : Newscoop\Entity\Comment Set thread level
setThreadOrder ( $order ) : Newscoop\Entity\Comment Set thread order
setTimeCreated ( DateTime $datetime ) : Newscoop\Entity\Comment Set timecreated
setTimeUpdated ( DateTime $datetime ) : Newscoop\Entity\Comment Set time updated

Protected Methods

Method Description
formatMessage ( string $str ) : string Method used to format message from comments

Method Details

SameAs() public method

Check if the comment is the same as this one
Deprecation: legacy from frontend controllers
public SameAs ( Comment $comment ) : boolean
$comment Comment
return boolean

__construct() public method

public __construct ( )

exists() public method

Check if the comment exists Test if there is set an id
Deprecation: legacy from frontend controllers
public exists ( ) : boolean
return boolean

formatMessage() protected method

Method used to format message from comments
protected formatMessage ( string $str ) : string
$str string
return string

getCommenter() public method

Get commenter
public getCommenter ( ) : Commenter
return Newscoop\Entity\Comment\Commenter

getCommenterEmail() public method

Get commenter email
public getCommenterEmail ( ) : string
return string

getCommenterName() public method

Get commenter name
public getCommenterName ( ) : string
return string

getDislikes() public method

Get the dislikes count
public getDislikes ( ) : integer
return integer

getEmail() public method

Get the commenter's email
public getEmail ( ) : string
return string

getForum() public method

Get forum
public getForum ( ) : Newscoop\Entity\Publication
return Newscoop\Entity\Publication

getId() public method

Get id
public getId ( ) : integer
return integer

getIndexed() public method

Get indexed
public getIndexed ( ) : DateTim\DateTime
return DateTim\DateTime

getIp() public method

Get comment ip address
public getIp ( ) : string
return string

getLanguage() public method

Get Language
public getLanguage ( ) : Newscoop\Entity\Language
return Newscoop\Entity\Language

getLikes() public method

Get the likes count
public getLikes ( ) : integer
return integer

getMessage() public method

Get comment message.
public getMessage ( ) : string
return string

getName() public method

Get the commenter's name
public getName ( ) : string
return string

getParent() public method

Get Parent
public getParent ( ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment

getParentId() public method

Get Parent Id
public getParentId ( ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment

getProperty() public method

Get an enity property
Deprecation: legacy from frontend controllers
public getProperty ( $key ) : mixed
$key
return mixed

getRealName() public method

Get username witch should be the real name
Deprecation: legacy from frontend controllers
public getRealName ( ) : string
return string

getRecommended() public method

Get comment recommended
public getRecommended ( ) : string
return string

getSource() public method

Get comment source
public getSource ( ) : string
return string

getStatus() public method

Get status string
public getStatus ( ) : string
return string

getSubject() public method

Get comment subject.
public getSubject ( ) : string
return string

getThread() public method

Get thread
public getThread ( ) : integer
return integer

getThreadLevel() public method

Get thread level
public getThreadLevel ( ) : integer
return integer

getThreadOrder() public method

Get thread level
public getThreadOrder ( ) : integer
return integer

getTimeCreated() public method

Get creation time.
public getTimeCreated ( ) : DateTim\DateTime
return DateTim\DateTime

getTimeUpdated() public method

Get creation time.
public getTimeUpdated ( ) : DateTim\DateTime
return DateTim\DateTime

setCommenter() public method

Set commenter
public setCommenter ( Commenter $commenter ) : Newscoop\Entity\Comment
$commenter Newscoop\Entity\Comment\Commenter
return Newscoop\Entity\Comment

setForum() public method

Set forum
public setForum ( Publication $forum ) : Newscoop\Entity\Comment
$forum Publication
return Newscoop\Entity\Comment

setId() public method

Set id
public setId ( integer $id ) : Newscoop\Entity\Comment
$id integer
return Newscoop\Entity\Comment

setIndexed() public method

Set indexed
public setIndexed ( DateTim\DateTime $indexed = null ) : self
$indexed DateTim\DateTime
return self

setIp() public method

Set comment ip address
public setIp ( string $ip ) : Newscoop\Entity\Comment
$ip string
return Newscoop\Entity\Comment

setLanguage() public method

Set Language
public setLanguage ( Language $language ) : Newscoop\Entity\Comment
$language Language
return Newscoop\Entity\Comment

setMessage() public method

Set comment message.
public setMessage ( string $message ) : Newscoop\Entity\Comment
$message string
return Newscoop\Entity\Comment

setParent() public method

Set Parent
public setParent ( Comment $parent = null ) : Newscoop\Entity\Comment
$parent Comment
return Newscoop\Entity\Comment

setRecommended() public method

Set recommended
public setRecommended ( string $recommended ) : Newscoop\Entity\Comment
$recommended string
return Newscoop\Entity\Comment

setSource() public method

Set comment source
public setSource ( string $source ) : string
$source string
return string

setStatus() public method

Set status string
public setStatus ( $status ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment

setSubject() public method

Set comment subject.
public setSubject ( string $subject ) : Newscoop\Entity\Comment
$subject string
return Newscoop\Entity\Comment

setThread() public method

Set thread
public setThread ( $thread ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment

setThreadLevel() public method

Set thread level
public setThreadLevel ( $level ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment

setThreadOrder() public method

Set thread order
public setThreadOrder ( $order ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment

setTimeCreated() public method

Set timecreated
public setTimeCreated ( DateTime $datetime ) : Newscoop\Entity\Comment
$datetime DateTime
return Newscoop\Entity\Comment

setTimeUpdated() public method

Set time updated
public setTimeUpdated ( DateTime $datetime ) : Newscoop\Entity\Comment
$datetime DateTime
return Newscoop\Entity\Comment

Property Details

$allowedEmpty protected_oe property

protected $allowedEmpty

$allowedTags protected_oe property

protected $allowedTags

$commenter protected_oe property

protected Commenter,Newscoop\Entity\Comment $commenter
return Newscoop\Entity\Comment\Commenter

$dislikes protected_oe property

protected int $dislikes
return integer

$forum protected_oe property

protected Newscoop\Entity\Publication $forum
return Newscoop\Entity\Publication

$id protected_oe property

protected int $id
return integer

$indexed protected_oe property

protected DateTime,DateTim $indexed
return DateTim\DateTime

$ip protected_oe property

protected int $ip
return integer

$language protected_oe property

protected Newscoop\Entity\Language $language
return Newscoop\Entity\Language

$likes protected_oe property

protected int $likes
return integer

$message protected_oe property

protected text $message
return text

$parent protected_oe property

protected Newscoop\Entity\Comment $parent
return Newscoop\Entity\Comment

$source protected_oe property

protected string $source
return string

$status protected_oe property

protected int $status
return integer

$status_enum static_oe public_oe property

to code mapper for status
static public $status_enum

$subject protected_oe property

protected string $subject
return string

$thread protected_oe property

protected int $thread
return integer

$thread_level protected_oe property

protected int $thread_level
return integer

$thread_order protected_oe property

protected int $thread_order
return integer

$time_created protected_oe property

protected DateTime,DateTim $time_created
return DateTim\DateTime

$time_updated protected_oe property

protected DateTime,DateTim $time_updated
return DateTim\DateTime