PHP Класс Phosphorum\Models\Posts

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

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

Свойство Тип Описание
$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

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

Метод Описание
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

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

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

public afterCreate ( )

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

public afterDelete ( )

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

public afterSave ( )

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

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() публичный Метод

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

Checks if the post can have a bounty
public canHaveBounty ( ) : boolean
Результат boolean

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

Clears the cache related to this post
public clearCache ( )

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

Calculates a bounty for the post
public getBounty ( ) : array | boolean
Результат array | boolean

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

public getDifference ( )

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

public getHumanCreatedAt ( ) : boolean | string
Результат boolean | string

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

public getHumanEditedAt ( ) : boolean | string
Результат boolean | string

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

public getHumanModifiedAt ( ) : boolean | string
Результат boolean | string

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

public getHumanNumberViews ( ) : string
Результат string

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

public getRecentUsers ( ) : array
Результат array

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

Returns a W3C date to be used in the sitemap.
public getUTCModifiedAt ( ) : string
Результат string

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

Checks if the Post has accepted answer
public hasAcceptedAnswer ( ) : boolean
Результат boolean

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

Checks if the Post has a Poll
public hasPoll ( ) : boolean
Результат boolean

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

Checks if the Post has replies
public hasReplies ( ) : boolean
Результат boolean

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

public initialize ( )

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

Checks if User is participated in a Poll
public isParticipatedInPoll ( integer $userId ) : boolean
$userId integer User ID
Результат boolean

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

Checks if the voting for the poll was started
public isStartVoting ( ) : boolean
Результат boolean

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

Checks whether a specific user is subscribed to the post
public isSubscribed ( integer $userId ) : boolean
$userId integer
Результат boolean

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

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

public $accepted_answer

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

public $categories_id

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

public $content

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

public $created_at

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

public $deleted

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

public $edited_at

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

public $id

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

public $locked

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

public $modified_at

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

public $number_replies

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

public $number_views

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

public $slug

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

public $status

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

public $sticked

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

public $title

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

public $users_id

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

public $votes_down

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

public $votes_up