diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-08 03:27:48 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-08 03:27:48 +0100 |
commit | 28c2c975b118016d07212ed8e7c22ff280309f82 (patch) | |
tree | f1552392a3d87efebd7c565c6414ae41dc208ee9 /user_guide_src/source/libraries/trackback.rst | |
parent | 9228f85b1b4f59cc88ba7c4addc258a7a5fd0ac0 (diff) |
[ci skip] Add return types to library docs
Diffstat (limited to 'user_guide_src/source/libraries/trackback.rst')
-rw-r--r-- | user_guide_src/source/libraries/trackback.rst | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/user_guide_src/source/libraries/trackback.rst b/user_guide_src/source/libraries/trackback.rst index c5b01a2ee..22859a13d 100644 --- a/user_guide_src/source/libraries/trackback.rst +++ b/user_guide_src/source/libraries/trackback.rst @@ -225,22 +225,24 @@ Class Reference .. method:: send($tb_data) - :param array $tb_data: trackback data - :returns: bool + :param array $tb_data: Trackback data + :returns: TRUE on success, FALSE on failure + :rtype: bool Send trackback. .. method:: receive() - :returns: bool + :returns: TRUE on success, FALSE on failure + :rtype: bool This method simply validates the incoming TB data, returning TRUE on success and FALSE on failure. If the data is valid it is set to the ``$this->data`` array so that it can be inserted into a database. .. method:: send_error([$message = 'Incomplete information') - :param string $message: error message - :returns: void + :param string $message: Error message + :rtype: void Responses to a trackback request with an error message. @@ -248,7 +250,7 @@ Class Reference .. method:: send_success() - :returns: void + :rtype: void Responses to a trackback request with a success message. @@ -256,74 +258,82 @@ Class Reference .. method:: data($item) - :param string $item: data key - :returns: string + :param string $item: Data key + :returns: Data value or empty string if not found + :rtype: string Returns a single item from the reponse data array. .. method:: process($url, $data) - :param string $url: target url - :param string $data: raw post data - :returns: bool + :param string $url: Target url + :param string $data: Raw POST data + :returns: TRUE on success, FALSE on failure + :rtype: bool Opens a socket connection and passes the data to the server, returning TRUE on success and FALSE on failure. .. method:: extract_urls($urls) - :param string $urls: comma-separated url list - :returns: string + :param string $urls: Comma-separated URL list + :returns: Array of URLs + :rtype: array This method lets multiple trackbacks to be sent. It takes a string of URLs (separated by comma or space) and puts each URL into an array. .. method:: validate_url(&$url) - :param string $url: trackback url - :returns: void + :param string $url: Trackback URL + :rtype: void Simply adds the *http://* prefix it it's not already present in the URL. .. method:: get_id($url) - :param string $url: trackback url - :returns: string + :param string $url: Trackback URL + :returns: URL ID or FALSE on failure + :rtype: string Find and return a trackback URL's ID or FALSE on failure. .. method:: convert_xml($str) - :param string $str: input string - :returns: string + :param string $str: Input string + :returns: Converted string + :rtype: string Converts reserved XML characters to entities. .. method:: limit_characters($str[, $n = 500[, $end_char = '…']]) - :param string $str: input string - :param int $n: max characters number - :param string $end_char: character to put at end of string - :returns: string + :param string $str: Input string + :param int $n: Max characters number + :param string $end_char: Character to put at end of string + :returns: Shortened string + :rtype: string Limits the string based on the character count. Will preserve complete words. .. method:: convert_ascii($str) - :param string $str: input string - :returns: string + :param string $str: Input string + :returns: Converted string + :rtype: string Converts high ASCII text and MS Word special characterss to HTML entities. .. method:: set_error($msg) - :param string $msg: error message - :returns: void + :param string $msg: Error message + :rtype: void Set an log an error message. .. method:: display_errors([$open = '<p>'[, $close = '</p>']]) - :param string $open: open tag - :param string $close: close tag - :returns: string + :param string $open: Open tag + :param string $close: Close tag + :returns: HTML formatted error messages + :rtype: string Returns error messages formatted in HTML or an empty string if there are no errors.
\ No newline at end of file |