PHP Class Post

Afficher le fichier Open project: yupe/yupe Class Usage Examples

Méthodes publiques

Свойство Type Description
$tags tags list

Méthodes publiques

Méthode 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 méthode

public afterDelete ( )

afterFind() public méthode

public afterFind ( )

allPosts() public méthode

public allPosts ( ) : CActiveDataProvider
Résultat CActiveDataProvider

attributeLabels() public méthode

public attributeLabels ( ) : array
Résultat array customized attribute labels (name=>label)

beforeSave() public méthode

public beforeSave ( ) : boolean
Résultat boolean

beforeValidate() public méthode

public beforeValidate ( ) : boolean
Résultat boolean

behaviors() public méthode

public behaviors ( ) : array
Résultat array

createPublicPost() public méthode

public createPublicPost ( array $post ) : boolean
$post array
Résultat boolean

deleteUserPost() public méthode

public deleteUserPost ( $postId, $userId ) : integer
$postId
$userId
Résultat integer

findUserPost() public méthode

public findUserPost ( $postId, $userId ) : CActiveRecord
$postId
$userId
Résultat CActiveRecord

get() public méthode

public get ( $id, array $with = [] ) : mixed
$id
$with array
Résultat mixed

getAccessType() public méthode

public getAccessType ( ) : string
Résultat string

getAccessTypeList() public méthode

public getAccessTypeList ( ) : array
Résultat array

getArchive() public méthode

public getArchive ( null $blogId = null, integer $cache = 3600 ) : mixed
$blogId null
$cache integer
Résultat mixed

getByTag() public méthode

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

getCategories() public méthode

public getCategories ( ) : mixed
Résultat mixed

getCommentCount() public méthode

public getCommentCount ( ) : integer | mixed
Résultat integer | mixed

getCommentStatus() public méthode

public getCommentStatus ( ) : string
Résultat string

getCommentStatusList() public méthode

public getCommentStatusList ( ) : array
Résultat array

getForBlog() public méthode

public getForBlog ( $blogId ) : Post
$blogId
Résultat Post

getForCategory() public méthode

public getForCategory ( $categoryId ) : Post
$categoryId
Résultat Post

getForUser() public méthode

public getForUser ( $user ) : Post
$user
Résultat Post

getQuote() public méthode

public getQuote ( integer $limit = 500 ) : string
$limit integer
Résultat string

getStatus() public méthode

public getStatus ( ) : string
Résultat string

getStatusList() public méthode

public getStatusList ( ) : array
Résultat array

getStream() public méthode

public getStream ( integer $limit = 10, $cacheTime ) : mixed
$limit integer
$cacheTime
Résultat mixed

getTitle() public méthode

public getTitle ( ) : mixed | string
Résultat mixed | string

isDraft() public méthode

public isDraft ( ) : boolean
Résultat boolean

isPublished() public méthode

public isPublished ( ) : boolean
Résultat boolean

limit() public méthode

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

model() public static méthode

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

publish() public méthode

public publish ( ) : boolean
Résultat boolean

relations() public méthode

public relations ( ) : array
Résultat array relational rules.

rules() public méthode

public rules ( ) : array
Résultat array validation rules for model attributes.

scopes() public méthode

public scopes ( ) : array
Résultat array

sortByPubDate() public méthode

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

tableName() public méthode

public tableName ( ) : string
Résultat string the associated database table name

Property Details

$tags public_oe property

tags list
public $tags