<?php
/**
* @file bin/worker.php
- * @brief Starts the background processing
+ * Starts the background processing
*/
use Dice\Dice;
define('NEW_UPDATE_ROUTINE_VERSION', 1170);
/**
- * @brief Constant with a HTML line break.
+ * Constant with a HTML line break.
*
* Contains a HTML line break (br) element and a real carriage return with line
* feed for the source.
define('EOL', "<br />\r\n");
/**
- * @brief Image storage quality.
+ * Image storage quality.
*
* Lower numbers save space at cost of image detail.
* For ease of upgrade, please do not change here. Set system.jpegquality = n in config/local.config.php,
}
/**
- * @brief Returns the user id of locally logged in user or false.
+ * Returns the user id of locally logged in user or false.
*
* @return int|bool user id or false
*/
}
/**
- * @brief Returns the public contact id of logged in user or false.
+ * Returns the public contact id of logged in user or false.
*
* @return int|bool public contact id or false
*/
}
/**
- * @brief Returns contact id of authenticated site visitor or false
+ * Returns contact id of authenticated site visitor or false
*
* @return int|bool visitor_id or false
*/
}
/**
- * @brief Show an error message to user.
+ * Show an error message to user.
*
* This function save text in session, to be shown to the user at next page load
*
}
/**
- * @brief Show an info message to user.
+ * Show an info message to user.
*
* This function save text in session, to be shown to the user at next page load
*
}
/**
- * @brief Check if current user has admin role.
+ * Check if current user has admin role.
*
* @return bool true if user is an admin
*/
}
/**
- * @brief Returns the path where spool files are stored
+ * Returns the path where spool files are stored
*
* @return string Spool path
*/
$called_api = [];
/**
+ * Auth API user
+ *
* It is not sufficient to use local_user() to check whether someone is allowed to use the API,
* because this will open CSRF holes (just embed an image with src=friendicasite.com/api/statuses/update?status=CSRF
* into a page, and visitors will post something without noticing it).
- *
- * @brief Auth API user
*/
function api_user()
{
}
/**
+ * Get source name from API client
+ *
* Clients can send 'source' parameter to be show in post metadata
* as "sent via <source>".
* Some clients doesn't send a source param, we support ones we know
* (only Twidere, atm)
*
- * @brief Get source name from API client
- *
* @return string
* Client source name, default to "api" if unset/unknown
* @throws Exception
}
/**
- * @brief Format date for API
+ * Format date for API
*
* @param string $str Source date, as UTC
* @return string Date in UTC formatted as "D M d H:i:s +0000 Y"
/**
* Register a function to be the endpoint for defined API path.
*
- * @brief Register API endpoint
- *
* @param string $path API URL path, relative to DI::baseUrl()
* @param string $func Function name to call on path request
* @param bool $auth API need logged user
* Log in user via OAuth1 or Simple HTTP Auth.
* Simple Auth allow username in form of <pre>user@server</pre>, ignoring server part
*
- * @brief Login API user
- *
* @param App $a App
* @throws ForbiddenException
* @throws InternalServerErrorException
}
/**
+ * Check HTTP method of called API
+ *
* API endpoints can define which HTTP method to accept when called.
* This function check the current HTTP method agains endpoint
* registered method.
*
- * @brief Check HTTP method of called API
- *
* @param string $method Required methods, uppercase, separated by comma
* @return bool
*/
}
/**
- * Authenticate user, call registered API function, set HTTP headers
+ * Main API entry point
*
- * @brief Main API entry point
+ * Authenticate user, call registered API function, set HTTP headers
*
* @param App $a App
* @param App\Arguments $args The app arguments (optional, will retrieved by the DI-Container in case of missing)
}
/**
- * @brief Format API error string
+ * Format API error string
*
* @param string $type Return type (xml, json, rss, as)
* @param object $e HTTPException Error object
}
/**
- * @brief Set values for RSS template
+ * Set values for RSS template
*
* @param App $a
* @param array $arr Array to be passed to template
/**
- * @brief Unique contact to contact url.
+ * Unique contact to contact url.
*
* @param int $id Contact id
* @return bool|string
}
/**
- * @brief Get user info array.
+ * Get user info array.
*
* @param App $a App
* @param int|string $contact_id Contact ID or URL
}
/**
- * @brief return api-formatted array for item's author and owner
+ * return api-formatted array for item's author and owner
*
* @param App $a App
* @param array $item item from db
}
/**
- * @brief walks recursively through an array with the possibility to change value and key
+ * walks recursively through an array with the possibility to change value and key
*
* @param array $array The array to walk through
* @param callable $callback The callback function
}
/**
- * @brief Callback function to transform the array in an array that can be transformed in a XML file
+ * Callback function to transform the array in an array that can be transformed in a XML file
*
* @param mixed $item Array item value
* @param string $key Array key
}
/**
- * @brief Creates the XML from a JSON style array
+ * Creates the XML from a JSON style array
*
* @param array $data JSON style array
* @param string $root_element Name of the root element
}
/**
- * @brief Formats the data according to the data type
+ * Formats the data according to the data type
*
* @param string $root_element Name of the root element
* @param string $type Return type (atom, rss, xml, json)
/**
* Returns the most recent statuses posted by users this node knows about.
*
- * @brief Returns the list of public federated posts this node knows about
- *
* @param string $type Return format: json, xml, atom, rss
* @return array|string
* @throws BadRequestException
/**
* Returns the most recent statuses posted by the user.
*
- * @brief Returns a user's public timeline
- *
* @param string $type Either "json" or "xml"
* @return string|array
* @throws BadRequestException
}
/**
- * @brief return <a href='url'>name</a> as array
+ * return <a href='url'>name</a> as array
*
* @param string $txt text
* @return array
/**
- * @brief return likes, dislikes and attend status for item
+ * return likes, dislikes and attend status for item
*
* @param array $item array
* @param string $type Return type (atom, rss, xml, json)
/**
- * @brief return data from profiles
+ * return data from profiles
*
* @param array $profile_row array containing data from db table 'profile'
* @return array
}
/**
- * @brief format items to be returned by api
+ * format items to be returned by api
*
* @param array $items array of items
* @param array $user_info
api_register_func('api/lists/statuses', 'api_lists_statuses', true);
/**
+ * Returns either the friends of the follower list
+ *
* Considers friends and followers lists to be private and won't return
* anything if any user_id parameter is passed.
*
- * @brief Returns either the friends of the follower list
- *
* @param string $qtype Either "friends" or "followers"
* @return boolean|array
* @throws BadRequestException
/**
- * Returns the user's friends.
- *
- * @brief Returns the list of friends of the provided user
+ * Returns the list of friends of the provided user
*
* @deprecated By Twitter API in favor of friends/list
*
}
/**
- * Returns the user's followers.
- *
- * @brief Returns the list of followers of the provided user
+ * Returns the list of followers of the provided user
*
* @deprecated By Twitter API in favor of friends/list
*
api_register_func('api/direct_messages/new', 'api_direct_messages_new', true, API_METHOD_POST);
/**
- * Destroys a direct message.
- *
- * @brief delete a direct_message from mail table through api
+ * delete a direct_message from mail table through api
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
/**
* Unfollow Contact
*
- * @brief unfollow contact
- *
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
* @throws BadRequestException
/**
- * @brief delete a complete photoalbum with all containing photos from database through api
+ * delete a complete photoalbum with all containing photos from database through api
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
}
/**
- * @brief update the name of the album for all photos of an album
+ * update the name of the album for all photos of an album
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
/**
- * @brief list all photos of the authenticated user
+ * list all photos of the authenticated user
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
}
/**
- * @brief upload a new photo or change an existing photo
+ * upload a new photo or change an existing photo
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
}
/**
- * @brief delete a single photo from the database through api
+ * delete a single photo from the database through api
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
/**
- * @brief returns the details of a specified photo id, if scale is given, returns the photo data in base 64
+ * returns the details of a specified photo id, if scale is given, returns the photo data in base 64
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
/**
- * Updates the user’s profile image.
- *
- * @brief updates the profile image for the user (either a specified profile or the default profile)
+ * updates the profile image for the user (either a specified profile or the default profile)
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
*
}
/**
- * @brief Return the item shared, if the item contains only the [share] tag
+ * Return the item shared, if the item contains only the [share] tag
*
* @param array $item Sharer item
* @return array|false Shared item or false if not a reshare
api_register_func('api/friendica/activity/unattendmaybe', 'api_friendica_activity', true, API_METHOD_POST);
/**
- * @brief Returns notifications
+ * Returns notifications
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
}
/**
- * POST request with 'id' param as notification id
+ * Set notification as seen and returns associated item (if possible)
*
- * @brief Set notification as seen and returns associated item (if possible)
+ * POST request with 'id' param as notification id
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
api_register_func('api/friendica/notification', 'api_friendica_notification', true, API_METHOD_GET);
/**
- * @brief update a direct_message to seen state
+ * update a direct_message to seen state
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array (success result=ok, error result=error with error message)
api_register_func('api/friendica/direct_messages_setseen', 'api_friendica_direct_messages_setseen', true);
/**
- * @brief search for direct_messages containing a searchstring through api
+ * search for direct_messages containing a searchstring through api
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @param string $box
api_register_func('api/friendica/direct_messages_search', 'api_friendica_direct_messages_search', true);
/**
- * @brief return data of all the profiles a user has to the client
+ * return data of all the profiles a user has to the client
*
* @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
* @return string|array
api_register_func('api/saved_searches/list', 'api_saved_searches_list', true);
/*
- * Bind comment numbers(friendica_comments: Int) on each statuses page of *_timeline / favorites / search
+ * Number of comments
*
- * @brief Number of comments
+ * Bind comment numbers(friendica_comments: Int) on each statuses page of *_timeline / favorites / search
*
* @param object $data [Status, Status]
*
}
/**
- * @brief Add comments to top level entries that had been fetched before
+ * Add comments to top level entries that had been fetched before
*
* The system will fetch the comments for the local user whenever possible.
* This behaviour is currently needed to allow commenting on Friendica posts.
}
/**
- * @brief Checks item to see if it is one of the builtin activities (like/dislike, event attendance, consensus items, etc.)
+ * Checks item to see if it is one of the builtin activities (like/dislike, event attendance, consensus items, etc.)
+ *
* Increments the count of each matching activity and adds a link to the author as needed.
*
* @param array $item
/**
* Plucks the children of the given parent from a given item list.
*
- * @brief Plucks all the children in the given item list of the given parent
- *
* @param array $item_list
* @param array $parent
* @param bool $recursive
}
/**
- * @brief Recursively sorts a tree-like item array
+ * Recursively sorts a tree-like item array
*
* @param array $items
* @return array
}
/**
- * @brief Recursively add all children items at the top level of a list
+ * Recursively add all children items at the top level of a list
*
* @param array $children List of items to append
* @param array $item_list
}
/**
+ * Selectively flattens a tree-like item structure to prevent threading stairs
+ *
* This recursive function takes the item tree structure created by conv_sort() and
* flatten the extraneous depth levels when people reply sequentially, removing the
* stairs effect in threaded conversations limiting the available content width.
* This process is rendered somewhat more complicated because items can be either
* replies or likes, and these don't factor at all in the reply count/last reply.
*
- * @brief Selectively flattens a tree-like item structure to prevent threading stairs
- *
* @param array $parent A tree-like array of items
* @return array
*/
/**
- * Expands a flat list of items into corresponding tree-like conversation structures,
+ * Expands a flat list of items into corresponding tree-like conversation structures.
+ *
* sort the top-level posts either on "received" or "commented", and finally
* append all the items at the top level (???)
*
- * @brief Expands a flat item list into a conversation array for display
- *
* @param array $item_list A list of items belonging to one or more conversations
* @param string $order Either on "received" or "commented"
* @return array
}
/**
- * @brief usort() callback to sort item arrays by pinned and the received key
+ * usort() callback to sort item arrays by pinned and the received key
*
* @param array $a
* @param array $b
}
/**
- * @brief usort() callback to sort item arrays by the received key
+ * usort() callback to sort item arrays by the received key
*
* @param array $a
* @param array $b
}
/**
- * @brief usort() callback to reverse sort item arrays by the received key
+ * usort() callback to reverse sort item arrays by the received key
*
* @param array $a
* @param array $b
}
/**
- * @brief usort() callback to sort item arrays by the commented key
+ * usort() callback to sort item arrays by the commented key
*
* @param array $a
* @param array $b
use Friendica\Database\DBA;
/**
- * @brief execute SQL query with printf style args - deprecated
+ * execute SQL query with printf style args - deprecated
*
* Please use the DBA:: functions instead:
* DBA::select, DBA::exists, DBA::insert
use Friendica\Util\Strings;
/**
- * @brief Creates a notification entry and possibly sends a mail
+ * Creates a notification entry and possibly sends a mail
*
* @param array $params Array with the elements:
* uid, item, parent, type, otype, verb, event,
}
/**
- * @brief Checks for users who should be notified
+ * Checks for users who should be notified
*
* @param int $itemid ID of the item for which the check should be done
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Checks for item related notifications and sends them
+ * Checks for item related notifications and sends them
*
* @param int $itemid ID of the item for which the check should be done
* @param int $uid User ID
}
/**
- * @brief Formats a notification message with the notification author
+ * Formats a notification message with the notification author
*
* Replace the name with {0} but ensure to make that only once. The {0} is used
* later and prints the name in bold.
<?php
/**
* @file mod/cal.php
- * @brief The calendar module
- * This calendar is for profile visitors and contains only the events
- * of the profile owner
+ * The calendar module
+ *
+ * This calendar is for profile visitors and contains only the events
+ * of the profile owner
*/
use Friendica\App;
<?php
/**
* @file mod/dfrn_confirm.php
- * @brief Module: dfrn_confirm
+ * Module: dfrn_confirm
+ *
* Purpose: Friendship acceptance for DFRN contacts
*
* There are two possible entry points and three scenarios.
/**
* @file mod/dfrn_notify.php
- * @brief The dfrn notify endpoint
+ * The dfrn notify endpoint
* @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
*/
/**
* @file mod/dfrn_request.php
- * @brief Module: dfrn_request
+ * Module: dfrn_request
*
* Purpose: Handles communication associated with the issuance of
* friend requests.
<?php
/**
* @file mod/events.php
- * @brief The events module
+ * The events module
*/
use Friendica\App;
use Friendica\Util\Proxy as ProxyUtils;
/**
- * @brief Controller for /match.
+ * Controller for /match.
*
* It takes keywords from your profile and queries the directory server for
* matching keywords from other profiles.
}
/**
- * @brief Sets the pager data and returns SQL
+ * Sets the pager data and returns SQL
*
* @param App $a The global App
* @param Pager $pager
}
/**
- * @brief Sets items as seen
+ * Sets items as seen
*
* @param array $condition The array with the SQL condition
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Create the conversation HTML
+ * Create the conversation HTML
*
* @param App $a The global App
* @param array $items Items of the conversation
}
/**
- * @brief Get the network content in flat view
+ * Get the network content in flat view
*
* @param App $a The global App
* @param integer $update Used for the automatic reloading
}
/**
- * @brief Get the network content in threaded view
+ * Get the network content in threaded view
*
* @param App $a The global App
* @param integer $update Used for the automatic reloading
}
/**
- * @brief Get the network tabs menu
+ * Get the network tabs menu
*
* @param App $a The global App
* @return string Html of the networktab
<?php
/**
* @file mod/notifications.php
- * @brief The notifications module
+ * The notifications module
*/
use Friendica\App;
/**
* @file mod/parse_url.php
- * @brief The parse_url module
+ * The parse_url module
*
* This module does parse an url for embeddable content (audio, video, image files or link)
* information and does format this information to BBCode
}
/**
- * @brief Legacy function to call ParseUrl::getSiteinfoCached
+ * Legacy function to call ParseUrl::getSiteinfoCached
*
* Note: We have moved the function to ParseUrl.php. This function is only for
* legacy support and will be remove in the future
use Friendica\Util\XML;
/**
- * @brief Outputs the counts and the lists of various notifications
+ * Outputs the counts and the lists of various notifications
*
* The output format can be controlled via the GET parameter 'format'. It can be
* - xml (deprecated legacy default)
}
/**
- * @brief Retrieves the notifications array for the given user ID
+ * Retrieves the notifications array for the given user ID
*
* @param int $uid User id
* @return array Associative array of notifications
}
/**
- * @brief Backward-compatible XML formatting for ping.php output
+ * Backward-compatible XML formatting for ping.php output
* @deprecated
*
* @param array $data The initial ping data array
<?php
/**
* @file mod/uimport.php
- * @brief View for user import
+ * View for user import
*/
use Friendica\App;
<?php
/**
* @file mod/wall_upload.php
- * @brief Module for uploading a picture to the profile wall
+ * Module for uploading a picture to the profile wall
*
* By default the picture will be stored in the photo album with the name Wall Photos.
* You can specify a different album by adding an optional query string "album="
<?php
/**
* @file mod/worker.php
- * @brief Module for running the worker as frontend process
+ * Module for running the worker as frontend process
*/
use Friendica\Core\Config;
*
* class: App
*
- * @brief Our main application structure for the life of this page.
+ * Our main application structure for the life of this page.
*
* Primarily deals with the URL that got us here
* and tries to make some sense of it, and
}
/**
- * @brief Return full URL to theme which is currently in effect.
- *
* Provide a sane default if nothing is chosen or the specified theme does not exist.
*
* @return string
}
/**
- * @brief Tries to auth the user from the cookie or session
+ * Tries to auth the user from the cookie or session
*
* @param App $a The Friendica Application context
*
}
/**
- * @brief Sets the provided user's authenticated session
+ * Sets the provided user's authenticated session
*
* @param App $a The Friendica application context
* @param array $user_record The current "user" record
abstract class BaseModule
{
/**
- * @brief Initialization method common to both content() and post()
+ * Initialization method common to both content() and post()
*
* Extend this method if you need to do any shared processing before both
* content() or post()
}
/**
- * @brief Module GET method to display raw content from technical endpoints
+ * Module GET method to display raw content from technical endpoints
*
* Extend this method if the module is supposed to return communication data,
* e.g. from protocol implementations.
}
/**
- * @brief Module GET method to display any content
+ * Module GET method to display any content
*
* Extend this method if the module is supposed to return any display
* through a GET request. It can be an HTML page through templating or a
}
/**
- * @brief Module POST method to process submitted data
+ * Module POST method to process submitted data
*
* Extend this method if the module is supposed to process POST requests.
* Doesn't display any content
}
/**
- * @brief Called after post()
+ * Called after post()
*
* Unknown purpose
*/
use RuntimeException;
/**
- * @brief tool to archive a contact on the server
+ * tool to archive a contact on the server
*
* With this tool you can archive a contact when you know that it isn't existing anymore.
* Normally this does happen automatically after a few days.
use RuntimeException;
/**
- * @brief tool to access the cache from the CLI
+ * tool to access the cache from the CLI
*
* With this script you can access the cache of your node from the CLI.
* You can read current values stored in the cache and set new values
use RuntimeException;
/**
- * @brief tool to access the system config from the CLI
+ * tool to access the system config from the CLI
*
* With this script you can access the system configuration of your node from
* the CLI. You can do both, reading current values stored in the database and
}
/**
- * @brief Adds a doxygen header
+ * Adds a doxygen header
*
* @param string $line The current line of the document
*
$space = substr($line, 0, $length);
$block = $space . "/**\n" .
- $space . " * @brief \n" .
+ $space . " * \n" .
$space . " *\n"; /**/
use RuntimeException;
/**
- * @brief Performs database updates from the command line
+ * Performs database updates from the command line
*
* @author Hypolite Petovan <hypolite@mrpetovan.com>
*/
use Friendica\Model\Contact;
/**
- * @brief tool to block an account from the node
+ * tool to block an account from the node
*
* With this tool, you can block an account in such a way, that no postings
* or comments this account writes are accepted to the node.
use RuntimeException;
/**
- * @brief tool to silence accounts on the global community page
+ * tool to silence accounts on the global community page
*
* With this tool, you can silence an account on the global community page.
* Postings from silenced accounts will not be displayed on the community
use RuntimeException;
/**
- * @brief tool to access the locks from the CLI
+ * tool to access the locks from the CLI
*
* With this script you can access the locks of your node from the CLI.
* You can read current locks and set/remove locks.
use Friendica\Core\Config\IConfiguration;
/**
- * @brief Sets maintenance mode for this node
+ * Sets maintenance mode for this node
*
* @author Hypolite Petovan <hypolite@mrpetovan.com>
*/
use RuntimeException;
/**
- * @brief tool to set a new password for a user
+ * tool to set a new password for a user
*
* With this tool, you can set a new password for a user
*
use Friendica\Core\Config\IConfiguration;
/**
- * @brief Manage blocked servers
+ * Manage blocked servers
*
* With this tool, you can list the current blocked servers
* or you can add / remove a blocked server from the list
use Friendica\Core\StorageManager;
/**
- * @brief tool to manage storage backend and stored data from CLI
+ * tool to manage storage backend and stored data from CLI
*
*/
class Storage extends \Asika\SimpleConsole\Console
use Friendica\Util\Strings;
/**
- * @brief ContactSelector class
+ * ContactSelector class
*/
class ContactSelector
{
<?php
/**
* @file src/Content/Feature.php
- * @brief Features management
+ * Features management
*/
namespace Friendica\Content;
class Feature
{
/**
- * @brief check if feature is enabled
+ * check if feature is enabled
*
* @param integer $uid user id
* @param string $feature feature
}
/**
- * @brief check if feature is enabled or disabled by default
+ * check if feature is enabled or disabled by default
*
* @param string $feature feature
* @return boolean
}
/**
- * @brief Get a list of all available features
+ * Get a list of all available features
*
* The array includes the setting group, the setting name,
* explainations for the setting and if it's enabled or disabled
<?php
/**
* @file src/Content/ForumManager.php
- * @brief ForumManager class with its methods related to forum functionality
+ * ForumManager class with its methods related to forum functionality
*/
namespace Friendica\Content;
use Friendica\Util\Proxy as ProxyUtils;
/**
- * @brief This class handles methods related to the forum functionality
+ * This class handles methods related to the forum functionality
*/
class ForumManager
{
/**
- * @brief Function to list all forums a user is connected with
+ * Function to list all forums a user is connected with
*
* @param int $uid of the profile owner
* @param boolean $lastitem Sort by lastitem
/**
- * @brief Forumlist widget
+ * Forumlist widget
*
* Sidebar widget to show subcribed friendica forums. If activated
* in the settings, it appears at the notwork page sidebar
}
/**
- * @brief Format forumlist as contact block
+ * Format forumlist as contact block
*
* This function is used to show the forumlist in
* the advanced profile.
}
/**
- * @brief count unread forum items
+ * count unread forum items
*
* Count unread items of connected forums and private groups
*
/**
* Prepares a list of navigation links
*
- * @brief Prepares a list of navigation links
* @param App $a
* @return array Navigation links
* string 'sitelocation' => The webbie (username@site.com)
}
/**
- * @brief Get data from an URL to embed its content.
+ * Get data from an URL to embed its content.
*
* @param string $embedurl The URL from which the data should be fetched.
* @param bool $no_rich_type If set to true rich type content won't be fetched.
/**
* Determines if rich content OEmbed is allowed for the provided URL
*
- * @brief Determines if rich content OEmbed is allowed for the provided URL
* @param string $url
* @return boolean
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Generates the iframe HTML for an oembed attachment.
+ * Generates the iframe HTML for an oembed attachment.
*
* Width and height are given by the remote, and are regularly too small for
* the generated iframe.
}
/**
+ * Generates attribute search XPath string
+ *
* Generates an XPath query to select elements whose provided attribute contains
* the provided value in a space-separated list.
*
- * @brief Generates attribute search XPath string
- *
* @param string $attr Name of the attribute to seach
* @param string $value Value to search in a space-separated list
* @return string
/**
* Returns the inner XML string of a provided DOMNode
*
- * @brief Returns the inner XML string of a provided DOMNode
- *
* @param DOMNode $node
* @return string
*/
}
/**
- * @brief Minimal pager (newer/older)
+ * Minimal pager (newer/older)
*
* This mode is intended for reverse chronological pages and presents only two links, newer (previous) and older (next).
* The itemCount is the number of displayed items. If no items are displayed, the older button is disabled.
}
/**
- * @brief Full pager (first / prev / 1 / 2 / ... / 14 / 15 / next / last)
+ * Full pager (first / prev / 1 / 2 / ... / 14 / 15 / next / last)
*
* This mode presents page numbers as well as first, previous, next and last links.
* The itemCount is the total number of items including those not displayed.
/**
* @file src/Content/Smilies.php
- * @brief This file contains the Smilies class which contains functions to handle smiles
+ * This file contains the Smilies class which contains functions to handle smiles
*
* @todo Use the shortcodes from here:
* https://github.com/iamcal/emoji-data/blob/master/emoji_pretty.json?raw=true
class Smilies
{
/**
- * @brief Replaces/adds the emoticon list
+ * Replaces/adds the emoticon list
*
* This function should be used whenever emoticons are added
*
}
/**
- * @brief Function to list all smilies
+ * Function to list all smilies
*
* Get an array of all smilies, both internal and from addons.
*
* function from being executed by the prepare_text() routine when preparing
* bbcode source for HTML display
*
- * @brief Replaces text emoticons with graphical images
* @param string $s Text that should be replaced
* @param boolean $no_images Only replace emoticons without images
*
/**
- * @brief expand <3333 to the correct number of hearts
+ * expand <3333 to the correct number of hearts
*
* @param string $x string
*
class BBCode
{
/**
- * @brief Fetches attachment data that were generated the old way
+ * Fetches attachment data that were generated the old way
*
* @param string $body Message body
* @return array
}
/**
- * @brief Fetches attachment data that were generated with the "attachment" element
+ * Fetches attachment data that were generated with the "attachment" element
*
* @param string $body Message body
* @return array
}
/**
- * @brief Converts a BBCode text into plaintext
+ * Converts a BBCode text into plaintext
*
* @param $text
* @param bool $keep_urls Whether to keep URLs in the resulting plaintext
}
/**
+ * Truncates imported message body string length to max_import_size
+ *
* The purpose of this function is to apply system message length limits to
* imported messages without including any embedded photos in the length
*
- * @brief Truncates imported message body string length to max_import_size
* @param string $body
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*
* Note: Can produce a [bookmark] tag in the returned string
*
- * @brief Processes [attachment] tags
* @param string $text
* @param bool|int $simplehtml
* @param bool $tryoembed
/**
* Converts [url] BBCodes in a format that looks fine on Mastodon. (callback function)
*
- * @brief Converts [url] BBCodes in a format that looks fine on Mastodon. (callback function)
* @param array $match Array with the matching values
* @return string reformatted link including HTML codes
*/
}
/**
- * @brief Converts [url] BBCodes in a format that looks fine on ActivityPub systems.
+ * Converts [url] BBCodes in a format that looks fine on ActivityPub systems.
* @param string $url URL that is about to be reformatted
* @return string reformatted link including HTML codes
*/
}
/**
- * @brief Converts a BBCode message to HTML message
+ * Converts a BBCode message to HTML message
*
* BBcode 2 HTML was written by WAY2WEB.net
* extended to work with Mistpark/Friendica - Mike Macgirvin
}
/**
- * @brief Strips the "abstract" tag from the provided text
+ * Strips the "abstract" tag from the provided text
*
* @param string $text The text with BBCode
* @return string The same text - but without "abstract" element
}
/**
- * @brief Returns the value of the "abstract" element
+ * Returns the value of the "abstract" element
*
* @param string $text The text that maybe contains the element
* @param string $addon The addon for which the abstract is meant for
}
/**
- * @brief Callback function to replace a Friendica style mention in a mention for Diaspora
+ * Callback function to replace a Friendica style mention in a mention for Diaspora
*
* @param array $match Matching values for the callback
* [1] = Mention type (! or @)
}
/**
- * @brief Converts a BBCode text into Markdown
+ * Converts a BBCode text into Markdown
*
* This function converts a BBCode item body to be sent to Markdown-enabled
* systems like Diaspora and Libertree
}
/**
- * @brief Pull out all #hashtags and @person tags from $string.
+ * Pull out all #hashtags and @person tags from $string.
*
* We also get @person@domain.com - which would make
* the regex quite complicated as tags can also
}
/**
+ * Converter for HTML to BBCode
+ *
* Made by: ike@piratenpartei.de
* Originally made for the syncom project: http://wiki.piratenpartei.de/Syncom
* https://github.com/annando/Syncom
*
- * @brief Converter for HTML to BBCode
* @param string $message
* @param string $basepath
* @return string
}
/**
- * @brief Sub function to complete incomplete URL
+ * Sub function to complete incomplete URL
*
* @param array $matches Result of preg_replace_callback
* @param string $basepath Basepath that is used to complete the URL
}
/**
- * @brief Complete incomplete URLs in BBCode
+ * Complete incomplete URLs in BBCode
*
* @param string $body Body with URLs
* @param string $basepath Base path that is used to complete the URL
}
/**
- * @brief Convert video HTML to BBCode tags
+ * Convert video HTML to BBCode tags
*
* @param string $s
* @return string
}
/**
- * @brief Format contacts as picture links or as text links
+ * Format contacts as picture links or as text links
*
* @param array $contact Array with contacts which contains an array with
* int 'id' => The ID of the contact
* Converts a Markdown string into HTML. The hardwrap parameter maximizes
* compatibility with Diaspora in spite of the Markdown standard.
*
- * @brief Converts a Markdown string into HTML
* @param string $text
* @param bool $hardwrap
* @return string
}
/**
- * @brief Callback function to replace a Diaspora style mention in a mention for Friendica
+ * Callback function to replace a Diaspora style mention in a mention for Friendica
*
* @param array $match Matching values for the callback
* [1] = mention type (@ or !)
/**
* Insert a tag cloud widget for the present profile.
*
- * @brief Insert a tag cloud widget for the present profile.
* @param int $limit Max number of displayed tags.
* @return string HTML formatted output.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
class CalendarExport
{
/**
- * @brief Get the events widget.
+ * Get the events widget.
*
* @return string Formated HTML of the calendar widget.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
/**
* Construct a tag/term cloud block for an user.
*
- * @brief Construct a tag/term cloud block for an user.
* @param int $uid The user ID.
* @param int $count Max number of displayed tags/terms.
* @param int $owner_id The contact ID of the owner of the tagged items.
* Get alphabetical sorted array of used tags/terms of an user including
* a weighting by frequency of use.
*
- * @brief Get alphabetical sorted array of used tags/terms of an user including
- * a weighting by frequency of use.
* @param int $uid The user ID.
* @param int $count Max number of displayed tags/terms.
* @param int $owner_id The contact id of the owner of the tagged items.
/**
* Calculate weighting of tags according to the frequency of use.
*
- * @brief Calculate weighting of tags according to the frequency of use.
* @param array $arr Array of tags/terms with tag/term name and total count of use.
* @return array Alphabetical sorted array of used tags/terms of an user.
*/
/**
* Compare function to sort tags/terms alphabetically.
*
- * @brief Compare function to sort tags/terms alphabetically.
* @param string $a
* @param string $b
*
/**
- * @brief Synchronize addons:
+ * Synchronize addons:
*
* system.addon contains a comma-separated list of names
* of addons which are used on this system.
}
/**
- * @brief uninstalls an addon.
+ * uninstalls an addon.
*
* @param string $addon name of the addon
* @return void
}
/**
- * @brief installs an addon.
+ * installs an addon.
*
* @param string $addon name of the addon
* @return bool
}
/**
- * @brief Parse addon comment in search of addon infos.
+ * Parse addon comment in search of addon infos.
*
* like
* \code
*
* @file include/Core/Config.php
*
- * @brief Contains the class with methods for system configuration
+ * Contains the class with methods for system configuration
*/
namespace Friendica\Core;
use Friendica\DI;
/**
- * @brief Arbitrary system configuration storage
+ * Arbitrary system configuration storage
*
* Note:
* If we ever would decide to return exactly the variable type as entered,
class Config
{
/**
- * @brief Loads all configuration values of family into a cached storage.
+ * Loads all configuration values of family into a cached storage.
*
* @param string $cat The category of the configuration value
*
}
/**
- * @brief Get a particular user's config variable given the category name
- * ($family) and a key.
+ * Get a particular user's config variable given the category name ($family) and a key.
*
* @param string $cat The category of the configuration value
* @param string $key The configuration key to query
}
/**
- * @brief Sets a configuration value for system config
- *
* Stores a config value ($value) in the category ($cat) under the key ($key)
*
* Note: Please do not store booleans - convert to 0/1 integer values!
}
/**
- * @brief Deletes the given key from the system configuration.
+ * Deletes the given key from the system configuration.
*
* @param string $cat The category of the configuration value
* @param string $key The configuration key to delete
{
/**
- * @brief Loads all configuration values of family into a cached storage.
+ * Loads all configuration values of family into a cached storage.
*
* All configuration values of the system are stored in the cache ( @see ConfigCache )
*
function load(string $cat = 'config');
/**
- * @brief Get a particular user's config variable given the category name
+ * Get a particular user's config variable given the category name
* ($cat) and a $key.
*
* Get a particular config value from the given category ($cat)
function get(string $cat, string $key, $default_value = null, bool $refresh = false);
/**
- * @brief Sets a configuration value for system config
+ * Sets a configuration value for system config
*
* Stores a config value ($value) in the category ($cat) under the key ($key)
*
function set(string $cat, string $key, $value);
/**
- * @brief Deletes the given key from the system configuration.
+ * Deletes the given key from the system configuration.
*
* Removes the configured value from the stored cache in $this->configCache
* (@see ConfigCache) and removes it from the database (@see IConfigAdapter).
}
/**
- * @brief Adds a new hook to the hooks array.
+ * Adds a new hook to the hooks array.
*
* This function is meant to be called by modules on each page load as it works after loadHooks has been called.
*
}
/**
- * @brief Registers a hook.
+ * Registers a hook.
*
* This function is meant to be called once when an addon is enabled for example as it doesn't add to the current hooks.
*
}
/**
- * @brief Forks a hook.
+ * Forks a hook.
*
* Use this function when you want to fork a hook via the worker.
*
}
/**
- * @brief Calls a hook.
+ * Calls a hook.
*
* Use this function when you want to be able to allow a hook to manipulate
* the provided data.
}
/**
- * @brief Calls a single hook.
+ * Calls a single hook.
*
* @param App $a
* @param string $name of the hook to call
}
/**
- * @brief Return the localized version of the provided string with optional string interpolation
+ * Return the localized version of the provided string with optional string interpolation
*
* This function takes a english string as parameter, and if a localized version
* exists for the current language, substitutes it before performing an eventual
}
/**
- * @brief Return the localized version of a singular/plural string with optional string interpolation
+ * Return the localized version of a singular/plural string with optional string interpolation
*
* This function takes two english strings as parameters, singular and plural, as
* well as a count. If a localized version exists for the current language, they
}
/**
- * @brief Return installed languages codes as associative array
+ * Return installed languages codes as associative array
*
* Scans the view/lang directory for the existence of "strings.php" files, and
* returns an alphabetical list of their folder names (@-char language codes).
}
/**
- * @brief Translate days and months names.
+ * Translate days and months names.
*
* @param string $s String with day or month name.
*
}
/**
- * @brief Translate short days and months names.
+ * Translate short days and months names.
*
* @param string $s String with short day or month name.
*
}
/**
- * @brief Returns the preferred language from the HTTP_ACCEPT_LANGUAGE header
+ * Returns the preferred language from the HTTP_ACCEPT_LANGUAGE header
*
* @param string $sysLang The default fallback language
* @param array $server The $_SERVER array
}
/**
- * @brief Return the localized version of the provided string with optional string interpolation
+ * Return the localized version of the provided string with optional string interpolation
*
* This function takes a english string as parameter, and if a localized version
* exists for the current language, substitutes it before performing an eventual
}
/**
- * @brief Return the localized version of a singular/plural string with optional string interpolation
+ * Return the localized version of a singular/plural string with optional string interpolation
*
* This function takes two english strings as parameters, singular and plural, as
* well as a count. If a localized version exists for the current language, they
use Psr\Log\LogLevel;
/**
- * @brief Logger functions
+ * Logger functions
*/
class Logger
{
self::getWorker()->debug($message, $context);
}
- /**
- * @brief Logs the given message at the given log level
+ /**
+ * Logs the given message at the given log level
*
* @param string $msg
* @param string $level
}
/**
- * @brief An alternative logger for development.
+ * An alternative logger for development.
+ *
* Works largely as log() but allows developers
* to isolate particular elements they are targetting
* personally without background noise
}
/**
- * @brief Checks if the maximum number of database processes is reached
+ * Checks if the maximum number of database processes is reached
*
* @return bool Is the limit reached?
*/
}
/**
- * @brief Checks if the minimal memory is reached
+ * Checks if the minimal memory is reached
*
* @return bool Is the memory limit reached?
*/
}
/**
- * @brief Checks if the maximum load is reached
+ * Checks if the maximum load is reached
*
* @return bool Is the load reached?
*/
use Friendica\Render\ITemplateEngine;
/**
- * @brief This class handles Renderer related functions.
+ * This class handles Renderer related functions.
*/
class Renderer
{
/**
- * @brief An array of registered template engines ('name'=>'class name')
+ * An array of registered template engines ('name'=>'class name')
*/
public static $template_engines = [];
/**
- * @brief An array of instanced template engines ('name'=>'instance')
+ * An array of instanced template engines ('name'=>'instance')
*/
public static $template_engine_instance = [];
/**
- * @brief An array for all theme-controllable parameters
+ * An array for all theme-controllable parameters
*
* Mostly unimplemented yet. Only options 'template_engine' and
* beyond are used.
];
/**
- * @brief This is our template processor
+ * This is our template processor
*
* @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
* @param array $vars Key value pairs (search => replace)
}
/**
- * @brief Load a given template $s
+ * Load a given template $s
*
* @param string $s Template to load.
* @param string $root Optional.
}
/**
- * @brief Register template engine class
+ * Register template engine class
*
* @param string $class
*/
}
/**
- * @brief Return template engine instance.
+ * Return template engine instance.
*
* If $name is not defined, return engine defined by theme,
* or default
}
/**
- * @brief Returns the active template engine.
+ * Returns the active template engine.
*
* @return string the active template engine
*/
/**
* Searching for global contacts for autocompletion
*
- * @brief Searching for global contacts for autocompletion
* @param string $search Name or part of a name or nick
* @param string $mode Search mode (e.g. "community")
* @param int $page Page number (starts at 1)
}
/**
- * @brief Standard PHP session write callback
+ * Standard PHP session write callback
*
* This callback updates the stored session data and/or the expiration depending
* on the case. Uses the Session::expire for existing session, 5 minutes
}
/**
- * @brief Standard PHP session write callback
+ * Standard PHP session write callback
*
* This callback updates the DB-stored session data and/or the expiration depending
* on the case. Uses the Session::expire global for existing session, 5 minutes
/**
- * @brief Manage storage backends
+ * Manage storage backends
*
* Core code uses this class to get and set current storage backend class.
* Addons use this class to register and unregister additional backends.
}
/**
- * @brief Return current storage backend class
+ * Return current storage backend class
*
* @return Storage\IStorage|null
*/
}
/**
- * @brief Return storage backend class by registered name
+ * Return storage backend class by registered name
*
* @param string|null $name Backend name
* @param boolean $onlyUserBackend True, if just user specific instances should be returrned (e.g. not SystemResource)
}
/**
- * @brief Set current storage backend class
+ * Set current storage backend class
*
* @param string $name Backend class name
*
}
/**
- * @brief Get registered backends
+ * Get registered backends
*
* @return array
*/
}
/**
- * @brief Unregister a storage backend class
+ * Unregister a storage backend class
*
* @param string $class Backend class name
*
}
/**
- * @brief Move up to 5000 resources to storage $dest
+ * Move up to 5000 resources to storage $dest
*
* Copy existing data to destination storage and delete from source.
* This method cannot move to legacy in-table `data` field.
/**
* @file include/Core/System.php
*
- * @brief Contains the class with system relevant stuff
+ * Contains the class with system relevant stuff
*/
/**
- * @brief System methods
+ * System methods
*/
class System
{
/**
- * @brief Returns a string with a callstack. Can be used for logging.
+ * Returns a string with a callstack. Can be used for logging.
* @param integer $depth optional, default 4
* @return string
*/
}
/**
- * @brief Send HTTP status header and exit.
+ * Send HTTP status header and exit.
*
* @param integer $val HTTP status result value
* @param string $message Error message. Optional.
}
/**
- * @brief Encodes content to json.
+ * Encodes content to json.
*
* This function encodes an array to json format
* and adds an application/json HTTP header to the output.
}
/**
- * @brief Returns the system user that is executing the script
+ * Returns the system user that is executing the script
*
* This mostly returns something like "www-data".
*
}
/**
- * @brief Checks if a given directory is usable for the system
+ * Checks if a given directory is usable for the system
*
* @param $directory
* @param bool $check_writable
}
/**
- * @brief Parse theme comment in search of theme infos.
+ * Parse theme comment in search of theme infos.
*
* like
* \code
}
/**
- * @brief Returns the theme's screenshot.
+ * Returns the theme's screenshot.
*
* The screenshot is expected as view/theme/$theme/screenshot.[png|jpg].
*
}
/**
- * @brief Get the full path to relevant theme files by filename
+ * Get the full path to relevant theme files by filename
*
* This function searches in order in the current theme directory, in the current theme parent directory, and lastly
* in the base view/ folder.
}
/**
- * @brief Return relative path to theme stylesheet file
+ * Return relative path to theme stylesheet file
*
* Provide a sane default if nothing is chosen or the specified theme does not exist.
*
const FAILED = 1;
/**
- * @brief Function to check if the Database structure needs an update.
+ * Function to check if the Database structure needs an update.
*
* @param string $basePath The base path of this application
* @param boolean $via_worker Is the check run via the worker?
use Friendica\Worker\Delivery;
/**
- * @brief UserImport class
+ * UserImport class
*/
class UserImport
{
}
/**
- * @brief Import account file exported from mod/uexport
+ * Import account file exported from mod/uexport
*
* @param array $file array from $_FILES
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
/**
* @file src/Core/Worker.php
*
- * @brief Contains the class for the worker background job processing
+ * Contains the class for the worker background job processing
*/
/**
- * @brief Worker methods
+ * Worker methods
*/
class Worker
{
private static $state;
/**
- * @brief Processes the tasks that are in the workerqueue table
+ * Processes the tasks that are in the workerqueue table
*
* @param boolean $run_cron Should the cron processes be executed?
* @return void
}
/**
- * @brief Check if non executed tasks do exist in the worker queue
+ * Check if non executed tasks do exist in the worker queue
*
* @return boolean Returns "true" if tasks are existing
* @throws \Exception
}
/**
- * @brief Returns the number of deferred entries in the worker queue
+ * Returns the number of deferred entries in the worker queue
*
* @return integer Number of deferred entries in the worker queue
* @throws \Exception
}
/**
- * @brief Returns the number of non executed entries in the worker queue
+ * Returns the number of non executed entries in the worker queue
*
* @return integer Number of non executed entries in the worker queue
* @throws \Exception
}
/**
- * @brief Returns the highest priority in the worker queue that isn't executed
+ * Returns the highest priority in the worker queue that isn't executed
*
* @return integer Number of active worker processes
* @throws \Exception
}
/**
- * @brief Returns if a process with the given priority is running
+ * Returns if a process with the given priority is running
*
* @param integer $priority The priority that should be checked
*
}
/**
- * @brief Execute a worker entry
+ * Execute a worker entry
*
* @param array $queue Workerqueue entry
*
}
/**
- * @brief Execute a function from the queue
+ * Execute a function from the queue
*
* @param array $queue Workerqueue entry
* @param string $funcname name of the function
}
/**
- * @brief Checks if the number of database connections has reached a critical limit.
+ * Checks if the number of database connections has reached a critical limit.
*
* @return bool Are more than 3/4 of the maximum connections used?
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief fix the queue entry if the worker process died
+ * fix the queue entry if the worker process died
* @return void
* @throws \Exception
*/
}
/**
- * @brief Checks if the number of active workers exceeds the given limits
+ * Checks if the number of active workers exceeds the given limits
*
* @return bool Are there too much workers running?
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Returns the number of active worker processes
+ * Returns the number of active worker processes
*
* @return integer Number of active worker processes
* @throws \Exception
}
/**
- * @brief Returns waiting jobs for the current process id
+ * Returns waiting jobs for the current process id
*
* @return array waiting workerqueue jobs
* @throws \Exception
}
/**
- * @brief Returns the next jobs that should be executed
+ * Returns the next jobs that should be executed
*
* @return array array with next jobs
* @throws \Exception
}
/**
- * @brief Returns the priority of the next workerqueue job
+ * Returns the priority of the next workerqueue job
*
* @return string priority
* @throws \Exception
}
/**
- * @brief Find and claim the next worker process for us
+ * Find and claim the next worker process for us
*
* @return boolean Have we found something?
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Returns the next worker process
+ * Returns the next worker process
*
* @return string SQL statement
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Removes a workerqueue entry from the current process
+ * Removes a workerqueue entry from the current process
* @return void
* @throws \Exception
*/
}
/**
- * @brief Call the front end worker
+ * Call the front end worker
* @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
}
/**
- * @brief Call the front end worker if there aren't any active
+ * Call the front end worker if there aren't any active
* @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
}
/**
- * @brief Removes long running worker processes
+ * Removes long running worker processes
* @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
}
/**
- * @brief Runs the cron processes
+ * Runs the cron processes
* @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
}
/**
- * @brief Spawns a new worker
+ * Spawns a new worker
* @param bool $do_cron
* @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Adds tasks to the worker queue
+ * Adds tasks to the worker queue
*
* @param (integer|array) priority or parameter array, strings are deprecated and are ignored
*
/**
* Log active processes into the "process" table
- *
- * @brief Log active processes into the "process" table
*/
public static function startProcess()
{
/**
* Remove the active process from the "process" table
*
- * @brief Remove the active process from the "process" table
* @return bool
* @throws \Exception
*/
/**
* Set the flag if some job is waiting
*
- * @brief Set the flag if some job is waiting
* @param boolean $jobs Is there a waiting job?
* @throws \Exception
*/
/**
* Checks if some worker job waits to be executed
*
- * @brief Checks if some worker job waits to be executed
* @return bool
* @throws \Exception
*/
*
* Please use DBA::selectFirst or DBA::exists whenever this is possible.
*
- * @brief Fetches the first row
* @param string $sql SQL statement
* @return array first row of query
* @throws \Exception
}
/**
- * Updates rows in the database. When $old_fields is set to an array,
+ * Updates rows in the database.
+ *
+ * When $old_fields is set to an array,
* the system will only do an update if the fields in that array changed.
*
* Attention:
* Only set $old_fields to a boolean value when you are sure that you will update a single row.
* When you set $old_fields to "true" then $fields must contain all relevant fields!
*
- * @brief Updates rows
* @param string|array $table Table name or array [schema => table]
* @param array $fields contains the fields that are updated
* @param array $condition condition array with the key values
require_once __DIR__ . '/../../include/dba.php';
/**
- * @brief This class contain functions for the database management
- *
* This class contains functions that doesn't need to know if pdo, mysqli or whatever is used.
*/
class DBStructure
}
/**
- * @brief Print out database error messages
+ * Print out database error messages
*
* @param string $message Message to be added to the error message
*
}
/**
- * @brief Returns the MySQL server version string
+ * Returns the MySQL server version string
*
* This function discriminate between the deprecated mysql API and the current
* object-oriented mysqli API. Example of returned string: 5.5.46-0+deb8u1
}
/**
- * @brief Returns the selected database name
+ * Returns the selected database name
*
* @return string
* @throws \Exception
}
/**
- * @brief Analyze a database query and log this if some conditions are met.
+ * Analyze a database query and log this if some conditions are met.
*
* @param string $query The database query that will be analyzed
*
}
/**
- * @brief Replaces ANY_VALUE() function by MIN() function,
- * if the database server does not support ANY_VALUE().
+ * Replaces ANY_VALUE() function by MIN() function,
+ * if the database server does not support ANY_VALUE().
*
* Considerations for Standard SQL, or MySQL with ONLY_FULL_GROUP_BY (default since 5.7.5).
* ANY_VALUE() is available from MySQL 5.7.5 https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html
}
/**
- * @brief Replaces the ? placeholders with the parameters in the $args array
+ * Replaces the ? placeholders with the parameters in the $args array
*
* @param string $sql SQL query
* @param array $args The parameters that are to replace the ? placeholders
}
/**
- * @brief Executes a prepared statement that returns data
+ * Executes a prepared statement that returns data
* @usage Example: $r = p("SELECT * FROM `item` WHERE `guid` = ?", $guid);
*
* Please only use it with complicated queries.
}
/**
- * @brief Executes a prepared statement like UPDATE or INSERT that doesn't return data
+ * Executes a prepared statement like UPDATE or INSERT that doesn't return data
*
* Please use DBA::delete, DBA::insert, DBA::update, ... instead
*
}
/**
- * @brief Check if data exists
+ * Check if data exists
*
* @param string|array $table Table name or array [schema => table]
* @param array $condition array of fields for condition
*
* Please use DBA::selectFirst or DBA::exists whenever this is possible.
*
- * @brief Fetches the first row
+ * Fetches the first row
*
* @param string $sql SQL statement
*
}
/**
- * @brief Returns the number of affected rows of the last statement
+ * Returns the number of affected rows of the last statement
*
* @return int Number of rows
*/
}
/**
- * @brief Returns the number of columns of a statement
+ * Returns the number of columns of a statement
*
* @param object Statement object
*
}
/**
- * @brief Returns the number of rows of a statement
+ * Returns the number of rows of a statement
*
* @param PDOStatement|mysqli_result|mysqli_stmt Statement object
*
}
/**
- * @brief Fetch a single row
+ * Fetch a single row
*
* @param mixed $stmt statement object
*
}
/**
- * @brief Insert a row into a table
+ * Insert a row into a table
*
* @param string|array $table Table name or array [schema => table]
* @param array $param parameter array
}
/**
- * @brief Fetch the id of the last insert command
+ * Fetch the id of the last insert command
*
* @return integer Last inserted id
*/
}
/**
- * @brief Locks a table for exclusive write access
+ * Locks a table for exclusive write access
*
* This function can be extended in the future to accept a table array as well.
*
}
/**
- * @brief Unlocks all locked tables
+ * Unlocks all locked tables
*
* @return boolean was the unlock successful?
* @throws \Exception
}
/**
- * @brief Starts a transaction
+ * Starts a transaction
*
* @return boolean Was the command executed successfully?
*/
}
/**
- * @brief Does a commit
+ * Does a commit
*
* @return boolean Was the command executed successfully?
*/
}
/**
- * @brief Does a rollback
+ * Does a rollback
*
* @return boolean Was the command executed successfully?
*/
}
/**
- * @brief Build the array with the table relations
+ * Build the array with the table relations
*
* The array is build from the database definitions in DBStructure.php
*
}
/**
- * @brief Delete a row from a table
+ * Delete a row from a table
*
* Note: this methods does NOT accept schema => table arrays because of the complex relation stuff.
*
}
/**
- * @brief Updates rows
+ * Updates rows
*
* Updates rows in the database. When $old_fields is set to an array,
* the system will only do an update if the fields in that array changed.
/**
* Retrieve a single record from a table and returns it in an associative array
*
- * @brief Retrieve a single record from a table
- *
* @param string|array $table
* @param array $fields
* @param array $condition
}
/**
- * @brief Select rows from a table and fills an array with the data
+ * Select rows from a table and fills an array with the data
*
* @param string|array $table Table name or array [schema => table]
* @param array $fields Array of selected fields, empty for all
}
/**
- * @brief Select rows from a table
+ * Select rows from a table
*
* @param string|array $table Table name or array [schema => table]
* @param array $fields Array of selected fields, empty for all
}
/**
- * @brief Counts the rows from a table satisfying the provided condition
+ * Counts the rows from a table satisfying the provided condition
*
* @param string|array $table Table name or array [schema => table]
* @param array $condition Array of fields for condition
}
/**
- * @brief Fills an array with data from a query
+ * Fills an array with data from a query
*
* @param object $stmt statement object
* @param bool $do_close
}
/**
- * @brief Returns the error number of the last query
+ * Returns the error number of the last query
*
* @return string Error number (0 if no error)
*/
}
/**
- * @brief Returns the error message of the last query
+ * Returns the error message of the last query
*
* @return string Error message ('' if no error)
*/
}
/**
- * @brief Closes the current statement
+ * Closes the current statement
*
* @param object $stmt statement object
*
}
/**
- * @brief Return a list of database processes
+ * Return a list of database processes
*
* @return array
* 'list' => List of processes, separated in their different states
}
/**
- * @brief Callback function for "esc_array"
+ * Callback function for "esc_array"
*
* @param mixed $value Array value
* @param string $key Array key
}
/**
- * @brief Escapes a whole array
+ * Escapes a whole array
*
* @param mixed $arr Array with values to be escaped
* @param boolean $add_quotation add quotation marks for string values
class PostUpdate
{
/**
- * @brief Calls the post update functions
+ * Calls the post update functions
*/
public static function update()
{
}
/**
- * @brief Updates the "global" field in the item table
+ * Updates the "global" field in the item table
*
* @return bool "true" when the job is done
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief update the "last-item" field in the "self" contact
+ * update the "last-item" field in the "self" contact
*
* This field avoids cost intensive calls in the admin panel and in "nodeinfo"
*
}
/**
- * @brief update the item related tables
+ * update the item related tables
*
* @return bool "true" when the job is done
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief update item-uri data. Prerequisite for the next item structure update.
+ * update item-uri data. Prerequisite for the next item structure update.
*
* @return bool "true" when the job is done
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief update user-item data with notifications
+ * update user-item data with notifications
*
* @return bool "true" when the job is done
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief This method tries to find the best - local - locking method for Friendica
+ * This method tries to find the best - local - locking method for Friendica
*
* The following sequence will be tried:
* 1. Semaphore Locking
/**
* @file src/Model/Attach.php
- * @brief This file contains the Attach class for database interface
+ * This file contains the Attach class for database interface
*/
namespace Friendica\Model;
{
/**
- * @brief Return a list of fields that are associated with the attach table
+ * Return a list of fields that are associated with the attach table
*
* @return array field list
* @throws \Exception
}
/**
- * @brief Select rows from the attach table and return them as array
+ * Select rows from the attach table and return them as array
*
* @param array $fields Array of selected fields, empty for all
* @param array $conditions Array of fields for conditions
}
/**
- * @brief Retrieve a single record from the attach table
+ * Retrieve a single record from the attach table
*
* @param array $fields Array of selected fields, empty for all
* @param array $conditions Array of fields for conditions
}
/**
- * @brief Check if attachment with given conditions exists
+ * Check if attachment with given conditions exists
*
* @param array $conditions Array of extra conditions
*
}
/**
- * @brief Retrive a single record given the ID
+ * Retrive a single record given the ID
*
* @param int $id Row id of the record
*
}
/**
- * @brief Retrive a single record given the ID
+ * Retrive a single record given the ID
*
* @param int $id Row id of the record
*
}
/**
- * @brief Get file data for given row id. null if row id does not exist
+ * Get file data for given row id. null if row id does not exist
*
* @param array $item Attachment data. Needs at least 'id', 'backend-class', 'backend-ref'
*
}
/**
- * @brief Store new file metadata in db and binary in default backend
+ * Store new file metadata in db and binary in default backend
*
* @param string $data Binary data
* @param integer $uid User ID
}
/**
- * @brief Store new file metadata in db and binary in default backend from existing file
+ * Store new file metadata in db and binary in default backend from existing file
*
* @param $src
* @param $uid
/**
- * @brief Update an attached file
+ * Update an attached file
*
* @param array $fields Contains the fields that are updated
* @param array $conditions Condition array with the key values
/**
- * @brief Delete info from table and data from storage
+ * Delete info from table and data from storage
*
* @param array $conditions Field condition(s)
* @param array $options Options array, Optional
use Friendica\Util\Strings;
/**
- * @brief functions for interacting with a contact
+ * functions for interacting with a contact
*/
class Contact
{
}
/**
- * @brief Tests if the given contact is a follower
+ * Tests if the given contact is a follower
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Tests if the given contact url is a follower
+ * Tests if the given contact url is a follower
*
* @param string $url Contact URL
* @param int $uid User ID
}
/**
- * @brief Tests if the given user follow the given contact
+ * Tests if the given user follow the given contact
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Tests if the given user follow the given contact url
+ * Tests if the given user follow the given contact url
*
* @param string $url Contact URL
* @param int $uid User ID
}
/**
- * @brief Get the basepath for a given contact link
+ * Get the basepath for a given contact link
*
* @param string $url The contact link
* @param boolean $dont_update Don't update the contact
}
/**
- * @brief Returns the contact id for the user and the public contact id for a given contact id
+ * Returns the contact id for the user and the public contact id for a given contact id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Block contact id for user id
+ * Block contact id for user id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Returns "block" state for contact id and user id
+ * Returns "block" state for contact id and user id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Ignore contact id for user id
+ * Ignore contact id for user id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Returns "ignore" state for contact id and user id
+ * Returns "ignore" state for contact id and user id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Set "collapsed" for contact id and user id
+ * Set "collapsed" for contact id and user id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Returns "collapsed" state for contact id and user id
+ * Returns "collapsed" state for contact id and user id
*
* @param int $cid Either public contact id or user's contact id
* @param int $uid User ID
}
/**
- * @brief Returns a list of contacts belonging in a group
+ * Returns a list of contacts belonging in a group
*
* @param int $gid
* @return array
}
/**
- * @brief Returns the count of OStatus contacts in a group
+ * Returns the count of OStatus contacts in a group
*
* @param int $gid
* @return int
}
/**
- * @brief Marks a contact for removal
+ * Marks a contact for removal
*
* @param int $id contact id
* @return null
}
/**
- * @brief Sends an unfriend message. Does not remove the contact
+ * Sends an unfriend message. Does not remove the contact
*
* @param array $user User unfriending
* @param array $contact Contact unfriended
}
/**
- * @brief Marks a contact for archival after a communication issue delay
+ * Marks a contact for archival after a communication issue delay
*
* Contact has refused to recognise us as a friend. We will start a countdown.
* If they still don't recognise us in 32 days, the relationship is over,
}
/**
- * @brief Cancels the archival countdown
+ * Cancels the archival countdown
*
* @see Contact::markForArchival()
*
}
/**
- * @brief Get contact data for a given profile link
+ * Get contact data for a given profile link
*
* The function looks at several places (contact table and gcontact table) for the contact
* It caches its result for the same script execution to prevent duplicate calls
}
/**
- * @brief Get contact data for a given address
+ * Get contact data for a given address
*
* The function looks at several places (contact table and gcontact table) for the contact
*
}
/**
- * @brief Returns the data array for the photo menu of a given contact
+ * Returns the data array for the photo menu of a given contact
*
* @param array $contact contact
* @param int $uid optional, default 0
}
/**
- * @brief Returns ungrouped contact count or list for user
+ * Returns ungrouped contact count or list for user
*
* Returns either the total number of ungrouped contacts for the given user
* id or a paginated list of ungrouped contacts.
}
/**
- * @brief Fetch the contact id for a given URL and user
+ * Fetch the contact id for a given URL and user
*
* First lookup in the contact table to find a record matching either `url`, `nurl`,
* `addr` or `alias`.
}
/**
- * @brief Checks if the contact is archived
+ * Checks if the contact is archived
*
* @param int $cid contact id
*
}
/**
- * @brief Checks if the contact is blocked
+ * Checks if the contact is blocked
*
* @param int $cid contact id
*
}
/**
- * @brief Checks if the contact is hidden
+ * Checks if the contact is hidden
*
* @param int $cid contact id
*
}
/**
- * @brief Returns posts from a given contact url
+ * Returns posts from a given contact url
*
* @param string $contact_url Contact URL
*
}
/**
- * @brief Returns the account type name
+ * Returns the account type name
*
* The function can be called with either the user or the contact array
*
}
/**
- * @brief Blocks a contact
+ * Blocks a contact
*
* @param int $cid
* @return bool
}
/**
- * @brief Unblocks a contact
+ * Unblocks a contact
*
* @param int $cid
* @return bool
}
/**
- * @brief Updates the avatar links in a contact only if needed
+ * Updates the avatar links in a contact only if needed
*
* @param string $avatar Link to avatar picture
* @param int $uid User id of contact owner
return $data;
}
- /**
- * @brief Helper function for "updateFromProbe". Updates personal and public contact
+ /**
+ * Helper function for "updateFromProbe". Updates personal and public contact
*
* @param integer $id contact id
* @param integer $uid user id
DBA::update('contact', $fields, $condition);
}
- /**
- * @brief Remove duplicated contacts
+ /**
+ * Remove duplicated contacts
*
* @param string $nurl Normalised contact url
* @param integer $uid User id
* $return['success'] boolean true if successful
* $return['message'] error text if success is false.
*
- * @brief Takes a $uid and a url/handle and adds a new contact
+ * Takes a $uid and a url/handle and adds a new contact
* @param int $uid
* @param string $url
* @param bool $interactive
}
/**
- * @brief Updated contact's SSL policy
+ * Updated contact's SSL policy
*
* @param array $contact Contact array
* @param string $new_policy New policy, valid: self,full
}
/**
- * @brief Create a birthday event.
+ * Create a birthday event.
*
* Update the year and the birthday.
*/
}
/**
- * @brief Returns a magic link to authenticate remote visitors
+ * Returns a magic link to authenticate remote visitors
*
* @todo check if the return is either a fully qualified URL or a relative path to Friendica basedir
*
}
/**
- * @brief Returns a magic link to authenticate remote visitors
+ * Returns a magic link to authenticate remote visitors
*
* @param integer $cid The contact id of the target contact profile
* @param string $url An url that we will be redirected to after the authentication
}
/**
- * @brief Returns a magic link to authenticate remote visitors
+ * Returns a magic link to authenticate remote visitors
*
* @param array $contact The contact array with "uid", "network" and "url"
* @param string $url An url that we will be redirected to after the authentication
}
/**
- * @brief Store the conversation data
+ * Store the conversation data
*
* @param array $arr Item array with conversation data
* @return array Item array with removed conversation data
use Friendica\Util\XML;
/**
- * @brief functions for interacting with the event database table
+ * functions for interacting with the event database table
*/
class Event
{
}
/**
- * @brief Convert an array with event data to bbcode.
+ * Convert an array with event data to bbcode.
*
* @param array $event Array which contains the event data.
* @return string The event as a bbcode formatted string.
}
/**
- * @brief Extract bbcode formatted event data from a string.
+ * Extract bbcode formatted event data from a string.
*
* @params: string $s The string which should be parsed for event data.
* @param $text
}
/**
- * @brief Delete an event from the event table.
+ * Delete an event from the event table.
*
* Note: This function does only delete the event from the event table not its
* related entry in the item table.
}
/**
- * @brief Store the event.
+ * Store the event.
*
* Store the event in the event table and create an event item in the item table.
*
}
/**
- * @brief Create an array with translation strings used for events.
+ * Create an array with translation strings used for events.
*
* @return array Array with translations strings.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Removes duplicated birthday events.
+ * Removes duplicated birthday events.
*
* @param array $dates Array of possibly duplicated events.
* @return array Cleaned events.
}
/**
- * @brief Get an event by its event ID.
+ * Get an event by its event ID.
*
* @param int $owner_uid The User ID of the owner of the event
* @param int $event_id The ID of the event in the event table
}
/**
- * @brief Get all events in a specific time frame.
+ * Get all events in a specific time frame.
*
* @param int $owner_uid The User ID of the owner of the events.
* @param array $event_params An associative array with
}
/**
- * @brief Convert an array query results in an array which could be used by the events template.
+ * Convert an array query results in an array which could be used by the events template.
*
* @param array $event_result Event query array.
* @return array Event array for the template.
}
/**
- * @brief Format event to export format (ical/csv).
+ * Format event to export format (ical/csv).
*
* @param array $events Query result for events.
* @param string $format The output format (ical/csv).
}
/**
- * @brief Get all events for a user ID.
+ * Get all events for a user ID.
*
* The query for events is done permission sensitive.
* If the user is the owner of the calendar they
}
/**
- * @brief Format an item array with event data to HTML.
+ * Format an item array with event data to HTML.
*
* @param array $item Array with item and event data.
* @return string HTML output.
}
/**
- * @brief Format a string with map bbcode to an array with location data.
+ * Format a string with map bbcode to an array with location data.
*
* Note: The string must only contain location data. A string with no bbcode will be
* handled as location name.
}
/**
- * @brief Add new birthday event for this person
+ * Add new birthday event for this person
*
* @param array $contact Contact array, expects: id, uid, url, name
* @param string $birthday Birthday of the contact
use Friendica\DI;
/**
- * @brief This class handles FileTag related functions
+ * This class handles FileTag related functions
*
* post categories and "save to file" use the same item.file table for storage.
* We will differentiate the different uses by wrapping categories in angle brackets
class FileTag
{
/**
- * @brief URL encode <, >, left and right brackets
+ * URL encode <, >, left and right brackets
*
* @param string $s String to be URL encoded.
*
}
/**
- * @brief URL decode <, >, left and right brackets
+ * URL decode <, >, left and right brackets
*
* @param string $s The URL encoded string to be decoded
*
}
/**
- * @brief Query files for tag
+ * Query files for tag
*
* @param string $table The table to be queired.
* @param string $s The search term
}
/**
- * @brief Get file tags from list
+ * Get file tags from list
*
* ex. given music,video return <music><video> or [music][video]
* @param string $list A comma delimited list of tags.
}
/**
- * @brief Get list from file tags
+ * Get list from file tags
*
* ex. given <music><video>[friends], return music,video or friends
* @param string $file File tags
}
/**
- * @brief Update file tags in PConfig
+ * Update file tags in PConfig
*
* @param int $uid Unique Identity.
* @param string $file_old Categories previously associated with an item
}
/**
- * @brief Add tag to file
+ * Add tag to file
*
* @param int $uid Unique identity.
* @param int $item_id Item identity.
}
/**
- * @brief Remove tag from file
+ * Remove tag from file
*
* @param int $uid Unique identity.
* @param int $item_id Item identity.
<?php
/**
* @file src/Model/GlobalContact.php
- * @brief This file includes the GlobalContact class with directory related functions
+ * This file includes the GlobalContact class with directory related functions
*/
namespace Friendica\Model;
use Friendica\Util\Strings;
/**
- * @brief This class handles GlobalContact related functions
+ * This class handles GlobalContact related functions
*/
class GContact
{
/**
- * @brief Search global contact table by nick or name
+ * Search global contact table by nick or name
*
* @param string $search Name or nick
* @param string $mode Search mode (e.g. "community")
}
/**
- * @brief Link the gcontact entry with user, contact and global contact
+ * Link the gcontact entry with user, contact and global contact
*
* @param integer $gcid Global contact ID
* @param integer $uid User ID
}
/**
- * @brief Sanitize the given gcontact data
+ * Sanitize the given gcontact data
*
* Generation:
* 0: No definition
}
/**
- * @brief Removes unwanted parts from a contact url
+ * Removes unwanted parts from a contact url
*
* @param string $url Contact url
*
}
/**
- * @brief Fetch the gcontact id, add an entry if not existed
+ * Fetch the gcontact id, add an entry if not existed
*
* @param array $contact contact array
*
}
/**
- * @brief Updates the gcontact table from a given array
+ * Updates the gcontact table from a given array
*
* @param array $contact contact array
*
DBA::update('gcontact', $fields, ['nurl' => Strings::normaliseLink($data['url'])]);
}
/**
- * @brief Updates the gcontact entry from a given public contact id
+ * Updates the gcontact entry from a given public contact id
*
* @param integer $cid contact id
* @return void
}
/**
- * @brief Updates the gcontact entry from a given public contact url
+ * Updates the gcontact entry from a given public contact url
*
* @param string $url contact url
* @return integer gcontact id
}
/**
- * @brief Helper function for updateFromPublicContactID and updateFromPublicContactURL
+ * Helper function for updateFromPublicContactID and updateFromPublicContactURL
*
* @param array $condition contact condition
* @return integer gcontact id
}
/**
- * @brief Updates the gcontact entry from probe
+ * Updates the gcontact entry from probe
*
* @param string $url profile link
* @param boolean $force Optional forcing of network probing (otherwise we use the cached data)
}
/**
- * @brief Update the gcontact entry for a given user id
+ * Update the gcontact entry for a given user id
*
* @param int $uid User ID
* @return bool
}
/**
- * @brief Get the basepath for a given contact link
+ * Get the basepath for a given contact link
*
* @param string $url The gcontact link
* @param boolean $dont_update Don't update the contact
}
/**
- * @brief Fetches users of given GNU Social server
+ * Fetches users of given GNU Social server
*
* If the "Statistics" addon is enabled (See http://gstools.org/ for details) we query user data with this.
*
}
/**
- * @brief Asking GNU Social server on a regular base for their user data
+ * Asking GNU Social server on a regular base for their user data
* @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
use Friendica\Database\DBA;
/**
- * @brief functions for interacting with the group database table
+ * functions for interacting with the group database table
*/
class Group
{
}
/**
- * @brief Create a new contact group
+ * Create a new contact group
*
* Note: If we found a deleted group with the same name, we restore it
*
}
/**
- * @brief Get a list of group ids a contact belongs to
+ * Get a list of group ids a contact belongs to
*
* @param int $cid
* @return array
}
/**
- * @brief count unread group items
+ * count unread group items
*
* Count unread items of each groups of the local user
*
}
/**
- * @brief Get the group id for a user/name couple
+ * Get the group id for a user/name couple
*
* Returns false if no group has been found.
*
}
/**
- * @brief Mark a group as deleted
+ * Mark a group as deleted
*
* @param int $gid
* @return boolean
}
/**
- * @brief Mark a group as deleted based on its name
+ * Mark a group as deleted based on its name
*
* @param int $uid
* @param string $name
}
/**
- * @brief Adds a contact to a group
+ * Adds a contact to a group
*
* @param int $gid
* @param int $cid
}
/**
- * @brief Removes a contact from a group
+ * Removes a contact from a group
*
* @param int $gid
* @param int $cid
}
/**
- * @brief Removes a contact from a group based on its name
+ * Removes a contact from a group based on its name
*
* @param int $uid
* @param string $name
}
/**
- * @brief Returns the combined list of contact ids from a group id list
+ * Returns the combined list of contact ids from a group id list
*
* @param int $uid
* @param array $group_ids
}
/**
- * @brief Returns a templated group selection list
+ * Returns a templated group selection list
*
* @param int $uid
* @param int $gid An optional pre-selected group
}
/**
- * @brief Create group sidebar widget
+ * Create group sidebar widget
*
* @param string $every
* @param string $each
}
/**
- * @brief Select pinned rows from the item table for a given user
+ * Select pinned rows from the item table for a given user
*
* @param integer $uid User ID
* @param array $selected Array of selected fields, empty for all
}
/**
- * @brief returns an activity index from an activity string
+ * returns an activity index from an activity string
*
* @param string $activity activity string
* @return integer Activity index
}
/**
- * @brief returns an activity string from an activity index
+ * returns an activity string from an activity index
*
* @param integer $index activity index
* @return string Activity string
}
/**
- * @brief Fetch a single item row
+ * Fetch a single item row
*
* @param mixed $stmt statement object
* @return array current row
}
/**
- * @brief Fills an array with data from an item query
+ * Fills an array with data from an item query
*
* @param object $stmt statement object
* @param bool $do_close
}
/**
- * @brief Check if item data exists
+ * Check if item data exists
*
* @param array $condition array of fields for condition
*
/**
* Retrieve a single record from the item table for a given user and returns it in an associative array
*
- * @brief Retrieve a single record from a table
* @param integer $uid User ID
* @param array $selected
* @param array $condition
}
/**
- * @brief Select rows from the item table for a given user
+ * Select rows from the item table for a given user
*
* @param integer $uid User ID
* @param array $selected Array of selected fields, empty for all
/**
* Retrieve a single record from the item table and returns it in an associative array
*
- * @brief Retrieve a single record from a table
* @param array $fields
* @param array $condition
* @param array $params
}
/**
- * @brief Select rows from the item table and returns them as an array
+ * Select rows from the item table and returns them as an array
*
* @param array $selected Array of selected fields, empty for all
* @param array $condition Array of fields for condition
}
/**
- * @brief Select rows from the item table
+ * Select rows from the item table
*
* @param array $selected Array of selected fields, empty for all
* @param array $condition Array of fields for condition
}
/**
- * @brief Select rows from the starting post in the item table
+ * Select rows from the starting post in the item table
*
* @param integer $uid User ID
* @param array $selected
/**
* Retrieve a single record from the starting post in the item table and returns it in an associative array
*
- * @brief Retrieve a single record from a table
* @param integer $uid User ID
* @param array $selected
* @param array $condition
/**
* Retrieve a single record from the starting post in the item table and returns it in an associative array
*
- * @brief Retrieve a single record from a table
* @param array $fields
* @param array $condition
* @param array $params
}
/**
- * @brief Select rows from the starting post in the item table
+ * Select rows from the starting post in the item table
*
* @param array $selected Array of selected fields, empty for all
* @param array $condition Array of fields for condition
}
/**
- * @brief Returns a list of fields that are associated with the item table
+ * Returns a list of fields that are associated with the item table
*
* @param $usermode
* @return array field list
}
/**
- * @brief Returns SQL condition for the "select" functions
+ * Returns SQL condition for the "select" functions
*
* @param boolean $thread_mode Called for the items (false) or for the threads (true)
*
}
/**
- * @brief Returns all needed "JOIN" commands for the "select" functions
+ * Returns all needed "JOIN" commands for the "select" functions
*
* @param integer $uid User ID
* @param string $sql_commands The parts of the built SQL commands in the "select" functions
}
/**
- * @brief Add the field list for the "select" functions
+ * Add the field list for the "select" functions
*
* @param array $fields The field definition array
* @param array $selected The array with the selected fields from the "select" functions
}
/**
- * @brief add table definition to fields in an SQL query
+ * add table definition to fields in an SQL query
*
* @param string $query SQL query
* @param array $fields The field definition array
}
/**
- * @brief Update existing item entries
+ * Update existing item entries
*
* @param array $fields The fields that are to be changed
* @param array $condition The condition for finding the item entries
}
/**
- * @brief Delete an item and notify others about it - if it was ours
+ * Delete an item and notify others about it - if it was ours
*
* @param array $condition The condition for finding the item entries
* @param integer $priority Priority for the notification
}
/**
- * @brief Delete an item for an user and notify others about it - if it was ours
+ * Delete an item for an user and notify others about it - if it was ours
*
* @param array $condition The condition for finding the item entries
* @param integer $uid User who wants to delete this item
}
/**
- * @brief Delete an item and notify others about it - if it was ours
+ * Delete an item and notify others about it - if it was ours
*
* @param integer $item_id Item ID that should be delete
* @param integer $priority Priority for the notification
}
/**
- * @brief Insert a new item content entry
+ * Insert a new item content entry
*
* @param array $item The item fields that are to be inserted
* @return bool
}
/**
- * @brief Insert a new item content entry
+ * Insert a new item content entry
*
* @param array $item The item fields that are to be inserted
* @throws \Exception
}
/**
- * @brief Update existing item content entries
+ * Update existing item content entries
*
* @param array $item The item fields that are to be changed
* @param array $condition The condition for finding the item content entries
}
/**
- * @brief Update existing item content entries
+ * Update existing item content entries
*
* @param array $item The item fields that are to be changed
* @param array $condition The condition for finding the item content entries
}
/**
- * @brief Distributes public items to the receivers
+ * Distributes public items to the receivers
*
* @param integer $itemid Item ID that should be added
* @param string $signed_text Original text (for Diaspora signatures), JSON encoded.
}
/**
- * @brief Store public items for the receivers
+ * Store public items for the receivers
*
* @param integer $itemid Item ID that should be added
* @param array $item The item entry that will be stored
}
/**
- * @brief Add a shadow entry for a given item id that is a thread starter
+ * Add a shadow entry for a given item id that is a thread starter
*
* We store every public item entry additionally with the user id "0".
* This is used for the community page and for the search.
}
/**
- * @brief Add a shadow entry for a given item id that is a comment
+ * Add a shadow entry for a given item id that is a comment
*
* This function does the same like the function above - but for comments
*
}
/**
- * @brief Creates an unique guid out of a given uri
+ * Creates an unique guid out of a given uri
*
* @param string $uri uri of an item entry
* @param string $host hostname for the GUID prefix
}
/**
- * @brief Set "success_update" and "last-item" to the date of the last time we heard from this contact
+ * Set "success_update" and "last-item" to the date of the last time we heard from this contact
*
* This can be used to filter for inactive contacts.
* Only do this for public postings to avoid privacy problems, since poco data is public.
}
/**
- * @brief add/remove activity to an item
+ * add/remove activity to an item
*
* Toggle activities as like,dislike,attend of an item
*
}
/**
- * @brief Find any non-embedded images in private items and add redir links to them
+ * Find any non-embedded images in private items and add redir links to them
*
* @param array &$item The field array of an item row
*/
}
/**
- * @brief Given an item array, convert the body element from bbcode to html and add smilie icons.
+ * Given an item array, convert the body element from bbcode to html and add smilie icons.
* If attach is true, also add icons for item attachments.
*
* @param array $item
class ItemContent
{
/**
- * @brief Convert a message into plaintext for connectors to other networks
+ * Convert a message into plaintext for connectors to other networks
*
* @param array $item The message array that is about to be posted
* @param int $limit The maximum number of characters when posting to that network
class ItemURI
{
/**
- * @brief Insert an item-uri record and return its id
+ * Insert an item-uri record and return its id
*
* @param array $fields Item-uri fields
*
}
/**
- * @brief Searched for an id of a given uri. Adds it, if not existing yet.
+ * Searched for an id of a given uri. Adds it, if not existing yet.
*
* @param string $uri
*
use Friendica\Network\HTTPException;
/**
- * @brief Methods for read and write notifications from/to database
+ * Methods for read and write notifications from/to database
* or for formatting notifications
*/
final class Notify
}
/**
- * @brief set seen state of $note of local_user()
+ * set seen state of $note of local_user()
*
* @param array $note note array
* @param bool $seen optional true or false, default true
}
/**
- * @brief List of pages for the Notifications TabBar
+ * List of pages for the Notifications TabBar
*
* @return array with with notifications TabBar data
* @throws Exception
}
/**
- * @brief Get home notifications
+ * Get home notifications
*
* @param bool $seen False => only include notifications into the query
* which aren't marked as "seen"
}
/**
- * @brief Get introductions
+ * Get introductions
*
* @param bool $all If false only include introductions into the query
* which aren't marked as ignored
}
/**
- * @brief Format the notification query in an usable array
+ * Format the notification query in an usable array
*
* @param array $intros The array from the db query
*
}
/**
- * @brief Check for missing contact data and try to fetch the data from
- * from other sources
+ * Check for missing contact data and try to fetch the data from
+ * from other sources
*
* @param array $intro The input array with the intro data
*
use Friendica\Database\DBA;
/**
- * @brief functions for interacting with the permission set of an object (item, photo, event, ...)
+ * functions for interacting with the permission set of an object (item, photo, event, ...)
*/
class PermissionSet
{
}
/**
- * @brief Returns a permission set for a given contact
+ * Returns a permission set for a given contact
*
* @param integer $uid User id whom the items belong
* @param integer $contact_id Contact id of the visitor
/**
* @file src/Model/Photo.php
- * @brief This file contains the Photo class for database interface
+ * This file contains the Photo class for database interface
*/
namespace Friendica\Model;
class Photo
{
/**
- * @brief Select rows from the photo table and returns them as array
+ * Select rows from the photo table and returns them as array
*
* @param array $fields Array of selected fields, empty for all
* @param array $conditions Array of fields for conditions
}
/**
- * @brief Retrieve a single record from the photo table
+ * Retrieve a single record from the photo table
*
* @param array $fields Array of selected fields, empty for all
* @param array $conditions Array of fields for conditions
}
/**
- * @brief Get photos for user id
+ * Get photos for user id
*
* @param integer $uid User id
* @param string $resourceid Rescource ID of the photo
}
/**
- * @brief Get a photo for user id
+ * Get a photo for user id
*
* @param integer $uid User id
* @param string $resourceid Rescource ID of the photo
}
/**
- * @brief Get a single photo given resource id and scale
+ * Get a single photo given resource id and scale
*
* This method checks for permissions. Returns associative array
* on success, "no sign" image info, if user has no permission,
}
/**
- * @brief Check if photo with given conditions exists
+ * Check if photo with given conditions exists
*
* @param array $conditions Array of extra conditions
*
/**
- * @brief Get Image object for given row id. null if row id does not exist
+ * Get Image object for given row id. null if row id does not exist
*
* @param array $photo Photo data. Needs at least 'id', 'type', 'backend-class', 'backend-ref'
*
}
/**
- * @brief Return a list of fields that are associated with the photo table
+ * Return a list of fields that are associated with the photo table
*
* @return array field list
* @throws \Exception
}
/**
- * @brief Construct a photo array for a system resource image
+ * Construct a photo array for a system resource image
*
* @param string $filename Image file name relative to code root
* @param string $mimetype Image mime type. Defaults to "image/jpeg"
/**
- * @brief store photo metadata in db and binary in default backend
+ * store photo metadata in db and binary in default backend
*
* @param Image $Image Image object with data
* @param integer $uid User ID
/**
- * @brief Delete info from table and data from storage
+ * Delete info from table and data from storage
*
* @param array $conditions Field condition(s)
* @param array $options Options array, Optional
}
/**
- * @brief Update a photo
+ * Update a photo
*
* @param array $fields Contains the fields that are updated
* @param array $conditions Condition array with the key values
}
/**
- * @brief Fetch the photo albums that are available for a viewer
+ * Fetch the photo albums that are available for a viewer
*
* The query in this function is cost intensive, so it is cached.
*
use Friendica\Util\DateTimeFormat;
/**
- * @brief functions for interacting with a process
+ * functions for interacting with a process
*/
class Process
{
class Profile
{
/**
- * @brief Returns default profile for a given user id
+ * Returns default profile for a given user id
*
* @param integer User ID
*
}
/**
- * @brief Returns default profile for a given user ID and ID
+ * Returns default profile for a given user ID and ID
*
* @param int $uid The contact ID
* @param int $id The contact owner ID
}
/**
- * @brief Returns profile data for the contact owner
+ * Returns profile data for the contact owner
*
* @param int $uid The User ID
* @param array $fields The fields to retrieve
}
/**
- * @brief Returns a formatted location string from the given profile array
+ * Returns a formatted location string from the given profile array
*
* @param array $profile Profile array (Generated from the "profile" table)
*
}
/**
- *
* Loads a profile into the page sidebar.
*
* The function requires a writeable copy of the main App structure, and the nickname
* the theme is chosen before the _init() function of a theme is run, which will usually
* load a lot of theme-specific content
*
- * @brief Loads a profile into the page sidebar.
* @param App $a
* @param string $nickname string
* @param int $profile int
*
* Includes all available profile data
*
- * @brief Get all profile data of a local user
* @param string $nickname nick
* @param int $uid uid
* @param int $profile_id ID of the profile
* It is very difficult to templatise the HTML completely
* because of all the conditional logic.
*
- * @brief Formats a profile for display in the sidebar.
* @param array $profile
* @param int $block
* @param boolean $show_connect Show connect link
* system pconfig, which means they don't want to see anybody else's theme
* settings except their own while on this site.
*
- * @brief Get the user ID of the page owner
* @return int user ID
*
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
class PushSubscriber
{
/**
- * @brief Send subscription notifications for the given user
+ * Send subscription notifications for the given user
*
* @param integer $uid User ID
* @param int $default_priority
}
/**
- * @brief start workers to transmit the feed data
+ * start workers to transmit the feed data
*
* @param int $default_priority
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Renew the feed subscription
+ * Renew the feed subscription
*
* @param integer $uid User ID
* @param string $nick Priority for push workers
}
/**
- * @brief Delay the push subscriber
+ * Delay the push subscriber
*
* @param integer $id Subscriber ID
* @throws \Exception
}
/**
- * @brief Reset the push subscriber
+ * Reset the push subscriber
*
* @param integer $id Subscriber ID
* @param string $last_update Date of last transmitted item
<?php
/**
* @file src/Model/Storage/Filesystem.php
- * @brief Storage backend system
+ * Storage backend system
*/
namespace Friendica\Model\Storage;
use Friendica\Database\Database as DBA;
/**
- * @brief Database based storage system
+ * Database based storage system
*
* This class manage data stored in database table.
*/
<?php
/**
* @file src/Model/Storage/Filesystem.php
- * @brief Storage backend system
+ * Storage backend system
*/
namespace Friendica\Model\Storage;
use Psr\Log\LoggerInterface;
/**
- * @brief Filesystem based storage backend
+ * Filesystem based storage backend
*
* This class manage data on filesystem.
* Base folder for storage is set in storage.filesystem_path.
}
/**
- * @brief Split data ref and return file path
+ * Split data ref and return file path
*
* @param string $reference Data reference
*
/**
- * @brief Create dirctory tree to store file, with .htaccess and index.html files
+ * Create dirctory tree to store file, with .htaccess and index.html files
*
* @param string $file Path and filename
*
<?php
/**
* @file src/Model/Storage/IStorage.php
- * @brief Storage backend system
+ * Storage backend system
*/
namespace Friendica\Model\Storage;
/**
- * @brief Interface for storage backends
+ * Interface for storage backends
*/
interface IStorage
{
/**
- * @brief Get data from backend
+ * Get data from backend
*
* @param string $reference Data reference
*
public function get(string $reference);
/**
- * @brief Put data in backend as $ref. If $ref is not defined a new reference is created.
+ * Put data in backend as $ref. If $ref is not defined a new reference is created.
*
* @param string $data Data to save
* @param string $reference Data reference. Optional.
public function put(string $data, string $reference = "");
/**
- * @brief Remove data from backend
+ * Remove data from backend
*
* @param string $reference Data reference
*
public function delete(string $reference);
/**
- * @brief Get info about storage options
+ * Get info about storage options
*
* @return array
*
public function getOptions();
/**
- * @brief Validate and save options
+ * Validate and save options
*
* @param array $data Array [optionname => value] to be saved
*
<?php
/**
* @file src/Model/Storage/StorageException.php
- * @brief Storage backend system
+ * Storage backend system
*/
namespace Friendica\Model\Storage;
/**
- * @brief Storage Exception
+ * Storage Exception
*/
class StorageException extends \Exception
{
<?php
/**
* @file src/Model/Storage/SystemStorage.php
- * @brief Storage backend system
+ * Storage backend system
*/
namespace Friendica\Model\Storage;
use \BadMethodCallException;
/**
- * @brief System resource storage class
+ * System resource storage class
*
* This class is used to load system resources, like images.
* Is not intended to be selectable by admins as default storage class.
/**
* @file src/Model/User.php
- * @brief This file includes the User class with user related database functions
+ * This file includes the User class with user related database functions
*/
namespace Friendica\Model;
use LightOpenID;
/**
- * @brief This class handles User related functions
+ * This class handles User related functions
*/
class User
{
}
/**
- * @brief Returns the user id of a given profile URL
+ * Returns the user id of a given profile URL
*
* @param string $url
*
}
/**
- * @brief Get owner data by user id
+ * Get owner data by user id
*
* @param int $uid
* @param boolean $check_valid Test if data is invalid and correct it
}
/**
- * @brief Get owner data by nick name
+ * Get owner data by nick name
*
* @param int $nick
* @return boolean|array
}
/**
- * @brief Returns the default group for a given user and network
+ * Returns the default group for a given user and network
*
* @param int $uid User id
* @param string $network network name
/**
* Authenticate a user with a clear text password
*
- * @brief Authenticate a user with a clear text password
* @param mixed $user_info
* @param string $password
* @param bool $third_party
}
/**
+ * Authenticate a user with a clear text password
+ *
* Returns the user id associated with a successful password authentication
*
- * @brief Authenticate a user with a clear text password
* @param mixed $user_info
* @param string $password
* @param bool $third_party
}
/**
- * @brief Checks if a nickname is in the list of the forbidden nicknames
+ * Checks if a nickname is in the list of the forbidden nicknames
*
* Check if a nickname is forbidden from registration on the node by the
* admin. Forbidden nicknames (e.g. role namess) can be configured in the
}
/**
- * @brief Catch-all user creation function
+ * Catch-all user creation function
*
* Creates a user from the provided data array, either form fields or OpenID.
* Required: { username, nickname, email } or { openid_url }
}
/**
- * @brief Sends pending registration confirmation email
+ * Sends pending registration confirmation email
*
* @param array $user User record array
* @param string $sitename
}
/**
- * @brief Sends registration confirmation
+ * Sends registration confirmation
*
* It's here as a function because the mail is sent from different parts
*
use Friendica\Util\DateTimeFormat;
/**
- * @brief Admin Inspect Queue Page
+ * Admin Inspect Queue Page
*
* Generates a page for the admin to have a look into the current queue of
* worker jobs. Shown are the parameters for the job and its priority.
use Friendica\Model\Attach as MAttach;
/**
- * @brief Attach Module
+ * Attach Module
*/
class Attach extends BaseModule
{
/**
- * @brief Return to user an attached file given the id
+ * Return to user an attached file given the id
*/
public static function rawContent(array $parameters = [])
{
/**
* Log in user via OAuth1 or Simple HTTP Auth.
- * Simple Auth allow username in form of <pre>user@server</pre>, ignoring server part
*
- * @brief Login API user
+ * Simple Auth allow username in form of <pre>user@server</pre>, ignoring server part
*
* @return bool Was a user authenticated?
* @throws HTTPException\ForbiddenException
}
/**
- * @brief Get user info array.
+ * Get user info array.
*
* @param int|string $contact_id Contact ID or URL
* @return array|bool
/**
* Manages and show Contacts and their content
- *
- * @brief manages contacts
*/
class Contact extends BaseModule
{
}
/**
- * @brief List of pages for the Contact TabBar
+ * List of pages for the Contact TabBar
*
* Available Pages are 'Status', 'Profile', 'Contacts' and 'Common Friends'
*
}
/**
- * @brief Gives a array with actions which can performed to a given contact
+ * Gives a array with actions which can performed to a given contact
*
* This includes actions like e.g. 'block', 'hide', 'archive', 'delete' and others
*
*
* The nocache GET parameter is provided mainly for debug purposes, requires auth
*
- * @brief Provides public Atom feeds
- *
* @author Hypolite Petovan <hypolite@mrpetovan.com>
*/
class Feed extends BaseModule
use Friendica\Util\Strings;
/**
- * @brief OpenWebAuth verifier and token generator
+ * OpenWebAuth verifier and token generator
*
* See https://macgirvin.com/wiki/mike/OpenWebAuth/Home
* Requests to this endpoint should be signed using HTTP Signatures
use Friendica\Object\Image;
/**
- * @brief Photo Module
+ * Photo Module
*/
class Photo extends BaseModule
{
/**
- * @brief Module initializer
+ * Module initializer
*
* Fetch a photo or an avatar, in optional size, check for permissions and
* return the image
<?php
/**
* @file src/Module/Proxy.php
- * @brief Based upon "Privacy Image Cache" by Tobias Hößl <https://github.com/CatoTH/>
+ * Based upon "Privacy Image Cache" by Tobias Hößl <https://github.com/CatoTH/>
*/
namespace Friendica\Module;
use Friendica\Util\Proxy as ProxyUtils;
/**
- * @brief Module Proxy
+ * Module Proxy
*
* urls:
* /proxy/[sub1/[sub2/]]<base64url image url>[.ext][:size]
{
/**
- * @brief Initializer method for this class.
+ * Initializer method for this class.
*
* Sets application instance and checks if /proxy/ path is writable.
*
/**
- * @brief Build info about requested image to be proxied
+ * Build info about requested image to be proxied
*
* @return array
* [
/**
- * @brief setup ./proxy folder for direct cache
+ * setup ./proxy folder for direct cache
*
* @return bool False if direct cache can't be used.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
/**
- * @brief Try to reply with image in cachefile
+ * Try to reply with image in cachefile
*
* @param array $request Array from getRequestInfo
*
}
/**
- * @brief Try to reply with image in database
+ * Try to reply with image in database
*
* @param array $request Array from getRequestInfo
*
}
/**
- * @brief Output the image with cache headers
+ * Output the image with cache headers
*
* @param Image $img
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
const OPEN = 2;
/**
- * @brief Module GET method to display any content
+ * Module GET method to display any content
*
* Extend this method if the module is supposed to return any display
* through a GET request. It can be an HTML page through templating or a
}
/**
- * @brief Module POST method to process submitted data
+ * Module POST method to process submitted data
*
* Extend this method if the module is supposed to process POST requests.
* Doesn't display any content
}
/**
- * @brief Wrapper for adding a login box.
+ * Wrapper for adding a login box.
*
* @param string $return_path The path relative to the base the user should be sent
* back to after login completes
class Logout extends BaseModule
{
/**
- * @brief Process logout requests
+ * Process logout requests
*/
public static function init(array $parameters = [])
{
public $privacy_complete;
/**
- * @brief constructor for the module, initializing the text variables
+ * constructor for the module, initializing the text variables
*
* To make the text variables available outside of the module, they need to
* be properties of the class, however cannot be set directly as the property
}
/**
- * @brief initialize the TOS module.
+ * initialize the TOS module.
*
* If this is a single user instance, we expect the user to know their
* dealings with their own node so a TOS is not necessary.
}
/**
- * @brief generate the content of the /tos page
+ * generate the content of the /tos page
*
* The content of the /tos page is generated from two parts.
* (1) a free form part the admin of the node can set in the admin panel
use OAuthSignatureMethod_PLAINTEXT;
/**
- * @brief OAuth protocol
+ * OAuth protocol
*/
class FKOAuth1 extends OAuthServer
{
/**
- * @brief Constructor
+ * Constructor
*/
public function __construct()
{
define('ACCESS_TOKEN_DURATION', 31536000);
/**
- * @brief OAuthDataStore class
+ * OAuthDataStore class
*/
class FKOAuthDataStore extends OAuthDataStore
{
/**
* @file src/Network/Probe.php
- * @brief Functions for probing URL
+ * Functions for probing URL
*/
use DOMDocument;
use Friendica\Util\XML;
/**
- * @brief This class contain functions for probing URL
+ * This class contain functions for probing URL
*
*/
class Probe
private static $istimeout;
/**
- * @brief Rearrange the array so that it always has the same order
+ * Rearrange the array so that it always has the same order
*
* @param array $data Unordered data
*
}
/**
- * @brief Check if the hostname belongs to the own server
+ * Check if the hostname belongs to the own server
*
* @param string $host The hostname that is to be checked
*
}
/**
- * @brief Probes for webfinger path via "host-meta"
+ * Probes for webfinger path via "host-meta"
*
* We have to check if the servers in the future still will offer this.
* It seems as if it was dropped from the standard.
}
/**
- * @brief Perform Webfinger lookup and return DFRN data
+ * Perform Webfinger lookup and return DFRN data
*
* Given an email style address, perform webfinger lookup and
* return the resulting DFRN profile URL, or if no DFRN profile URL
}
/**
- * @brief Check an URI for LRDD data
+ * Check an URI for LRDD data
*
* this is a replacement for the "lrdd" function.
* It isn't used in this class and has some redundancies in the code.
}
/**
- * @brief Fetch information (protocol endpoints and user information) about a given uri
+ * Fetch information (protocol endpoints and user information) about a given uri
*
* @param string $uri Address that should be probed
* @param string $network Test for this specific network
}
/**
- * @brief Checks if a profile url should be OStatus but only provides partial information
+ * Checks if a profile url should be OStatus but only provides partial information
*
* @param array $webfinger Webfinger data
* @param string $lrdd Path template for webfinger request
}
/**
- * @brief Fetch information (protocol endpoints and user information) about a given uri
+ * Fetch information (protocol endpoints and user information) about a given uri
*
* This function is only called by the "uri" function that adds caching and rearranging of data.
*
}
/**
- * @brief Perform a webfinger request.
+ * Perform a webfinger request.
*
* For details see RFC 7033: <https://tools.ietf.org/html/rfc7033>
*
}
/**
- * @brief Poll the Friendica specific noscrape page.
+ * Poll the Friendica specific noscrape page.
*
* "noscrape" is a faster alternative to fetch the data from the hcard.
* This functionality was originally created for the directory.
}
/**
- * @brief Check for valid DFRN data
+ * Check for valid DFRN data
*
* @param array $data DFRN data
*
}
/**
- * @brief Fetch data from a DFRN profile page and via "noscrape"
+ * Fetch data from a DFRN profile page and via "noscrape"
*
* @param string $profile_link Link to the profile page
*
}
/**
- * @brief Check for DFRN contact
+ * Check for DFRN contact
*
* @param array $webfinger Webfinger data
*
}
/**
- * @brief Poll the hcard page (Diaspora and Friendica specific)
+ * Poll the hcard page (Diaspora and Friendica specific)
*
* @param string $hcard_url Link to the hcard page
* @param array $data The already fetched data
}
/**
- * @brief Check for Diaspora contact
+ * Check for Diaspora contact
*
* @param array $webfinger Webfinger data
*
}
/**
- * @brief Check for OStatus contact
+ * Check for OStatus contact
*
* @param array $webfinger Webfinger data
* @param bool $short Short detection mode
}
/**
- * @brief Fetch data from a pump.io profile page
+ * Fetch data from a pump.io profile page
*
* @param string $profile_link Link to the profile page
*
}
/**
- * @brief Check for pump.io contact
+ * Check for pump.io contact
*
* @param array $webfinger Webfinger data
* @param string $addr
}
/**
- * @brief Check for twitter contact
+ * Check for twitter contact
*
* @param string $uri
*
}
/**
- * @brief Check page for feed link
+ * Check page for feed link
*
* @param string $url Page link
*
}
/**
- * @brief Check for feed contact
+ * Check for feed contact
*
* @param string $url Profile link
* @param boolean $probe Do a probe if the page contains a feed link
}
/**
- * @brief Check for mail contact
+ * Check for mail contact
*
* @param string $uri Profile link
* @param integer $uid User ID
}
/**
- * @brief Mix two paths together to possibly fix missing parts
+ * Mix two paths together to possibly fix missing parts
*
* @param string $avatar Path to the avatar
* @param string $base Another path that is hopefully complete
<?php
/**
* @file src/Object/Image.php
- * @brief This file contains the Image class for image processing
+ * This file contains the Image class for image processing
*/
namespace Friendica\Object;
private $types;
/**
- * @brief Constructor
+ * Constructor
* @param string $data
* @param boolean $type optional, default null
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Destructor
+ * Destructor
* @return void
*/
public function __destruct()
}
/**
- * @brief Scale image to target dimensions
+ * Scale image to target dimensions
*
* @param int $dest_width
* @param int $dest_height
}
/**
- * @brief Magic method allowing string casting of an Image object
+ * Magic method allowing string casting of an Image object
*
* Ex: $data = $Image->asString();
* can be replaced by
}
/**
- * @brief supported mimetypes and corresponding file extensions
+ * supported mimetypes and corresponding file extensions
* @return array
* @deprecated in version 2019.12 please use Util\Images::supportedTypes() instead.
*/
}
/**
- * @brief Maps Mime types to Imagick formats
+ * Maps Mime types to Imagick formats
* @return array With with image formats (mime type as key)
* @deprecated in version 2019.12 please use Util\Images::getFormatsMap() instead.
*/
use Friendica\Util\HTTPSignature;
/**
- * @brief ActivityPub Protocol class
+ * ActivityPub Protocol class
+ *
* The ActivityPub Protocol is a message exchange protocol defined by the W3C.
* https://www.w3.org/TR/activitypub/
* https://www.w3.org/TR/activitystreams-core/
use Friendica\Util\Strings;
/**
- * @brief ActivityPub Receiver Protocol class
+ * ActivityPub Receiver Protocol class
*
* To-Do:
* - Undo Announce
require_once 'mod/share.php';
/**
- * @brief ActivityPub Transmitter Protocol class
+ * ActivityPub Transmitter Protocol class
*
* To-Do:
* - Undo Announce
}
/**
- * @brief Callback function to replace a Friendica style mention in a mention that is used on AP
+ * Callback function to replace a Friendica style mention in a mention that is used on AP
*
* @param array $match Matching values for the callback
* @return string Replaced mention
<?php
/**
* @file include/dfrn.php
- * @brief The implementation of the dfrn protocol
+ * The implementation of the dfrn protocol
*
* @see https://github.com/friendica/friendica/wiki/Protocol and
* https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
use HTMLPurifier_Config;
/**
- * @brief This class contain functions to create and send DFRN XML files
+ * This class contain functions to create and send DFRN XML files
*/
class DFRN
{
const REPLY_RC = 2; // Reply that will be relayed
/**
- * @brief Generates an array of contact and user for DFRN imports
+ * Generates an array of contact and user for DFRN imports
*
* This array contains not only the receiver but also the sender of the message.
*
}
/**
- * @brief Generates the atom entries for delivery.php
+ * Generates the atom entries for delivery.php
*
* This function is used whenever content is transmitted via DFRN.
*
}
/**
- * @brief Generate an atom feed for the given user
+ * Generate an atom feed for the given user
*
* This function is called when another server is pulling data from the user feed.
*
}
/**
- * @brief Generate an atom entry for a given item id
+ * Generate an atom entry for a given item id
*
* @param int $item_id The item id
* @param boolean $conversation Show the conversation. If false show the single post.
}
/**
- * @brief Create XML text for DFRN mails
+ * Create XML text for DFRN mails
*
* @param array $item message elements
* @param array $owner Owner record
}
/**
- * @brief Create XML text for DFRN friend suggestions
+ * Create XML text for DFRN friend suggestions
*
* @param array $item suggestion elements
* @param array $owner Owner record
}
/**
- * @brief Create XML text for DFRN relocations
+ * Create XML text for DFRN relocations
*
* @param array $owner Owner record
* @param int $uid User ID
}
/**
- * @brief Adds the header elements for the DFRN protocol
+ * Adds the header elements for the DFRN protocol
*
* @param DOMDocument $doc XML document
* @param array $owner Owner record
}
/**
- * @brief Adds the author element in the header for the DFRN protocol
+ * Adds the author element in the header for the DFRN protocol
*
* @param DOMDocument $doc XML document
* @param array $owner Owner record
}
/**
- * @brief Adds the author elements in the "entry" elements of the DFRN protocol
+ * Adds the author elements in the "entry" elements of the DFRN protocol
*
* @param DOMDocument $doc XML document
* @param string $element Element name for the author
}
/**
- * @brief Adds the activity elements
+ * Adds the activity elements
*
* @param DOMDocument $doc XML document
* @param string $element Element name for the activity
}
/**
- * @brief Adds the elements for attachments
+ * Adds the elements for attachments
*
* @param object $doc XML document
* @param object $root XML root
}
/**
- * @brief Adds the "entry" elements for the DFRN protocol
+ * Adds the "entry" elements for the DFRN protocol
*
* @param DOMDocument $doc XML document
* @param string $type "text" or "html"
}
/**
- * @brief encrypts data via AES
+ * encrypts data via AES
*
* @param string $data The data that is to be encrypted
* @param string $key The AES key
}
/**
- * @brief decrypts data via AES
+ * decrypts data via AES
*
* @param string $encrypted The encrypted data
* @param string $key The AES key
}
/**
- * @brief Delivers the atom content to the contacts
+ * Delivers the atom content to the contacts
*
* @param array $owner Owner record
* @param array $contact Contact record of the receiver
}
/**
- * @brief Transmits atom content to the contacts via the Diaspora transport layer
+ * Transmits atom content to the contacts via the Diaspora transport layer
*
* @param array $owner Owner record
* @param array $contact Contact record of the receiver
}
/**
- * @brief Fetch the author data from head or entry items
+ * Fetch the author data from head or entry items
*
* @param object $xpath XPath object
* @param object $context In which context should the data be searched
}
/**
- * @brief Transforms activity objects into an XML string
+ * Transforms activity objects into an XML string
*
* @param object $xpath XPath object
* @param object $activity Activity object
}
/**
- * @brief Processes the mail elements
+ * Processes the mail elements
*
* @param object $xpath XPath object
* @param object $mail mail elements
}
/**
- * @brief Processes the suggestion elements
+ * Processes the suggestion elements
*
* @param object $xpath XPath object
* @param object $suggestion suggestion elements
}
/**
- * @brief Processes the relocation elements
+ * Processes the relocation elements
*
* @param object $xpath XPath object
* @param object $relocation relocation elements
}
/**
- * @brief Updates an item
+ * Updates an item
*
* @param array $current the current item record
* @param array $item the new item record
}
/**
- * @brief Detects the entry type of the item
+ * Detects the entry type of the item
*
* @param array $importer Record of the importer user mixed with contact of the content
* @param array $item the new item record
}
/**
- * @brief Send a "poke"
+ * Send a "poke"
*
* @param array $item The new item record
* @param array $importer Record of the importer user mixed with contact of the content
}
/**
- * @brief Processes several actions, depending on the verb
+ * Processes several actions, depending on the verb
*
* @param int $entrytype Is it a toplevel entry, a comment or a relayed comment?
* @param array $importer Record of the importer user mixed with contact of the content
}
/**
- * @brief Processes the link elements
+ * Processes the link elements
*
* @param object $links link elements
* @param array $item the item record
}
/**
- * @brief Processes the entry elements which contain the items and comments
+ * Processes the entry elements which contain the items and comments
*
* @param array $header Array of the header elements that always stay the same
* @param object $xpath XPath object
}
/**
- * @brief Deletes items
+ * Deletes items
*
* @param object $xpath XPath object
* @param object $deletion deletion elements
}
/**
- * @brief Imports a DFRN message
+ * Imports a DFRN message
*
* @param string $xml The DFRN message
* @param array $importer Record of the importer user mixed with contact of the content
}
/**
- * @brief Returns the activity verb
+ * Returns the activity verb
*
* @param array $item Item array
*
<?php
/**
* @file src/Protocol/diaspora.php
- * @brief The implementation of the diaspora protocol
+ * The implementation of the diaspora protocol
*
* The new protocol is described here: http://diaspora.github.io/diaspora_federation/index.html
* This implementation here interprets the old and the new protocol and sends the new one.
use SimpleXMLElement;
/**
- * @brief This class contain functions to create and send Diaspora XML files
+ * This class contain functions to create and send Diaspora XML files
*
*/
class Diaspora
}
/**
- * @brief Return a list of relay servers
+ * Return a list of relay servers
*
* The list contains not only the official relays but also servers that we serve directly
*
}
/**
- * @brief Return a contact for a given server address or creates a dummy entry
+ * Return a contact for a given server address or creates a dummy entry
*
* @param string $server_url The url of the server
* @param array $fields Fieldlist
}
/**
- * @brief Update or insert a relay contact
+ * Update or insert a relay contact
*
* @param string $server_url The url of the server
* @param array $network_fields Optional network specific fields
}
/**
- * @brief Return a list of participating contacts for a thread
+ * Return a list of participating contacts for a thread
*
* This is used for the participation feature.
* One of the parameters is a contact array.
}
/**
- * @brief repairs a signature that was double encoded
+ * repairs a signature that was double encoded
*
* The function is unused at the moment. It was copied from the old implementation.
*
}
/**
- * @brief verify the envelope and return the verified data
+ * verify the envelope and return the verified data
*
* @param string $envelope The magic envelope
*
}
/**
- * @brief encrypts data via AES
+ * encrypts data via AES
*
* @param string $key The AES key
* @param string $iv The IV (is used for CBC encoding)
}
/**
- * @brief decrypts data via AES
+ * decrypts data via AES
*
* @param string $key The AES key
* @param string $iv The IV (is used for CBC encoding)
/**
- * @brief Dispatches public messages and find the fitting receivers
+ * Dispatches public messages and find the fitting receivers
*
* @param array $msg The post that will be dispatched
*
}
/**
- * @brief Dispatches the different message types to the different functions
+ * Dispatches the different message types to the different functions
*
* @param array $importer Array of the importer user
* @param array $msg The post that will be dispatched
}
/**
- * @brief Checks if a posting is valid and fetches the data fields.
+ * Checks if a posting is valid and fetches the data fields.
*
* This function does not only check the signature.
* It also does the conversion between the old and the new diaspora format.
}
/**
- * @brief Fetches the public key for a given handle
+ * Fetches the public key for a given handle
*
* @param string $handle The handle
*
}
/**
- * @brief Fetches data for a given handle
+ * Fetches data for a given handle
*
* @param string $handle The handle
* @param boolean $update true = always update, false = never update, null = update when not found or outdated
}
/**
- * @brief Updates the fcontact table
+ * Updates the fcontact table
*
* @param array $arr The fcontact data
* @throws \Exception
}
/**
- * @brief get a handle (user@domain.tld) from a given contact id
+ * get a handle (user@domain.tld) from a given contact id
*
* @param int $contact_id The id in the contact table
* @param int $pcontact_id The id in the contact table (Used for the public contact)
}
/**
- * @brief get a url (scheme://domain.tld/u/user) from a given Diaspora*
+ * get a url (scheme://domain.tld/u/user) from a given Diaspora*
* fcontact guid
*
* @param mixed $fcontact_guid Hexadecimal string guid
}
/**
- * @brief Get a contact id for a given handle
+ * Get a contact id for a given handle
*
* @todo Move to Friendica\Model\Contact
*
}
/**
- * @brief Check if posting is allowed for this contact
+ * Check if posting is allowed for this contact
*
* @param array $importer Array of the importer user
* @param array $contact The contact that is checked
}
/**
- * @brief Fetches the contact id for a handle and checks if posting is allowed
+ * Fetches the contact id for a handle and checks if posting is allowed
*
* @param array $importer Array of the importer user
* @param string $handle The checked handle in the format user@domain.tld
}
/**
- * @brief Does the message already exists on the system?
+ * Does the message already exists on the system?
*
* @param int $uid The user id
* @param string $guid The guid of the message
}
/**
- * @brief Checks for links to posts in a message
+ * Checks for links to posts in a message
*
* @param array $item The item array
* @return void
}
/**
- * @brief Checks for relative /people/* links in an item body to match local
+ * Checks for relative /people/* links in an item body to match local
* contacts or prepends the remote host taken from the author link.
*
* @param string $body The item body to replace links from
}
/**
- * @brief sub function of "fetchGuid" which checks for links in messages
+ * sub function of "fetchGuid" which checks for links in messages
*
* @param array $match array containing a link that has to be checked for a message link
* @param array $item The item array
}
/**
- * @brief Fetches an item with a given guid from a given server
+ * Fetches an item with a given guid from a given server
*
* @param string $guid the message guid
* @param string $server The server address
}
/**
- * @brief Fetches a message from a server
+ * Fetches a message from a server
*
* @param string $guid message guid
* @param string $server The url of the server
}
/**
- * @brief Fetches an item with a given URL
+ * Fetches an item with a given URL
*
* @param string $url the message url
*
}
/**
- * @brief Fetches the item record of a given guid
+ * Fetches the item record of a given guid
*
* @param int $uid The user id
* @param string $guid message guid
}
/**
- * @brief returns contact details
+ * returns contact details
*
* @param array $def_contact The default contact if the person isn't found
* @param array $person The record of the person
}
/**
- * @brief Is the profile a hubzilla profile?
+ * Is the profile a hubzilla profile?
*
* @param string $url The profile link
*
}
/**
- * @brief Generate a post link with a given handle and message guid
+ * Generate a post link with a given handle and message guid
*
* @param string $addr The user handle
* @param string $guid message guid
}
/**
- * @brief Receives account migration
+ * Receives account migration
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes an account deletion
+ * Processes an account deletion
*
* @param object $data The message object
*
}
/**
- * @brief Fetch the uri from our database if we already have this item (maybe from ourselves)
+ * Fetch the uri from our database if we already have this item (maybe from ourselves)
*
* @param string $author Author handle
* @param string $guid Message guid
}
/**
- * @brief Fetch the guid from our database with a given uri
+ * Fetch the guid from our database with a given uri
*
* @param string $uri Message uri
* @param string $uid Author handle
}
/**
- * @brief Find the best importer for a comment, like, ...
+ * Find the best importer for a comment, like, ...
*
* @param string $guid The guid of the item
*
}
/**
- * @brief Processes an incoming comment
+ * Processes an incoming comment
*
* @param array $importer Array of the importer user
* @param string $sender The sender of the message
}
/**
- * @brief processes and stores private messages
+ * processes and stores private messages
*
* @param array $importer Array of the importer user
* @param array $contact The contact of the message
}
/**
- * @brief Processes new private messages (answers to private messages are processed elsewhere)
+ * Processes new private messages (answers to private messages are processed elsewhere)
*
* @param array $importer Array of the importer user
* @param array $msg Array of the processed message, author handle and key
}
/**
- * @brief Processes "like" messages
+ * Processes "like" messages
*
* @param array $importer Array of the importer user
* @param string $sender The sender of the message
}
/**
- * @brief Processes private messages
+ * Processes private messages
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes participations - unsupported by now
+ * Processes participations - unsupported by now
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes photos - unneeded
+ * Processes photos - unneeded
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes poll participations - unssupported
+ * Processes poll participations - unssupported
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes incoming profile updates
+ * Processes incoming profile updates
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes incoming friend requests
+ * Processes incoming friend requests
*
* @param array $importer Array of the importer user
* @param array $contact The contact that send the request
}
/**
- * @brief Processes incoming sharing notification
+ * Processes incoming sharing notification
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Fetches a message with a given guid
+ * Fetches a message with a given guid
*
* @param string $guid message guid
* @param string $orig_author handle of the original post
}
/**
- * @brief Stores a reshare activity
+ * Stores a reshare activity
*
* @param array $item Array of reshare post
* @param integer $parent_message_id Id of the parent post
}
/**
- * @brief Processes a reshare message
+ * Processes a reshare message
*
* @param array $importer Array of the importer user
* @param object $data The message object
}
/**
- * @brief Processes retractions
+ * Processes retractions
*
* @param array $importer Array of the importer user
* @param array $contact The contact of the item owner
}
/**
- * @brief Receives retraction messages
+ * Receives retraction messages
*
* @param array $importer Array of the importer user
* @param string $sender The sender of the message
}
/**
- * @brief Receives status messages
+ * Receives status messages
*
* @param array $importer Array of the importer user
* @param SimpleXMLElement $data The message object
* ************************************************************************************** */
/**
- * @brief returnes the handle of a contact
+ * returnes the handle of a contact
*
* @param array $contact contact array
*
/**
- * @brief Creates the data for a private message in the new format
+ * Creates the data for a private message in the new format
*
* @param string $msg The message that is to be transmitted
* @param array $user The record of the sender
}
/**
- * @brief Creates the envelope for the "fetch" endpoint and for the new format
+ * Creates the envelope for the "fetch" endpoint and for the new format
*
* @param string $msg The message that is to be transmitted
* @param array $user The record of the sender
}
/**
- * @brief Create the envelope for a message
+ * Create the envelope for a message
*
* @param string $msg The message that is to be transmitted
* @param array $user The record of the sender
}
/**
- * @brief Creates a signature for a message
+ * Creates a signature for a message
*
* @param array $owner the array of the owner of the message
* @param array $message The message that is to be signed
}
/**
- * @brief Transmit a message to a target server
+ * Transmit a message to a target server
*
* @param array $owner the array of the item owner
* @param array $contact Target of the communication
/**
- * @brief Build the post xml
+ * Build the post xml
*
* @param string $type The message type
* @param array $message The message data
}
/**
- * @brief Builds and transmit messages
+ * Builds and transmit messages
*
* @param array $owner the array of the item owner
* @param array $contact Target of the communication
}
/**
- * @brief sends a participation (Used to get all further updates)
+ * sends a participation (Used to get all further updates)
*
* @param array $contact Target of the communication
* @param array $item Item array
}
/**
- * @brief sends an account migration
+ * sends an account migration
*
* @param array $owner the array of the item owner
* @param array $contact Target of the communication
}
/**
- * @brief Sends a "share" message
+ * Sends a "share" message
*
* @param array $owner the array of the item owner
* @param array $contact Target of the communication
}
/**
- * @brief sends an "unshare"
+ * sends an "unshare"
*
* @param array $owner the array of the item owner
* @param array $contact Target of the communication
}
/**
- * @brief Checks a message body if it is a reshare
+ * Checks a message body if it is a reshare
*
* @param string $body The message body that is to be check
* @param bool $complete Should it be a complete check or a simple check?
}
/**
- * @brief Create an event array
+ * Create an event array
*
* @param integer $event_id The id of the event
*
}
/**
- * @brief Create a post (status message or reshare)
+ * Create a post (status message or reshare)
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Sends a post
+ * Sends a post
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Creates a "like" object
+ * Creates a "like" object
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Creates an "EventParticipation" object
+ * Creates an "EventParticipation" object
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Creates the object for a comment
+ * Creates the object for a comment
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Send a like or a comment
+ * Send a like or a comment
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Creates a message from a signature record entry
+ * Creates a message from a signature record entry
*
* @param array $item The item that will be exported
* @return array The message
}
/**
- * @brief Relays messages (like, comment, retraction) to other servers if we are the thread owner
+ * Relays messages (like, comment, retraction) to other servers if we are the thread owner
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Sends a retraction (deletion) of a message, like or comment
+ * Sends a retraction (deletion) of a message, like or comment
*
* @param array $item The item that will be exported
* @param array $owner the array of the item owner
}
/**
- * @brief Sends a mail
+ * Sends a mail
*
* @param array $item The item that will be exported
* @param array $owner The owner
}
/**
- * @brief Split a name into first name and last name
+ * Split a name into first name and last name
*
* @param string $name The name
*
}
/**
- * @brief Create profile data
+ * Create profile data
*
* @param int $uid The user id
*
}
/**
- * @brief Sends profile data
+ * Sends profile data
*
* @param int $uid The user id
* @param bool $recips optional, default false
}
/**
- * @brief Creates the signature for likes that are created on our system
+ * Creates the signature for likes that are created on our system
*
* @param integer $uid The user of that comment
* @param array $item Item array
}
/**
- * @brief Creates the signature for Comments that are created on our system
+ * Creates the signature for Comments that are created on our system
*
* @param integer $uid The user of that comment
* @param array $item Item array
use Friendica\Util\Strings;
/**
- * @brief Email class
+ * Email class
*/
class Email
{
<?php
/**
* @file src/Protocol/Feed.php
- * @brief Imports RSS/RDF/Atom feeds
+ * Imports RSS/RDF/Atom feeds
*
*/
namespace Friendica\Protocol;
use Friendica\Util\XML;
/**
- * @brief This class contain functions to import feeds
+ * This class contain functions to import feeds
*
*/
class Feed {
/**
- * @brief Read a RSS/RDF/Atom feed and create an item entry for it
+ * Read a RSS/RDF/Atom feed and create an item entry for it
*
* @param string $xml The feed data
* @param array $importer The user record of the importer
require_once 'include/api.php';
/**
- * @brief This class contain functions for the OStatus protocol
+ * This class contain functions for the OStatus protocol
*/
class OStatus
{
private static $conv_list = [];
/**
- * @brief Fetches author data
+ * Fetches author data
*
* @param DOMXPath $xpath The xpath object
* @param object $context The xml context of the author details
}
/**
- * @brief Fetches author data from a given XML string
+ * Fetches author data from a given XML string
*
* @param string $xml The XML
* @param array $importer user record of the importing user
}
/**
- * @brief Read attributes from element
+ * Read attributes from element
*
* @param object $element Element object
*
}
/**
- * @brief Imports an XML string containing OStatus elements
+ * Imports an XML string containing OStatus elements
*
* @param string $xml The XML
* @param array $importer user record of the importing user
}
/**
- * @brief Internal feed processing
+ * Internal feed processing
*
* @param string $xml The XML
* @param array $importer user record of the importing user
}
/**
- * @brief Processes the XML for a post
+ * Processes the XML for a post
*
* @param DOMXPath $xpath The xpath object
* @param object $entry The xml entry that is processed
}
/**
- * @brief Fetch the conversation for posts
+ * Fetch the conversation for posts
*
* @param string $conversation The link to the conversation
* @param string $conversation_uri The conversation in "uri" format
}
/**
- * @brief Store a feed in several conversation entries
+ * Store a feed in several conversation entries
*
* @param string $xml The feed
* @param string $conversation conversation
}
/**
- * @brief Fetch the own post so that it can be stored later
+ * Fetch the own post so that it can be stored later
*
* We want to store the original data for later processing.
* This function is meant for cases where we process a feed with multiple entries.
}
/**
- * @brief Fetch related posts and processes them
+ * Fetch related posts and processes them
*
* @param string $related The link to the related item
* @param string $related_uri The related item in "uri" format
}
/**
- * @brief Processes the XML for a repeated post
+ * Processes the XML for a repeated post
*
* @param DOMXPath $xpath The xpath object
* @param object $entry The xml entry that is processed
}
/**
- * @brief Processes links in the XML
+ * Processes links in the XML
*
* @param object $links The xml data that contain links
* @param array $item The item array
}
/**
- * @brief Create an url out of an uri
+ * Create an url out of an uri
*
* @param string $href URI in the format "parameter1:parameter1:..."
*
}
/**
- * @brief Checks if the current post is a reshare
+ * Checks if the current post is a reshare
*
* @param array $item The item array of thw post
*
}
/**
- * @brief Cleans the body of a post if it contains picture links
+ * Cleans the body of a post if it contains picture links
*
* @param string $body The body
*
}
/**
- * @brief Adds the header elements to the XML document
+ * Adds the header elements to the XML document
*
* @param DOMDocument $doc XML document
* @param array $owner Contact data of the poster
}
/**
- * @brief Add the link to the push hubs to the XML document
+ * Add the link to the push hubs to the XML document
*
* @param DOMDocument $doc XML document
* @param object $root XML root element where the hub links are added
}
/**
- * @brief Adds attachment data to the XML document
+ * Adds attachment data to the XML document
*
* @param DOMDocument $doc XML document
* @param object $root XML root element where the hub links are added
}
/**
- * @brief Adds the author element to the XML document
+ * Adds the author element to the XML document
*
* @param DOMDocument $doc XML document
* @param array $owner Contact data of the poster
*/
/**
- * @brief Returns the given activity if present - otherwise returns the "post" activity
+ * Returns the given activity if present - otherwise returns the "post" activity
*
* @param array $item Data of the item that is to be posted
*
}
/**
- * @brief Returns the given object type if present - otherwise returns the "note" object type
+ * Returns the given object type if present - otherwise returns the "note" object type
*
* @param array $item Data of the item that is to be posted
*
}
/**
- * @brief Adds an entry element to the XML document
+ * Adds an entry element to the XML document
*
* @param DOMDocument $doc XML document
* @param array $item Data of the item that is to be posted
}
/**
- * @brief Adds a source entry to the XML document
+ * Adds a source entry to the XML document
*
* @param DOMDocument $doc XML document
* @param array $contact Array of the contact that is added
}
/**
- * @brief Fetches contact data from the contact or the gcontact table
+ * Fetches contact data from the contact or the gcontact table
*
* @param string $url URL of the contact
* @param array $owner Contact data of the poster
}
/**
- * @brief Adds an entry element with reshared content
+ * Adds an entry element with reshared content
*
* @param DOMDocument $doc XML document
* @param array $item Data of the item that is to be posted
}
/**
- * @brief Adds an entry element with a "like"
+ * Adds an entry element with a "like"
*
* @param DOMDocument $doc XML document
* @param array $item Data of the item that is to be posted
}
/**
- * @brief Adds the person object element to the XML document
+ * Adds the person object element to the XML document
*
* @param DOMDocument $doc XML document
* @param array $owner Contact data of the poster
}
/**
- * @brief Adds a follow/unfollow entry element
+ * Adds a follow/unfollow entry element
*
* @param DOMDocument $doc XML document
* @param array $item Data of the follow/unfollow message
}
/**
- * @brief Adds a regular entry element
+ * Adds a regular entry element
*
* @param DOMDocument $doc XML document
* @param array $item Data of the item that is to be posted
}
/**
- * @brief Adds a header element to the XML document
+ * Adds a header element to the XML document
*
* @param DOMDocument $doc XML document
* @param array $owner Contact data of the poster
}
/**
- * @brief Adds elements to the XML document
+ * Adds elements to the XML document
*
* @param DOMDocument $doc XML document
* @param \DOMElement $entry Entry element where the content is added
}
/**
- * @brief Adds the elements at the foot of an entry to the XML document
+ * Adds the elements at the foot of an entry to the XML document
*
* @param DOMDocument $doc XML document
* @param object $entry The entry element where the elements are added
* Updates the provided last_update parameter if the result comes from the
* cache or it is empty
*
- * @brief Creates the XML feed for a given nickname
- *
* @param string $owner_nick Nickname of the feed owner
* @param string $last_update Date of the last update
* @param integer $max_items Number of maximum items to fetch
}
/**
- * @brief Creates the XML for a salmon message
+ * Creates the XML for a salmon message
*
* @param array $item Data of the item that is to be posted
* @param array $owner Contact data of the poster
const USERS_GCONTACTS_FALLBACK = 3;
/**
- * @brief Fetch POCO data
+ * Fetch POCO data
*
* @param integer $cid Contact ID
* @param integer $uid User ID
}
/**
- * @brief Fetch POCO data from the worker
+ * Fetch POCO data from the worker
*
* @param integer $cid Contact ID
* @param integer $uid User ID
}
/**
- * @brief Returns a list of all known servers
+ * Returns a list of all known servers
* @return array List of server urls
* @throws Exception
*/
}
/**
- * @brief Fetch server list from remote servers and adds them when they are new.
+ * Fetch server list from remote servers and adds them when they are new.
*
* @param string $poco URL to the POCO endpoint
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
use Friendica\Util\XML;
/**
- * @brief Salmon Protocol class
+ * Salmon Protocol class
+ *
* The Salmon Protocol is a message exchange protocol running over HTTP designed to decentralize commentary
* and annotations made against newsfeed articles such as blog posts.
*/
namespace Friendica\Util;
/**
- * @brief Array utility class
+ * Array utility class
*/
class Arrays
{
/**
- * @brief Private constructor
+ * Private constructor
*/
private function __construct () {
// Utitlities don't have instances
}
/**
- * @brief Returns the base filesystem path of the App
+ * Returns the base filesystem path of the App
*
* It first checks for the internal variable, then for DOCUMENT_ROOT and
* finally for PWD
}
/**
- * @brief Returns a normalized file path
+ * Returns a normalized file path
*
* This is a wrapper for the "realpath" function.
* That function cannot detect the real path when some folders aren't readable.
use Friendica\Core\System;
/**
- * @brief Crypto class
+ * Crypto class
*/
class Crypto
{
use Exception;
/**
- * @brief Temporal class
+ * Temporal class
*/
class DateTimeFormat
{
}
/**
- * @brief General purpose date parse/convert/format function.
+ * General purpose date parse/convert/format function.
*
* @param string $s Some parseable date/time string
* @param string $tz_to Destination timezone
use Friendica\Protocol\Email;
/**
- * @brief class to handle emailing
+ * class to handle emailing
*/
class Emailer
{
private $host;
/**
- * @brief Create the class
+ * Create the class
*
*/
public function __construct()
}
/**
- * @brief Standard input reading function, executes the auth with the provided
+ * Standard input reading function, executes the auth with the provided
* parameters
*
* @return null
}
/**
- * @brief Check if the given username exists
+ * Check if the given username exists
*
* @param array $aCommand The command array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Check remote user existance via HTTP(S)
+ * Check remote user existance via HTTP(S)
*
* @param string $host The hostname
* @param string $user Username
}
/**
- * @brief Authenticate the given user and password
+ * Authenticate the given user and password
*
* @param array $aCommand The command array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Check remote credentials via HTTP(S)
+ * Check remote credentials via HTTP(S)
*
* @param string $host The hostname
* @param string $user Username
}
/**
- * @brief Set the hostname for this process
+ * Set the hostname for this process
*
* @param string $host The hostname
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief write data to the syslog
+ * write data to the syslog
*
* @param integer $loglevel The syslog loglevel
* @param string $sMessage The syslog message
}
/**
- * @brief destroy the class, close the syslog connection.
+ * destroy the class, close the syslog connection.
*/
public function __destruct()
{
use Friendica\Model\APContact;
/**
- * @brief Implements HTTP Signatures per draft-cavage-http-signatures-07.
+ * Implements HTTP Signatures per draft-cavage-http-signatures-07.
*
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Web/HTTPSig.php
*
{
// See draft-cavage-http-signatures-08
/**
- * @brief Verifies a magic request
+ * Verifies a magic request
*
* @param $key
*
*/
/**
- * @brief Transmit given data to a target for a user
+ * Transmit given data to a target for a user
*
* @param array $data Data that is about to be send
* @param string $target The URL of the inbox
}
/**
- * @brief Set the delivery status for a given inbox
+ * Set the delivery status for a given inbox
*
* @param string $url The URL of the inbox
* @param boolean $success Transmission status
}
/**
- * @brief Fetches JSON data for a user
+ * Fetches JSON data for a user
*
* @param string $request request url
* @param integer $uid User id of the requester
}
/**
- * @brief Fetches raw data for a user
+ * Fetches raw data for a user
*
* @param string $request request url
* @param integer $uid User id of the requester
}
/**
- * @brief Gets a signer from a given HTTP request
+ * Gets a signer from a given HTTP request
*
* @param $content
* @param $http_headers
}
/**
- * @brief fetches a key for a given id and actor
+ * fetches a key for a given id and actor
*
* @param $id
* @param $actor
use Friendica\DI;
/**
- * @brief This class contain methods to work with JsonLD data
+ * This class contain methods to work with JsonLD data
*/
class JsonLD
{
/**
- * @brief Loader for LD-JSON validation
+ * Loader for LD-JSON validation
*
* @param $url
*
}
/**
- * @brief Normalises a given JSON array
+ * Normalises a given JSON array
*
* @param array $json
*
}
/**
- * @brief Compacts a given JSON array
+ * Compacts a given JSON array
*
* @param array $json
*
}
/**
- * @brief Fetches an element array from a JSON array
+ * Fetches an element array from a JSON array
*
* @param $array
* @param $element
}
/**
- * @brief Fetches an element from a JSON array
+ * Fetches an element from a JSON array
*
* @param $array
* @param $element
use Friendica\Model\APContact;
/**
- * @brief Implements JSON-LD signatures
+ * Implements JSON-LD signatures
*
* Ported from Osada: https://framagit.org/macgirvin/osada
*/
* Set the cookiejar argument to a string (e.g. "/tmp/friendica-cookies.txt")
* to preserve cookies from one request to the next.
*
- * @brief Curl wrapper
* @param string $url URL to fetch
* @param bool $binary default false
* TRUE if asked to return binary results (file download)
* Inner workings and parameters are the same as @ref fetchUrl but returns an array with
* all the information collected during the fetch.
*
- * @brief Curl wrapper with array of return values.
* @param string $url URL to fetch
* @param bool $binary default false
* TRUE if asked to return binary results (file download)
}
/**
- * @brief fetches an URL.
+ * fetches an URL.
*
* @param string $url URL to fetch
* @param bool $binary default false
}
/**
- * @brief Send POST request to $url
+ * Send POST request to $url
*
* @param string $url URL to post
* @param mixed $params array of POST variables
}
/**
- * @brief Check URL to see if it's real
+ * Check URL to see if it's real
*
* Take a URL from the wild, prepend http:// if necessary
* and check DNS to see if it's real (or check if is a valid IP address)
}
/**
- * @brief Checks that email is an actual resolvable internet address
+ * Checks that email is an actual resolvable internet address
*
* @param string $addr The email address
* @return boolean True if it's a valid email address, false if it's not
}
/**
- * @brief Check if URL is allowed
+ * Check if URL is allowed
*
* Check $url against our list of allowed sites,
* wildcards allowed. If allowed_sites is unset return true;
}
/**
- * @brief Check if email address is allowed to register here.
+ * Check if email address is allowed to register here.
*
* Compare against our list (wildcards allowed).
*
/**
* Checks for the existence of a domain in a domain list
*
- * @brief Checks for the existence of a domain in a domain list
* @param string $domain
* @param array $domain_list
* @return boolean
}
/**
- * @brief Remove Google Analytics and other tracking platforms params from URL
+ * Remove Google Analytics and other tracking platforms params from URL
*
* @param string $url Any user-submitted URL that may contain tracking params
* @return string The same URL stripped of tracking parameters
}
/**
- * @brief Returns the original URL of the provided URL
+ * Returns the original URL of the provided URL
*
* This function strips tracking query params and follows redirections, either
* through HTTP code or meta refresh tags. Stops after 10 redirections.
}
/**
- * @brief Find the matching part between two url
+ * Find the matching part between two url
*
* @param string $url1
* @param string $url2
}
/**
- * @brief Glue url parts together
+ * Glue url parts together
*
* @param array $parsed URL parts
*
<?php
/**
* @file src/Util/ParseUrl.php
- * @brief Get informations about a given URL
+ * Get informations about a given URL
*/
namespace Friendica\Util;
use Friendica\Database\DBA;
/**
- * @brief Class with methods for extracting certain content from an url
+ * Class with methods for extracting certain content from an url
*/
class ParseUrl
{
const MIN_DESC_COUNT = 100;
/**
- * @brief Search for chached embeddable data of an url otherwise fetch it
+ * Search for chached embeddable data of an url otherwise fetch it
*
* @param string $url The url of the page which should be scraped
* @param bool $no_guessing If true the parse doens't search for
}
/**
- * @brief Parse a page for embeddable content information
+ * Parse a page for embeddable content information
*
* This method parses to url for meta data which can be used to embed
* the content. If available it prioritizes Open Graph meta tags.
}
/**
- * @brief Convert tags from CSV to an array
+ * Convert tags from CSV to an array
*
* @param string $string Tags
* @return array with formatted Hashtags
}
/**
- * @brief Add a hasht sign to a string
+ * Add a hasht sign to a string
*
- * This method is used as callback function
+ * This method is used as callback function
*
* @param string $tag The pure tag name
* @param int $k Counter for internal use
}
/**
- * @brief Add a scheme to an url
+ * Add a scheme to an url
*
* The src attribute of some html elements (e.g. images)
* can miss the scheme so we need to add the correct
namespace Friendica\Util;
/**
- * @brief Pidfile class
+ * Pidfile class
*/
class PidFile
{
/**
- * @brief Read the pid from a given pid file
+ * Read the pid from a given pid file
*
* @param string $file Filename of pid file
*
}
/**
- * @brief Is there a running process with the given pid file
+ * Is there a running process with the given pid file
*
* @param string $file Filename of pid file
*
}
/**
- * @brief Kills a process from a given pid file
+ * Kills a process from a given pid file
*
* @param string $file Filename of pid file
*
}
/**
- * @brief Creates a pid file
+ * Creates a pid file
*
* @param string $file Filename of pid file
*
}
/**
- * @brief Deletes a given pid file
+ * Deletes a given pid file
*
* @param string $file Filename of pid file
*
use Friendica\DI;
/**
- * @brief Proxy utilities class
+ * Proxy utilities class
*/
class Proxy
{
];
/**
- * @brief Private constructor
+ * Private constructor
*/
private function __construct () {
// No instances from utilities classes
}
/**
- * @brief Transform a remote URL into a local one.
+ * Transform a remote URL into a local one.
*
* This function only performs the URL replacement on http URL and if the
* provided URL isn't local, "the isn't deactivated" (sic) and if the config
}
/**
- * @brief "Proxifies" HTML code's image tags
+ * "Proxifies" HTML code's image tags
*
* "Proxifies", means replaces image URLs in given HTML code with those from
* proxy storage directory.
}
/**
- * @brief Checks if the URL is a local URL.
+ * Checks if the URL is a local URL.
*
* @param string $url
* @return boolean
}
/**
- * @brief Return the array of query string parameters from a URL
+ * Return the array of query string parameters from a URL
*
* @param string $url URL to parse
* @return array Associative array of query string parameters
}
/**
- * @brief Call-back method to replace the UR
+ * Call-back method to replace the UR
*
* @param array $matches Matches from preg_replace_callback()
* @return string Proxified HTML image tag
use Friendica\Core\Logger;
/**
- * @brief This class handles string functions
+ * This class handles string functions
*/
class Strings
{
/**
- * @brief Generates a pseudo-random string of hexadecimal characters
+ * Generates a pseudo-random string of hexadecimal characters
*
* @param int $size
* @return string
}
/**
- * @brief This is our primary input filter.
+ * This is our primary input filter.
*
* Use this on any text input where angle chars are not valid or permitted
* They will be replaced with safer brackets. This may be filtered further
}
/**
- * @brief Use this on "body" or "content" input where angle chars shouldn't be removed,
+ * Use this on "body" or "content" input where angle chars shouldn't be removed,
* and allow them to be safely displayed.
* @param string $string
*
}
/**
- * @brief Generate a string that's random, but usually pronounceable. Used to generate initial passwords
+ * Generate a string that's random, but usually pronounceable. Used to generate initial passwords
*
* @param int $len length
*
}
/**
- * @brief Remove indentation from a text
+ * Remove indentation from a text
*
* @param string $text String to be transformed.
* @param string $chr Optional. Indentation tag. Default tab (\t).
}
/**
- * @brief Get byte size returned in a Data Measurement (KB, MB, GB)
+ * Get byte size returned in a Data Measurement (KB, MB, GB)
*
* @param int $bytes The number of bytes to be measured
* @param int $precision Optional. Default 2.
}
/**
- * @brief Protect percent characters in sprintf calls
+ * Protect percent characters in sprintf calls
*
* @param string $s String to transform.
*
}
/**
- * @brief Base64 Encode URL and translate +/ to -_ Optionally strip padding.
+ * Base64 Encode URL and translate +/ to -_ Optionally strip padding.
*
* @param string $s URL to encode
* @param boolean $strip_padding Optional. Default false
}
/**
- * @brief Decode Base64 Encoded URL and translate -_ to +/
+ * Decode Base64 Encoded URL and translate -_ to +/
* @param string $s URL to decode
*
* @return string Decoded URL
}
/**
- * @brief Normalize url
+ * Normalize url
*
* @param string $url URL to be normalized.
*
}
/**
- * @brief Normalize OpenID identity
+ * Normalize OpenID identity
*
* @param string $s OpenID Identity
*
}
/**
- * @brief Compare two URLs to see if they are the same, but ignore
+ * Compare two URLs to see if they are the same, but ignore
* slight but hopefully insignificant differences such as if one
* is https and the other isn't, or if one is www.something and
* the other isn't - and also ignore case differences.
use Friendica\Database\DBA;
/**
- * @brief Temporal class
+ * Temporal class
*/
class Temporal
{
/**
- * @brief Two-level sort for timezones.
+ * Two-level sort for timezones.
*
* @param string $a
* @param string $b
}
/**
- * @brief Emit a timezone selector grouped (primarily) by continent
+ * Emit a timezone selector grouped (primarily) by continent
*
* @param string $current Timezone
* @return string Parsed HTML output
}
/**
- * @brief Generating a Timezone selector
+ * Generating a Timezone selector
*
* Return a select using 'field_select_raw' template, with timezones
* grouped (primarily) by continent
}
/**
- * @brief Wrapper for date selector, tailored for use in birthday fields.
+ * Wrapper for date selector, tailored for use in birthday fields.
*
* @param string $dob Date of Birth
* @param string $timezone
}
/**
- * @brief Returns a date selector
+ * Returns a date selector
*
* @param DateTime $min Minimum date
* @param DateTime $max Maximum date
}
/**
- * @brief Returns a time selector
+ * Returns a time selector
*
* @param string $h Already selected hour
* @param string $m Already selected minute
}
/**
- * @brief Returns a datetime selector.
+ * Returns a datetime selector.
*
* @param DateTime $minDate Minimum date
* @param DateTime $maxDate Maximum date
}
/**
- * @brief Returns a relative date string.
+ * Returns a relative date string.
*
* Implements "3 seconds ago" etc.
* Based on $posted_date, (UTC).
}
/**
- * @brief Returns timezone correct age in years.
+ * Returns timezone correct age in years.
*
* Returns the age in years, given a date of birth, the timezone of the person
* whose date of birth is provided, and the timezone of the person viewing the
}
/**
- * @brief Get days of a month in a given year.
+ * Get days of a month in a given year.
*
* Returns number of days in the month of the given year.
* $m = 1 is 'January' to match human usage.
}
/**
- * @brief Returns the first day in month for a given month, year.
+ * Returns the first day in month for a given month, year.
*
* Months start at 1.
*
}
/**
- * @brief Output a calendar for the given month, year.
+ * Output a calendar for the given month, year.
*
* If $links are provided (array), e.g. $links[12] => 'http://mylink' ,
* date 12 will be linked appropriately. Today's date is also noted by
use SimpleXMLElement;
/**
- * @brief This class contain methods to work with XML data
+ * This class contain methods to work with XML data
*/
class XML
{
/**
- * @brief Creates an XML structure out of a given array
+ * Creates an XML structure out of a given array
*
* @param array $array The array of the XML structure that will be generated
* @param object $xml The createdXML will be returned by reference
}
/**
- * @brief Copies an XML object
+ * Copies an XML object
*
* @param object $source The XML source
* @param object $target The XML target
}
/**
- * @brief Create an XML element
+ * Create an XML element
*
* @param \DOMDocument $doc XML root
* @param string $element XML element name
}
/**
- * @brief Create an XML and append it to the parent object
+ * Create an XML and append it to the parent object
*
* @param \DOMDocument $doc XML root
* @param object $parent parent object
}
/**
- * @brief Convert an XML document to a normalised, case-corrected array
+ * Convert an XML document to a normalised, case-corrected array
* used by webfinger
*
* @param object $xml_element The XML document
}
/**
- * @brief Convert the given XML text to an array in the XML structure.
+ * Convert the given XML text to an array in the XML structure.
*
* Xml::toArray() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
}
/**
- * @brief Delete a node in a XML object
+ * Delete a node in a XML object
*
* @param \DOMDocument $doc XML document
* @param string $node Node name
class APDelivery
{
/**
- * @brief Delivers ActivityPub messages
+ * Delivers ActivityPub messages
*
* @param string $cmd
* @param integer $target_id
/**
* @file src/Worker/CheckVersion.php
*
- * @brief save Friendica upstream version to the DB
+ * save Friendica upstream version to the DB
**/
namespace Friendica\Worker;
use Friendica\Util\Network;
/**
- * @brief check the git repository VERSION file and save the version to the DB
+ * check the git repository VERSION file and save the version to the DB
*
* Checking the upstream version is optional (opt-in) and can be done to either
* the master or the develop branch in the repository.
<?php
/**
* @file src/Worker/CreateShadowEntry.php
- * @brief This script creates posts with UID = 0 for a given public post.
+ * This script creates posts with UID = 0 for a given public post.
*
* This script is started from mod/item.php to save some time when doing a post.
*/
}
/**
- * @brief Update public contacts
+ * Update public contacts
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
private static function updatePublicContacts() {
}
/**
- * @brief Poll contacts for unreceived messages
+ * Poll contacts for unreceived messages
*
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
}
/**
- * @brief Update the cached values for the number of photo albums per user
+ * Update the cached values for the number of photo albums per user
*/
private static function updatePhotoAlbums()
{
}
/**
- * @brief Expire and remove user entries
+ * Expire and remove user entries
*/
private static function expireAndRemoveUsers()
{
}
/**
- * @brief Clear cache entries
+ * Clear cache entries
*
* @param App $a
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Repair missing values in Diaspora contacts
+ * Repair missing values in Diaspora contacts
*
* @param App $a
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
}
/**
- * @brief Do some repairs in database entries
+ * Do some repairs in database entries
*
*/
private static function repairDatabase()
<?php
/**
* @file src/Worker/DBClean.php
- * @brief The script is called from time to time to clean the database entries and remove orphaned data.
+ * The script is called from time to time to clean the database entries and remove orphaned data.
*/
namespace Friendica\Worker;
}
/**
- * @brief Fork the different DBClean processes
+ * Fork the different DBClean processes
*/
private static function forkCleanProcess() {
// Get the expire days for step 8 and 9
}
/**
- * @brief Remove orphaned database entries
+ * Remove orphaned database entries
* @param integer $stage What should be deleted?
*
* Values for $stage:
<?php
/**
* @file src/Worker/DBUpdate.php
- * @brief This file is called when the database structure needs to be updated
+ * This file is called when the database structure needs to be updated
*/
namespace Friendica\Worker;
}
/**
- * @brief Deliver content via DFRN
+ * Deliver content via DFRN
*
* @param string $cmd Command
* @param array $contact Contact record of the receiver
}
/**
- * @brief Deliver content via Diaspora
+ * Deliver content via Diaspora
*
* @param string $cmd Command
* @param array $contact Contact record of the receiver
}
/**
- * @brief Deliver content via mail
+ * Deliver content via mail
*
* @param string $cmd Command
* @param array $contact Contact record of the receiver
<?php
/**
* @file src/Worker/Directory.php
- * @brief Sends updated profile data to the directory
+ * Sends updated profile data to the directory
*/
namespace Friendica\Worker;
<?php
/**
* @file src/Worker/Expire.php
- * @brief Expires old item entries
+ * Expires old item entries
*/
namespace Friendica\Worker;
}
/**
- * @brief Updates a personal contact entry and the public contact entry
+ * Updates a personal contact entry and the public contact entry
*
* @param array $contact The personal contact entry
* @param array $fields The fields that are updated
}
/**
- * @brief Poll DFRN contacts
+ * Poll DFRN contacts
*
* @param array $contact The personal contact entry
* @param string $updated The updated date
}
/**
- * @brief Poll Feed/OStatus contacts
+ * Poll Feed/OStatus contacts
*
* @param array $contact The personal contact entry
* @param string $protocol The used protocol of the contact
}
/**
- * @brief Poll Mail contacts
+ * Poll Mail contacts
*
* @param array $contact The personal contact entry
* @param integer $importer_uid The UID of the importer
<?php
/**
* @file src/Worker/ProfileUpdate.php
- * @brief Send updated profile data to Diaspora and ActivityPub
+ * Send updated profile data to Diaspora and ActivityPub
*/
namespace Friendica\Worker;
<?php
/**
* @file src/Worker/RemoveContact.php
- * @brief Removes orphaned data from deleted contacts
+ * Removes orphaned data from deleted contacts
*/
namespace Friendica\Worker;
<?php
/**
* @file src/Worker/RemoveUser.php
- * @brief Removes orphaned data from deleted users
+ * Removes orphaned data from deleted users
*/
namespace Friendica\Worker;
<?php
/**
* @file src/Worker/SpoolPost.php
- * @brief Posts items that wer spooled because they couldn't be posted.
+ * Posts items that where spooled because they couldn't be posted.
*/
namespace Friendica\Worker;
}
/**
- * @brief Does a commit
+ * Does a commit
*
* @return boolean Was the command executed successfully?
*/
use PHPUnit\Framework\TestCase;
/**
- * @brief ACLFormater utility testing class
+ * ACLFormater utility testing class
*/
class ACLFormaterTest extends TestCase
{
use PHPUnit\Framework\TestCase;
/**
- * @brief Array utility testing class
+ * Array utility testing class
*/
class ArraysTest extends TestCase
{
/**
- * @brief Tests if an empty array and an empty delimiter returns an empty string.
+ * Tests if an empty array and an empty delimiter returns an empty string.
*/
public function testEmptyArrayEmptyDelimiter()
{
}
/**
- * @brief Tests if an empty array and a non-empty delimiter returns an empty string.
+ * Tests if an empty array and a non-empty delimiter returns an empty string.
*/
public function testEmptyArrayNonEmptyDelimiter()
{
}
/**
- * @brief Tests if a non-empty array and an empty delimiter returns the value (1).
+ * Tests if a non-empty array and an empty delimiter returns the value (1).
*/
public function testNonEmptyArrayEmptyDelimiter()
{
}
/**
- * @brief Tests if a non-empty array and an empty delimiter returns the value (12).
+ * Tests if a non-empty array and an empty delimiter returns the value (12).
*/
public function testNonEmptyArray2EmptyDelimiter()
{
}
/**
- * @brief Tests if a non-empty array and a non-empty delimiter returns the value (1).
+ * Tests if a non-empty array and a non-empty delimiter returns the value (1).
*/
public function testNonEmptyArrayNonEmptyDelimiter()
{
}
/**
- * @brief Tests if a non-empty array and a non-empty delimiter returns the value (1,2).
+ * Tests if a non-empty array and a non-empty delimiter returns the value (1,2).
*/
public function testNonEmptyArray2NonEmptyDelimiter()
{
}
/**
- * @brief Tests if a 2-dim array and an empty delimiter returns the expected string.
+ * Tests if a 2-dim array and an empty delimiter returns the expected string.
*/
public function testEmptyMultiArray2EmptyDelimiter()
{
}
/**
- * @brief Tests if a 2-dim array and an empty delimiter returns the expected string.
+ * Tests if a 2-dim array and an empty delimiter returns the expected string.
*/
public function testEmptyMulti2Array2EmptyDelimiter()
{
}
/**
- * @brief Tests if a 2-dim array and a non-empty delimiter returns the expected string.
+ * Tests if a 2-dim array and a non-empty delimiter returns the expected string.
*/
public function testEmptyMultiArray2NonEmptyDelimiter()
{
}
/**
- * @brief Tests if a 2-dim array and a non-empty delimiter returns the expected string.
+ * Tests if a 2-dim array and a non-empty delimiter returns the expected string.
*/
public function testEmptyMulti2Array2NonEmptyDelimiter()
{
}
/**
- * @brief Tests if a 3-dim array and a non-empty delimiter returns the expected string.
+ * Tests if a 3-dim array and a non-empty delimiter returns the expected string.
*/
public function testEmptyMulti3Array2NonEmptyDelimiter()
{
use PHPUnit\Framework\TestCase;
/**
- * @brief Strings utility test class
+ * Strings utility test class
*/
class StringsTest extends TestCase
{
use PHPUnit\Framework\TestCase;
/**
- * @brief XML utility test class
+ * XML utility test class
*/
class XmlTest extends TestCase
{
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
/**
- * @brief Friendica people autocomplete
+ * Friendica people autocomplete
*
* require jQuery, jquery.textcomplete
*
<?php\r
/**\r
* @file view/theme/frio/php/modes/none.php\r
- * @brief The site template for pure content (e.g. (modals)\r
+ * The site template for pure content (e.g. (modals)\r
* \r
* This themplate is used e.g for bs modals. So outputs\r
* only the pure content\r
/*
-@fiel view/theme/frio/css/font-awesome.custom.css
-@brief This file applies Font Awesome icons to some friendica standard classes
+@file view/theme/frio/css/font-awesome.custom.css
+This file applies Font Awesome icons to some friendica standard classes
*/
.icon:before {
/**
- * @brief Javascript for the admin module
+ * Javascript for the admin module
*/
$(function() {
$('body').on('click', '.selectall', function() {
});
/**
- * @brief This function submits the form with the batch action values.
+ * This function submits the form with the batch action values.
*
* @param {string} name The name of the batch action.
* @param {string} value If it isn't empty the action will be posted.
/**
- * @brief Javascript for the display module
+ * Javascript for the display module
*/
// Catch the GUID from the URL
/**
* @file view/theme/frio/js/mod_events.js
- * @brief Initialization of the fullCalendar and format the output.
+ * Initialization of the fullCalendar and format the output.
*/
$(document).ready(function() {
/**
* @file view/theme/frio/js/mod_group.js
- * @brief The javascript for the group module
+ * The javascript for the group module
*/
});
/**
- * @brief Change the group membership of the contacts and fetch the new grup list
+ * Change the group membership of the contacts and fetch the new grup list
* as html
*
* @param {int} gid The group ID
}
/**
- * @brief Change the group list view mode
+ * Change the group list view mode
*
* @param {object} elm The button element of the view mode switcher
* @returns {undefined}
}
/**
- * @brief Filter the group member list for contacts
+ * Filter the group member list for contacts
*
* @returns {undefined}
*/
/**
- * @brief Javascript for the notifications module
+ * Javascript for the notifications module
*/
// Catch the intro ID from the URL
/**
- * @brief Contains functions for bootstrap modal handling.
+ * Contains functions for bootstrap modal handling.
*/
$(document).ready(function(){
// Clear bs modal on close.
};
/**
- * @brief Add first element with the class "heading" as modal title
+ * Add first element with the class "heading" as modal title
*
* Note: this should be really done in the template
* and is the solution where we havent done it until this
/*
- * @brief The file contains functions for text editing and commenting
+ * The file contains functions for text editing and commenting
*/
// Lifted from https://css-tricks.com/snippets/jquery/move-cursor-to-end-of-textarea-or-input/
<?php
/**
* @file view/theme/frio/php/Image.php
- * @brief contain methods to deal with images
+ * contain methods to deal with images
*/
/**
- * @brief This class contains methods to deal with images
+ * This class contains methods to deal with images
*/
use Friendica\Core\L10n;
class Image
{
/**
- * @brief Give all available options for the background image
+ * Give all available options for the background image
*
* @param array $arr Array with the present user settings
*
<?php
/**
* @file view/theme/frio/php/modes/default.php
- * @brief The default site template
+ * The default site template
*/
?>
<!DOCTYPE html >
/**
* @file view/theme/frio/php/frio_boot.php
*
- * @brief This file contains functions for page construction
+ * This file contains functions for page construction
*
*/
use Friendica\DI;
/**
- * @brief Load page template in dependence of the template mode
+ * Load page template in dependence of the template mode
*
* @todo Check if this is really needed.
*/
}
/**
- * @brief Check if page is a modal page
+ * Check if page is a modal page
*
* This function checks if $_REQUEST['pagename'] is
* a defined in a $modalpages
}
/**
- * @brief Array with modalpages
+ * Array with modalpages
*
* The array contains the page names of the pages
* which should displayed as modals
}
/**
- * @brief Array with standard pages
+ * Array with standard pages
*
* The array contains the page names of the pages
* which should displayed as standard-page
}
/**
- * @brief Check if page is standard page
+ * Check if page is standard page
*
* This function checks if $_REQUEST['pagename'] is
* a defined $standardpages
return $is_standard_page;
}
/**
- * @brief Get the typ of the page
+ * Get the typ of the page
*
* @param type $pagetitle
* @return string
<?php
/**
* @file view/theme/frio/php/modes/default.php
- * @brief The default site template
+ * The default site template
*/
?>
<!DOCTYPE html >
}
/**
- * @brief Replace friendica photo links hook
+ * Replace friendica photo links hook
*
* This function does replace the links to photos
* of other friendica users. Original the photos are
}
/**
- * @brief Replace links of the item_photo_menu hook
+ * Replace links of the item_photo_menu hook
*
* This function replaces the original poke and the message links
* to call the addToModal javascript function so this pages can
}
/**
- * @brief Replace links of the contact_photo_menu
+ * Replace links of the contact_photo_menu
*
* This function replaces the original poke and the message links
* to call the addToModal javascript function so this pages can
}
/**
- * @brief Construct remote nav menu
+ * Construct remote nav menu
*
* It creates a remote baseurl form $_SESSION for remote users and friendica
* visitors. This url will be added to some of the nav links. With this behaviour
}
/**
- * @brief Manipulate the data of the item
+ * Manipulate the data of the item
*
* At the moment we use this function to add some own stuff to the item menu
*