PHP Класс Post, yupe

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

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

Свойство Тип Описание
$tags tags list

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

Метод Описание
afterDelete ( )
afterFind ( )
allPosts ( ) : CActiveDataProvider
attributeLabels ( ) : array
beforeSave ( ) : boolean
beforeValidate ( ) : boolean
behaviors ( ) : array
createPublicPost ( array $post ) : boolean
deleteUserPost ( $postId, $userId ) : integer
findUserPost ( $postId, $userId ) : CActiveRecord
get ( $id, array $with = [] ) : mixed
getAccessType ( ) : string
getAccessTypeList ( ) : array
getArchive ( null $blogId = null, integer $cache = 3600 ) : mixed
getByTag ( $tag, array $with = ['blog', 'createUser', 'commentsCount'] ) : mixed
getCategories ( ) : mixed
getCommentCount ( ) : integer | mixed
getCommentStatus ( ) : string
getCommentStatusList ( ) : array
getForBlog ( $blogId ) : Post
getForCategory ( $categoryId ) : Post
getForUser ( $user ) : Post
getLink ( $params = [] ) : mixed
getQuote ( integer $limit = 500 ) : string
getStatus ( ) : string
getStatusList ( ) : array
getStream ( integer $limit = 10, $cacheTime ) : mixed
getTitle ( ) : mixed | string
isDraft ( ) : boolean
isPublished ( ) : boolean
limit ( integer $count = null ) : self Условие для получения определённого количества записей:
model ( string $className = __CLASS__ ) : Post Returns the static model of the specified AR class.
publish ( ) : boolean
relations ( ) : array
rules ( ) : array
scopes ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
sortByPubDate ( string $typeSort = 'ASC' ) : self Условие для сортировки по дате
tableName ( ) : string

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

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

public afterDelete ( )

afterFind() публичный метод

public afterFind ( )

allPosts() публичный метод

public allPosts ( ) : CActiveDataProvider
Результат CActiveDataProvider

attributeLabels() публичный метод

public attributeLabels ( ) : array
Результат array customized attribute labels (name=>label)

beforeSave() публичный метод

public beforeSave ( ) : boolean
Результат boolean

beforeValidate() публичный метод

public beforeValidate ( ) : boolean
Результат boolean

behaviors() публичный метод

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

createPublicPost() публичный метод

public createPublicPost ( array $post ) : boolean
$post array
Результат boolean

deleteUserPost() публичный метод

public deleteUserPost ( $postId, $userId ) : integer
$postId
$userId
Результат integer

findUserPost() публичный метод

public findUserPost ( $postId, $userId ) : CActiveRecord
$postId
$userId
Результат CActiveRecord

get() публичный метод

public get ( $id, array $with = [] ) : mixed
$id
$with array
Результат mixed

getAccessType() публичный метод

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

getAccessTypeList() публичный метод

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

getArchive() публичный метод

public getArchive ( null $blogId = null, integer $cache = 3600 ) : mixed
$blogId null
$cache integer
Результат mixed

getByTag() публичный метод

public getByTag ( $tag, array $with = ['blog', 'createUser', 'commentsCount'] ) : mixed
$tag
$with array
Результат mixed

getCategories() публичный метод

public getCategories ( ) : mixed
Результат mixed

getCommentCount() публичный метод

public getCommentCount ( ) : integer | mixed
Результат integer | mixed

getCommentStatus() публичный метод

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

getCommentStatusList() публичный метод

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

getForBlog() публичный метод

public getForBlog ( $blogId ) : Post
$blogId
Результат Post

getForCategory() публичный метод

public getForCategory ( $categoryId ) : Post
$categoryId
Результат Post

getForUser() публичный метод

public getForUser ( $user ) : Post
$user
Результат Post

getQuote() публичный метод

public getQuote ( integer $limit = 500 ) : string
$limit integer
Результат string

getStatus() публичный метод

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

getStatusList() публичный метод

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

getStream() публичный метод

public getStream ( integer $limit = 10, $cacheTime ) : mixed
$limit integer
$cacheTime
Результат mixed

getTitle() публичный метод

public getTitle ( ) : mixed | string
Результат mixed | string

isDraft() публичный метод

public isDraft ( ) : boolean
Результат boolean

isPublished() публичный метод

public isPublished ( ) : boolean
Результат boolean

limit() публичный метод

Условие для получения определённого количества записей:
public limit ( integer $count = null ) : self
$count integer - количество записей
Результат self

model() публичный статический метод

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : Post
$className string
Результат Post the static model class

publish() публичный метод

public publish ( ) : boolean
Результат boolean

relations() публичный метод

public relations ( ) : array
Результат array relational rules.

rules() публичный метод

public rules ( ) : array
Результат array validation rules for model attributes.

scopes() публичный метод

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

sortByPubDate() публичный метод

Условие для сортировки по дате
public sortByPubDate ( string $typeSort = 'ASC' ) : self
$typeSort string - типо сортировки
Результат self

tableName() публичный метод

public tableName ( ) : string
Результат string the associated database table name

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

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

tags list
public $tags