PHP Class CI_Trackback, TastyIgniter

Afficher le fichier Open project: tastyigniter/tastyigniter

Méthodes publiques

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

Constructor
public __construct ( ) : void
Résultat void

convert_ascii() public méthode

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

convert_xml() public méthode

Convert Reserved XML characters to Entities
public convert_xml ( $str ) : string
Résultat string

data() public méthode

Fetch a particular item
public data ( $item ) : string
Résultat string

display_errors() public méthode

Show error messages
public display_errors ( $open = '<p>', $close = '</p>' ) : string
Résultat string

extract_urls() public méthode

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
Résultat string

get_id() public méthode

Find the Trackback URL's ID
public get_id ( $url ) : string
Résultat string

limit_characters() public méthode

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

process() public méthode

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

receive() public méthode

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
Résultat boolean

send() public méthode

Send Trackback
public send ( $tb_data ) : boolean
Résultat boolean

send_error() public méthode

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
Résultat void

send_success() public méthode

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

set_error() public méthode

Set error message
public set_error ( $msg ) : void
Résultat void

validate_url() public méthode

Simply adds "http://" if missing
public validate_url ( &$url ) : void
Résultat void

Property Details

$charset public_oe property

Character set
public string $charset
Résultat string

$convert_ascii public_oe property

Whether to convert high-ASCII and MS Word characters to HTML entities.
public bool $convert_ascii
Résultat boolean

$data public_oe property

Trackback data
public array $data
Résultat array

$error_msg public_oe property

Error messages list
public string[] $error_msg
Résultat string[]

$response public_oe property

Response
public string $response
Résultat string