PHP Класс Comments_model, 68kb

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

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

Метод Описание
__construct ( ) : void Constructor
add_comment ( array $data ) : mixed Add Comment
change_display ( $status, $id ) Chagne Display
delete_comment ( $id ) : true Delete Category
edit_comment ( $id, array $data ) : true Edit Category
email_admin ( $id, $data = '' ) : integer Email the admin about the comment
get_article_comments ( $id ) : array Get approved comments
get_article_comments_count ( $id ) : integer Get approved comments count
get_new_comments ( $date ) : array Get a list of all new orders since a certain timestamp
spam_check ( $email, $comment ) : mixed Spam Check

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

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

Constructor
public __construct ( ) : void
Результат void

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

Add Comment
public add_comment ( array $data ) : mixed
$data array An array of data.
Результат mixed Id on success.

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

Chagne Display
public change_display ( $status, $id )

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

Delete Category
public delete_comment ( $id ) : true
Результат true on success.

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

Edit Category
public edit_comment ( $id, array $data ) : true
$data array An array of data.
Результат true on success.

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

Email the admin about the comment
public email_admin ( $id, $data = '' ) : integer
Результат integer

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

Get approved comments based of article id
public get_article_comments ( $id ) : array
Результат array

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

Get approved comments count based of article id
public get_article_comments_count ( $id ) : integer
Результат integer

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

Get a list of all new orders since a certain timestamp
public get_new_comments ( $date ) : array
Результат array

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

Very simple spam checker. Checks the comment for links and if they already have one approved comment. I didn't add any hooks here because I thought it would be better to check after it is submitted so you can do a query and get everything about the comment.
public spam_check ( $email, $comment ) : mixed
Результат mixed