Added some documentation
This commit is contained in:
parent
6ff5c23d50
commit
ffd73d137b
|
@ -28,15 +28,15 @@ class ostatus {
|
||||||
const OSTATUS_DEFAULT_POLL_TIMEFRAME_MENTIONS = 14400; // given in minutes
|
const OSTATUS_DEFAULT_POLL_TIMEFRAME_MENTIONS = 14400; // given in minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Fetches author data
|
||||||
*
|
*
|
||||||
* @param $xpath
|
* @param object $xpath The xpath object
|
||||||
* @param $context
|
* @param object $context The xml context of the author detals
|
||||||
* @param $importer
|
* @param array $importer user record of the importing user
|
||||||
* @param $contact
|
* @param array $contact Called by reference, will contain the fetched contact
|
||||||
* @param $onlyfetch
|
* @param bool $onlyfetch Only fetch the header without updating the contact entries
|
||||||
*
|
*
|
||||||
* @return
|
* @return array Array of author related entries for the item
|
||||||
*/
|
*/
|
||||||
private function fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) {
|
private function fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) {
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ class ostatus {
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $xml
|
* @param $xml
|
||||||
* @param $importer
|
* @param array $importer user record of the importing user
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -179,14 +179,12 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Imports an XML string containing OStatus elements
|
||||||
*
|
*
|
||||||
* @param $xml
|
* @param string $xml The XML
|
||||||
* @param $importer
|
* @param array $importer user record of the importing user
|
||||||
* @param $contact
|
* @param $contact
|
||||||
* @param $hub
|
* @param array $hub Called by reference, returns the fetched hub data
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static function import($xml,$importer,&$contact, &$hub) {
|
public static function import($xml,$importer,&$contact, &$hub) {
|
||||||
|
|
||||||
|
@ -530,11 +528,11 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Create an url out of an uri
|
||||||
*
|
*
|
||||||
* @param $href
|
* @param string $href URI in the format "parameter1:parameter1:..."
|
||||||
*
|
*
|
||||||
* @return
|
* @return string URL in the format http(s)://....
|
||||||
*/
|
*/
|
||||||
public static function convert_href($href) {
|
public static function convert_href($href) {
|
||||||
$elements = explode(":",$href);
|
$elements = explode(":",$href);
|
||||||
|
@ -560,12 +558,10 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Checks if there are entries in conversations that aren't present on our side
|
||||||
*
|
*
|
||||||
* @param $mentions
|
* @param bool $mentions Fetch conversations where we are mentioned
|
||||||
* @param $override
|
* @param bool $override Override the interval setting
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static function check_conversations($mentions = false, $override = false) {
|
public static function check_conversations($mentions = false, $override = false) {
|
||||||
$last = get_config('system','ostatus_last_poll');
|
$last = get_config('system','ostatus_last_poll');
|
||||||
|
@ -759,7 +755,7 @@ class ostatus {
|
||||||
*
|
*
|
||||||
* @param $conversation_url
|
* @param $conversation_url
|
||||||
* @param $uid
|
* @param $uid
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1184,11 +1180,11 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Checks if the current post is a reshare
|
||||||
*
|
*
|
||||||
* @param $item
|
* @param array $item The item array of thw post
|
||||||
*
|
*
|
||||||
* @return
|
* @return string The guid if the post is a reshare
|
||||||
*/
|
*/
|
||||||
private function get_reshared_guid($item) {
|
private function get_reshared_guid($item) {
|
||||||
$body = trim($item["body"]);
|
$body = trim($item["body"]);
|
||||||
|
@ -1220,11 +1216,11 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Cleans the body of a post if it contains picture links
|
||||||
*
|
*
|
||||||
* @param $body
|
* @param string $body The body
|
||||||
*
|
*
|
||||||
* @return
|
* @return string The cleaned body
|
||||||
*/
|
*/
|
||||||
private function format_picture_post($body) {
|
private function format_picture_post($body) {
|
||||||
$siteinfo = get_attached_data($body);
|
$siteinfo = get_attached_data($body);
|
||||||
|
@ -1256,8 +1252,8 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1317,7 +1313,7 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $root
|
* @param $root
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1344,9 +1340,9 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $root
|
* @param $root
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1416,8 +1412,8 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1490,7 +1486,7 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1503,7 +1499,7 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1516,9 +1512,9 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $toplevel
|
* @param $toplevel
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1540,7 +1536,7 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $contact
|
* @param $contact
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1565,7 +1561,7 @@ class ostatus {
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $url
|
* @param $url
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1606,9 +1602,9 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $repeated_guid
|
* @param $repeated_guid
|
||||||
* @param $toplevel
|
* @param $toplevel
|
||||||
*
|
*
|
||||||
|
@ -1673,12 +1669,12 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $toplevel
|
* @param $toplevel
|
||||||
*
|
*
|
||||||
* @return
|
* @return object
|
||||||
*/
|
*/
|
||||||
private function like_entry($doc, $item, $owner, $toplevel) {
|
private function like_entry($doc, $item, $owner, $toplevel) {
|
||||||
|
|
||||||
|
@ -1710,9 +1706,9 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $toplevel
|
* @param $toplevel
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1737,9 +1733,9 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $entry
|
* @param $entry
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $toplevel
|
* @param $toplevel
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1770,10 +1766,10 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $entry
|
* @param $entry
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $title
|
* @param $title
|
||||||
* @param $verb
|
* @param $verb
|
||||||
* @param $complete
|
* @param $complete
|
||||||
|
@ -1812,10 +1808,10 @@ class ostatus {
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* @param $doc
|
* @param object $doc XML document
|
||||||
* @param $entry
|
* @param $entry
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
* @param $complete
|
* @param $complete
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -1975,12 +1971,12 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Creates the XML for a salmon message
|
||||||
*
|
*
|
||||||
* @param $item
|
* @param array $item Data of the item that is to be posted
|
||||||
* @param $owner
|
* @param array $owner Contact data of the poster
|
||||||
*
|
*
|
||||||
* @return
|
* @return string XML for the salmon
|
||||||
*/
|
*/
|
||||||
public static function salmon($item,$owner) {
|
public static function salmon($item,$owner) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user