PHP 클래스 CI_Trackback, TastyIgniter

파일 보기 프로젝트 열기: tastyigniter/tastyigniter

공개 프로퍼티들

프로퍼티 타입 설명
$charset string Character set
$convert_ascii boolean Whether to convert high-ASCII and MS Word characters to HTML entities.
$data array Trackback data
$error_msg string[] Error messages list
$response string Response

공개 메소드들

메소드 설명
__construct ( ) : void Constructor
convert_ascii ( $str ) : string High ASCII to Entities
convert_xml ( $str ) : string Convert Reserved XML characters to Entities
data ( $item ) : string Fetch a particular item
display_errors ( $open = '<p>', $close = '</p>' ) : string Show error messages
extract_urls ( $urls ) : string Extract Trackback URLs
get_id ( $url ) : string Find the Trackback URL's ID
limit_characters ( $str, $n = 500, $end_char = '&#8230;' ) : string Character limiter
process ( $url, $data ) : boolean Process Trackback
receive ( ) : boolean Receive Trackback Data
send ( $tb_data ) : boolean Send Trackback
send_error ( $message = 'Incomplete Information' ) : void Send Trackback Error Message
send_success ( ) : void Send Trackback Success Message
set_error ( $msg ) : void Set error message
validate_url ( &$url ) : void Validate URL

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( ) : void
리턴 void

convert_ascii() 공개 메소드

Converts Hight ascii text and MS Word special chars to character entities
public convert_ascii ( $str ) : string
리턴 string

convert_xml() 공개 메소드

Convert Reserved XML characters to Entities
public convert_xml ( $str ) : string
리턴 string

data() 공개 메소드

Fetch a particular item
public data ( $item ) : string
리턴 string

display_errors() 공개 메소드

Show error messages
public display_errors ( $open = '<p>', $close = '</p>' ) : string
리턴 string

extract_urls() 공개 메소드

This function lets multiple trackbacks be sent. It takes a string of URLs (separated by comma or space) and puts each URL into an array
public extract_urls ( $urls ) : string
리턴 string

get_id() 공개 메소드

Find the Trackback URL's ID
public get_id ( $url ) : string
리턴 string

limit_characters() 공개 메소드

Limits the string based on the character count. Will preserve complete words.
public limit_characters ( $str, $n = 500, $end_char = '&#8230;' ) : string
리턴 string

process() 공개 메소드

Opens a socket connection and passes the data to the server. Returns TRUE on success, FALSE on failure
public process ( $url, $data ) : boolean
리턴 boolean

receive() 공개 메소드

This function simply validates the incoming TB data. It returns FALSE on failure and TRUE on success. If the data is valid it is set to the $this->data array so that it can be inserted into a database.
public receive ( ) : boolean
리턴 boolean

send() 공개 메소드

Send Trackback
public send ( $tb_data ) : boolean
리턴 boolean

send_error() 공개 메소드

Allows custom errors to be set. By default it sends the "incomplete information" error, as that's the most common one.
public send_error ( $message = 'Incomplete Information' ) : void
리턴 void

send_success() 공개 메소드

This should be called when a trackback has been successfully received and inserted.
public send_success ( ) : void
리턴 void

set_error() 공개 메소드

Set error message
public set_error ( $msg ) : void
리턴 void

validate_url() 공개 메소드

Simply adds "http://" if missing
public validate_url ( &$url ) : void
리턴 void

프로퍼티 상세

$charset 공개적으로 프로퍼티

Character set
public string $charset
리턴 string

$convert_ascii 공개적으로 프로퍼티

Whether to convert high-ASCII and MS Word characters to HTML entities.
public bool $convert_ascii
리턴 boolean

$data 공개적으로 프로퍼티

Trackback data
public array $data
리턴 array

$error_msg 공개적으로 프로퍼티

Error messages list
public string[] $error_msg
리턴 string[]

$response 공개적으로 프로퍼티

Response
public string $response
리턴 string