PHP Class Phosphorum\Models\Posts

Inheritance: extends Phalcon\Mvc\Model
Afficher le fichier Open project: phalcon/forum Class Usage Examples

Méthodes publiques

Свойство Type Description
$accepted_answer
$categories_id
$content
$created_at
$deleted
$edited_at
$id
$locked
$modified_at
$number_replies
$number_views
$slug
$status
$sticked
$title
$users_id
$votes_down
$votes_up

Méthodes publiques

Méthode Description
afterCreate ( )
afterDelete ( )
afterSave ( )
beforeCreate ( ) Create a posts-views logging the ipaddress where the post was created This avoids that the same session counts as post view
beforeValidationOnCreate ( )
canHaveBounty ( ) : boolean Checks if the post can have a bounty
clearCache ( ) Clears the cache related to this post
getBounty ( ) : array | boolean Calculates a bounty for the post
getDifference ( )
getHumanCreatedAt ( ) : boolean | string
getHumanEditedAt ( ) : boolean | string
getHumanModifiedAt ( ) : boolean | string
getHumanNumberViews ( ) : string
getRecentUsers ( ) : array
getUTCModifiedAt ( ) : string Returns a W3C date to be used in the sitemap.
hasAcceptedAnswer ( ) : boolean Checks if the Post has accepted answer
hasPoll ( ) : boolean Checks if the Post has a Poll
hasReplies ( ) : boolean Checks if the Post has replies
initialize ( )
isParticipatedInPoll ( integer $userId ) : boolean Checks if User is participated in a Poll
isStartVoting ( ) : boolean Checks if the voting for the poll was started
isSubscribed ( integer $userId ) : boolean Checks whether a specific user is subscribed to the post

Method Details

afterCreate() public méthode

public afterCreate ( )

afterDelete() public méthode

public afterDelete ( )

afterSave() public méthode

public afterSave ( )

beforeCreate() public méthode

Create a posts-views logging the ipaddress where the post was created This avoids that the same session counts as post view
public beforeCreate ( )

beforeValidationOnCreate() public méthode

canHaveBounty() public méthode

Checks if the post can have a bounty
public canHaveBounty ( ) : boolean
Résultat boolean

clearCache() public méthode

Clears the cache related to this post
public clearCache ( )

getBounty() public méthode

Calculates a bounty for the post
public getBounty ( ) : array | boolean
Résultat array | boolean

getDifference() public méthode

public getDifference ( )

getHumanCreatedAt() public méthode

public getHumanCreatedAt ( ) : boolean | string
Résultat boolean | string

getHumanEditedAt() public méthode

public getHumanEditedAt ( ) : boolean | string
Résultat boolean | string

getHumanModifiedAt() public méthode

public getHumanModifiedAt ( ) : boolean | string
Résultat boolean | string

getHumanNumberViews() public méthode

public getHumanNumberViews ( ) : string
Résultat string

getRecentUsers() public méthode

public getRecentUsers ( ) : array
Résultat array

getUTCModifiedAt() public méthode

Returns a W3C date to be used in the sitemap.
public getUTCModifiedAt ( ) : string
Résultat string

hasAcceptedAnswer() public méthode

Checks if the Post has accepted answer
public hasAcceptedAnswer ( ) : boolean
Résultat boolean

hasPoll() public méthode

Checks if the Post has a Poll
public hasPoll ( ) : boolean
Résultat boolean

hasReplies() public méthode

Checks if the Post has replies
public hasReplies ( ) : boolean
Résultat boolean

initialize() public méthode

public initialize ( )

isParticipatedInPoll() public méthode

Checks if User is participated in a Poll
public isParticipatedInPoll ( integer $userId ) : boolean
$userId integer User ID
Résultat boolean

isStartVoting() public méthode

Checks if the voting for the poll was started
public isStartVoting ( ) : boolean
Résultat boolean

isSubscribed() public méthode

Checks whether a specific user is subscribed to the post
public isSubscribed ( integer $userId ) : boolean
$userId integer
Résultat boolean

Property Details

$accepted_answer public_oe property

public $accepted_answer

$categories_id public_oe property

public $categories_id

$content public_oe property

public $content

$created_at public_oe property

public $created_at

$deleted public_oe property

public $deleted

$edited_at public_oe property

public $edited_at

$id public_oe property

public $id

$locked public_oe property

public $locked

$modified_at public_oe property

public $modified_at

$number_replies public_oe property

public $number_replies

$number_views public_oe property

public $number_views

$slug public_oe property

public $slug

$status public_oe property

public $status

$sticked public_oe property

public $sticked

$title public_oe property

public $title

$users_id public_oe property

public $users_id

$votes_down public_oe property

public $votes_down

$votes_up public_oe property

public $votes_up