PHP 클래스 Comments_model, 68kb

상속: extends CI_Model
파일 보기 프로젝트 열기: 68kb/68kb 1 사용 예제들

공개 메소드들

메소드 설명
__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