PHP Class Post

Mostrar archivo Open project: yupe/yupe Class Usage Examples

Public Properties

Property Type Description
$tags tags list

Public Methods

Method Description
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

Method Details

afterDelete() public method

public afterDelete ( )

afterFind() public method

public afterFind ( )

allPosts() public method

public allPosts ( ) : CActiveDataProvider
return CActiveDataProvider

attributeLabels() public method

public attributeLabels ( ) : array
return array customized attribute labels (name=>label)

beforeSave() public method

public beforeSave ( ) : boolean
return boolean

beforeValidate() public method

public beforeValidate ( ) : boolean
return boolean

behaviors() public method

public behaviors ( ) : array
return array

createPublicPost() public method

public createPublicPost ( array $post ) : boolean
$post array
return boolean

deleteUserPost() public method

public deleteUserPost ( $postId, $userId ) : integer
$postId
$userId
return integer

findUserPost() public method

public findUserPost ( $postId, $userId ) : CActiveRecord
$postId
$userId
return CActiveRecord

get() public method

public get ( $id, array $with = [] ) : mixed
$id
$with array
return mixed

getAccessType() public method

public getAccessType ( ) : string
return string

getAccessTypeList() public method

public getAccessTypeList ( ) : array
return array

getArchive() public method

public getArchive ( null $blogId = null, integer $cache = 3600 ) : mixed
$blogId null
$cache integer
return mixed

getByTag() public method

public getByTag ( $tag, array $with = ['blog', 'createUser', 'commentsCount'] ) : mixed
$tag
$with array
return mixed

getCategories() public method

public getCategories ( ) : mixed
return mixed

getCommentCount() public method

public getCommentCount ( ) : integer | mixed
return integer | mixed

getCommentStatus() public method

public getCommentStatus ( ) : string
return string

getCommentStatusList() public method

public getCommentStatusList ( ) : array
return array

getForBlog() public method

public getForBlog ( $blogId ) : Post
$blogId
return Post

getForCategory() public method

public getForCategory ( $categoryId ) : Post
$categoryId
return Post

getForUser() public method

public getForUser ( $user ) : Post
$user
return Post

getQuote() public method

public getQuote ( integer $limit = 500 ) : string
$limit integer
return string

getStatus() public method

public getStatus ( ) : string
return string

getStatusList() public method

public getStatusList ( ) : array
return array

getStream() public method

public getStream ( integer $limit = 10, $cacheTime ) : mixed
$limit integer
$cacheTime
return mixed

getTitle() public method

public getTitle ( ) : mixed | string
return mixed | string

isDraft() public method

public isDraft ( ) : boolean
return boolean

isPublished() public method

public isPublished ( ) : boolean
return boolean

limit() public method

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

model() public static method

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : Post
$className string
return Post the static model class

publish() public method

public publish ( ) : boolean
return boolean

relations() public method

public relations ( ) : array
return array relational rules.

rules() public method

public rules ( ) : array
return array validation rules for model attributes.

scopes() public method

public scopes ( ) : array
return array

sortByPubDate() public method

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

tableName() public method

public tableName ( ) : string
return string the associated database table name

Property Details

$tags public_oe property

tags list
public $tags