Elgg  Version 2.3
Functions | Variables
deprecated-1.9.php File Reference

Go to the source code of this file.

Functions

 full_url ()
 Return the full URL of the current page. More...
 
 elgg_register_entity_url_handler ($entity_type, $entity_subtype, $function_name)
 Sets the URL handler for a particular entity type and subtype. More...
 
 elgg_register_relationship_url_handler ($relationship_type, $function_name)
 Sets the URL handler for a particular relationship type. More...
 
 get_relationship_url ($id)
 Get the url for a given relationship. More...
 
 elgg_register_extender_url_handler ($extender_type, $extender_name, $function_name)
 Sets the URL handler for a particular extender type and name. More...
 
 get_extender_url (\ElggExtender $extender)
 Get the URL of a given elgg extender. More...
 
 get_annotation_url ($id)
 Get the URL for this annotation. More...
 
 elgg_register_metadata_url_handler ($extender_name, $function)
 Register a metadata url handler. More...
 
 elgg_register_annotation_url_handler ($extender_name="all", $function_name)
 Register an annotation url handler. More...
 
 get_group_members ($group_guid, $limit=10, $offset=0, $site_guid=0, $count=false)
 Return a list of this group's members. More...
 
 add_object_to_group ($group_guid, $object_guid)
 Add an object to the given group. More...
 
 remove_object_from_group ($group_guid, $object_guid)
 Remove an object from the given group. More...
 
 is_group_member ($group_guid, $user_guid)
 Return whether a given user is a member of the group or not. More...
 
 get_users_membership ($user_guid)
 Return all groups a user is a member of. More...
 
 user_is_friend ($user_guid, $friend_guid)
 Determines whether or not a user is another user's friend. More...
 
 get_user_friends ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0)
 Obtains a given user's friends. More...
 
 get_user_friends_of ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0)
 Obtains the people who have made a given user a friend. More...
 
 user_add_friend ($user_guid, $friend_guid)
 Adds a user to another user's friends list. More...
 
 user_remove_friend ($user_guid, $friend_guid)
 Removes a user from another user's friends list. More...
 
 add_site_user ($site_guid, $user_guid)
 Add a user to a site. More...
 
 remove_site_user ($site_guid, $user_guid)
 Remove a user from a site. More...
 
 add_site_object ($site_guid, $object_guid)
 Add an object to a site. More...
 
 remove_site_object ($site_guid, $object_guid)
 Remove an object from a site. More...
 
 get_site_objects ($site_guid, $subtype="", $limit=10, $offset=0)
 Get the objects belonging to a site. More...
 
 get_object_sites ($object_guid, $limit=10, $offset=0)
 Get the sites this object is part of. More...
 
 get_user_sites ($user_guid, $limit=10, $offset=0)
 Get the sites this user is part of. More...
 
 can_edit_extender ($extender_id, $type, $user_guid=0)
 Determines whether or not the specified user can edit the specified piece of extender. More...
 
 calculate_tag_size ($min, $max, $number_of_tags, $buckets=6)
 The algorithm working out the size of font based on the number of tags. More...
 
 generate_tag_cloud (array $tags, $buckets=6)
 This function generates an array of tags with a weighting. More...
 
 elgg_invalidate_metadata_cache ($action, array $options)
 Invalidate the metadata cache based on options passed to various *_metadata functions. More...
 
 get_metastring_id ($string, $case_sensitive=TRUE)
 Return the meta string id for a given tag, or false. More...
 
 add_metastring ($string, $case_sensitive=true)
 Add a metastring. More...
 
 get_metastring ($id)
 When given an ID, returns the corresponding metastring. More...
 
 get_user_friends_objects ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0, $timelower=0, $timeupper=0)
 Obtains a list of objects owned by a user's friends. More...
 
 count_user_friends_objects ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $timelower=0, $timeupper=0)
 Counts the number of objects owned by a user's friends. More...
 
 list_user_friends_objects ($user_guid, $subtype="", $limit=10, $full_view=true, $listtypetoggle=true, $pagination=true, $timelower=0, $timeupper=0)
 Displays a list of a user's friends' objects of a particular subtype, with navigation. More...
 
 elgg_geocode_location ($location)
 Encode a location into a latitude and longitude, caching the result. More...
 
 elgg_get_entities_from_location (array $options=array())
 Return entities within a given geographic area. More...
 
 elgg_list_entities_from_location (array $options=array())
 Returns a viewable list of entities from location. More...
 
 get_version ($humanreadable=false)
 Get the current Elgg version information. More...
 
 sanitise_string_special ($string, $extra_escapeable= '')
 Sanitise a string for database use, but with the option of escaping extra characters. More...
 
 setup_db_connections ()
 Establish database connections. More...
 
 optimize_table ($table)
 Optimize a table. More...
 
 get_day_start ($day=null, $month=null, $year=null)
 Return a timestamp for the start of a given day (defaults today). More...
 
 get_day_end ($day=null, $month=null, $year=null)
 Return a timestamp for the end of a given day (defaults today). More...
 
 get_notable_entities ($start_time, $end_time, $type="", $subtype="", $owner_guid=0, $order_by="asc", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
 Return the notable entities for a given time period. More...
 
 get_notable_entities_from_metadata ($start_time, $end_time, $meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 Return the notable entities for a given time period based on an item of metadata. More...
 
 get_noteable_entities_from_relationship ($start_time, $end_time, $relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
 Return the notable entities for a given time period based on their relationship. More...
 
 get_todays_entities ($type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
 Get all entities for today. More...
 
 get_todays_entities_from_metadata ($meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 Get entities for today from metadata. More...
 
 get_todays_entities_from_relationship ($relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
 Get entities for today from a relationship. More...
 
 list_notable_entities ($start_time, $end_time, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $navigation=true)
 Returns a viewable list of entities for a given time period. More...
 
 list_todays_entities ($type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $navigation=true)
 Return a list of today's entities. More...
 
 elgg_regenerate_simplecache ($viewtype=NULL)
 Regenerates the simple cache. More...
 
 elgg_get_filepath_cache ()
 private More...
 
 elgg_filepath_cache_reset ()
 private More...
 
 elgg_filepath_cache_save ($type, $data)
 private More...
 
 elgg_filepath_cache_load ($type)
 private More...
 
 elgg_enable_filepath_cache ()
 private More...
 
 elgg_disable_filepath_cache ()
 private More...
 
 unregister_entity_type ($type, $subtype)
 Unregisters an entity type and subtype as a public-facing type. More...
 
 already_attached ($guid_one, $guid_two)
 Function to determine if the object trying to attach to other, has already done so. More...
 
 get_attachments ($guid, $type="")
 Function to get all objects attached to a particular object. More...
 
 remove_attachment ($guid_one, $guid_two)
 Function to remove a particular attachment between two objects. More...
 
 make_attachment ($guid_one, $guid_two)
 Function to start the process of attaching one object to another. More...
 
 get_entity_url ($entity_guid)
 Returns the URL for an entity. More...
 
 delete_entity ($guid, $recursive=true)
 Delete an entity. More...
 
 enable_entity ($guid, $recursive=true)
 Enable an entity. More...
 
 can_edit_entity_metadata ($entity_guid, $user_guid=0, $metadata=null)
 Returns if $user_guid can edit the metadata on $entity_guid. More...
 
 disable_entity ($guid, $reason="", $recursive=true)
 Disable an entity. More...
 
 can_edit_entity ($entity_guid, $user_guid=0)
 Returns if $user_guid is able to edit $entity_guid. More...
 
 join_group ($group_guid, $user_guid)
 Join a user to a group. More...
 
 leave_group ($group_guid, $user_guid)
 Remove a user from a group. More...
 
 autop ($string)
 Create paragraphs from text with line spacing. More...
 
 expose_function ($method, $function, array $parameters=NULL, $description="", $call_method="GET", $require_api_auth=false, $require_user_auth=false)
 Register a function as a web service method. More...
 
 unexpose_function ($method)
 Unregister a web services method. More...
 
 register_service_handler ($handler, $function)
 Registers a web services handler. More...
 
 unregister_service_handler ($handler)
 Remove a web service To replace a web service handler, register the desired handler over the old on with register_service_handler(). More...
 
 create_site_entity ($guid, $name, $description, $url)
 Create or update the entities table for a given site. More...
 
 create_group_entity ($guid, $name, $description)
 Create or update the entities table for a given group. More...
 
 create_user_entity ($guid, $name, $username, $password, $salt, $email, $language, $code)
 Create or update the entities table for a given user. More...
 
 create_object_entity ($guid, $title, $description)
 Create or update the extras table for a given object. More...
 
 ODD_factory (XmlElement $element)
 Attempt to construct an ODD object out of a XmlElement or sub-elements. More...
 
 oddentity_to_elggentity (ODDEntity $element)
 Utility function used by import_entity_plugin_hook() to process an ODDEntity into an unsaved . More...
 
 ODD_Import ($xml)
 Import an ODD document. More...
 
 ODD_Export (ODDDocument $document)
 Export an ODD Document. More...
 
 get_uuid_from_object ($object)
 Get a UUID from a given object. More...
 
 guid_to_uuid ($guid)
 Generate a UUID from a given GUID. More...
 
 is_uuid_this_domain ($uuid)
 Test to see if a given uuid is for this domain, returning true if so. More...
 
 get_entity_from_uuid ($uuid)
 This function attempts to retrieve a previously imported entity via its UUID. More...
 
 add_uuid_to_guid ($guid, $uuid)
 Tag a previously created guid with the uuid it was imported on. More...
 
 _process_element (ODD $odd)
 This function processes an element, passing elements to the plugin stack to see if someone will process it. More...
 
 exportAsArray ($guid)
 Exports an entity as an array. More...
 
 export ($guid)
 Export a GUID. More...
 
 import ($xml)
 Import an XML serialisation of an object. More...
 
 _export_init ()
 Register the OpenDD import action. More...
 
 elgg_get_views ($dir, $base)
 Returns the name of views for in a directory. More...
 
 elgg_view_tree ($view_root, $viewtype="")
 Returns all views below a partial view. More...
 
 add_to_river ($view, $action_type, $subject_guid, $object_guid, $access_id="", $posted=0, $annotation_id=0, $target_guid=0)
 Adds an item to the river. More...
 
 serialise_object_to_xml ($data, $name="", $n=0)
 This function serialises an object recursively into an XML representation. More...
 
 serialise_array_to_xml (array $data, $n=0)
 Serialise an array. More...
 
 xml_to_object ($xml)
 Parse an XML file into an object. More...
 
 get_site_domain ($guid)
 Retrieve a site and return the domain portion of its url. More...
 
 register_notification_object ($entity_type, $object_subtype, $language_name)
 Register an entity type and subtype to be eligible for notifications. More...
 
 register_notification_interest ($user_guid, $author_guid)
 Establish a 'notify' relationship between the user and a content author. More...
 
 remove_notification_interest ($user_guid, $author_guid)
 Remove a 'notify' relationship between the user and a content author. More...
 
 object_notifications ($event, $object_type, $object)
 Automatically triggered notification on 'create' events that looks at registered objects and attempts to send notifications to anybody who's interested. More...
 
 register_notification_handler ($method, $handler, $params=NULL)
 This function registers a handler for a given notification type (eg "email") More...
 
 unregister_notification_handler ($method)
 This function unregisters a handler for a given notification type (eg "email") More...
 
 import_entity_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Import an entity. More...
 
 export_entity_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Exports all attributes of an entity. More...
 
 volatile_data_export_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Exports attributes generated on the fly (volatile) about an entity. More...
 
 export_annotation_plugin_hook ($hook, $type, $returnvalue, $params)
 Export the annotations for the specified entity. More...
 
 import_extender_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Handler called by trigger_plugin_hook on the "import" event. More...
 
 oddmetadata_to_elggextender (\ElggEntity $entity, ODDMetaData $element)
 Utility function used by import_extender_plugin_hook() to process an ODDMetaData and add it to an entity. More...
 
 export_metadata_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Handler called by trigger_plugin_hook on the "export" event. More...
 
 export_relationship_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Handler called by trigger_plugin_hook on the "export" event. More...
 
 import_relationship_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Handler called by trigger_plugin_hook on the "import" event. More...
 
 get_access_sql_suffix ($table_prefix= '', $owner=null)
 Returns the SQL where clause for a table with access_id and enabled columns. More...
 
 elgg_get_calling_plugin_id ($mainfilename=false)
 Get the name of the most recent plugin to be called in the call stack (or the plugin that owns the current page, if any). More...
 
 elgg_get_calling_plugin_entity ()
 Returns the entity of the last plugin called. More...
 

Variables

global $METASTRINGS_DEADNAME_CACHE = array()
 
const MILE 0.01515
 
const KILOMETER 0.00932
 
 $IMPORTED_DATA = array()
 
 $IMPORTED_OBJECT_COUNTER = 0
 
return function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks)
 

Function Documentation

_export_init ( )

Register the OpenDD import action.

Returns
void private

Definition at line 2883 of file deprecated-1.9.php.

_process_element ( ODD  $odd)

This function processes an element, passing elements to the plugin stack to see if someone will process it.

If nobody processes the top level element, the sub level elements are processed.

Parameters
ODD$oddThe odd element to process
Returns
bool private

Definition at line 2772 of file deprecated-1.9.php.

add_metastring (   $string,
  $case_sensitive = true 
)

Add a metastring.

It returns the id of the metastring. If it does not exist, it will be created.

Parameters
string$stringThe value (whatever that is) to be stored
bool$case_sensitiveDo we want to make the query case sensitive?
Returns
mixed Integer tag or false.

Definition at line 837 of file deprecated-1.9.php.

add_object_to_group (   $group_guid,
  $object_guid 
)

Add an object to the given group.

Parameters
int$group_guidThe group to add the object to.
int$object_guidThe guid of the elgg object (must be or a child thereof)
Returns
bool
Exceptions
InvalidClassException

Definition at line 298 of file deprecated-1.9.php.

add_site_object (   $site_guid,
  $object_guid 
)

Add an object to a site.

Parameters
int$site_guidSite GUID
int$object_guidObject GUID
Returns
mixed

Definition at line 561 of file deprecated-1.9.php.

add_site_user (   $site_guid,
  $user_guid 
)

Add a user to a site.

Parameters
int$site_guidSite guid
int$user_guidUser guid
Returns
bool

Definition at line 527 of file deprecated-1.9.php.

add_to_river (   $view,
  $action_type,
  $subject_guid,
  $object_guid,
  $access_id = "",
  $posted = 0,
  $annotation_id = 0,
  $target_guid = 0 
)

Adds an item to the river.

Parameters
string$viewThe view that will handle the river item (must exist)
string$action_typeAn arbitrary string to define the action (eg 'comment', 'create')
int$subject_guidThe GUID of the entity doing the action
int$object_guidThe GUID of the entity being acted upon
int$access_idThe access ID of the river item (default: same as the object)
int$postedThe UNIX epoch timestamp of the river item (default: now)
int$annotation_idThe annotation ID associated with this river entry
int$target_guidThe GUID of the the object entity's container
Returns
int/bool River ID or false on failure

Definition at line 2996 of file deprecated-1.9.php.

add_uuid_to_guid (   $guid,
  $uuid 
)

Tag a previously created guid with the uuid it was imported on.

Parameters
int$guidA GUID
string$uuidA Unique ID
Returns
bool

Definition at line 2747 of file deprecated-1.9.php.

already_attached (   $guid_one,
  $guid_two 
)

Function to determine if the object trying to attach to other, has already done so.

Parameters
int$guid_oneThis is the target object
int$guid_twoThis is the object trying to attach to $guid_one
Returns
bool private

Definition at line 1896 of file deprecated-1.9.php.

autop (   $string)

Create paragraphs from text with line spacing.

Parameters
string$stringThe string
Returns
string

Definition at line 2172 of file deprecated-1.9.php.

calculate_tag_size (   $min,
  $max,
  $number_of_tags,
  $buckets = 6 
)

The algorithm working out the size of font based on the number of tags.

This is quick and dirty.

Parameters
int$minMin size
int$maxMax size
int$number_of_tagsThe number of tags
int$bucketsThe number of buckets
Returns
int private

Definition at line 736 of file deprecated-1.9.php.

can_edit_entity (   $entity_guid,
  $user_guid = 0 
)

Returns if $user_guid is able to edit $entity_guid.

Can be overridden by registering for the permissions_check plugin hook.

Warning
If a $user_guid is not passed it will default to the logged in user.
Parameters
int$entity_guidThe GUID of the entity
int$user_guidThe GUID of the user
Returns
bool

Definition at line 2113 of file deprecated-1.9.php.

can_edit_entity_metadata (   $entity_guid,
  $user_guid = 0,
  $metadata = null 
)

Returns if $user_guid can edit the metadata on $entity_guid.

Can be overridden by by registering for the permissions_check:metadata plugin hook.

Warning
If a $user_guid isn't specified, the currently logged in user is used.
Parameters
int$entity_guidThe GUID of the entity
int$user_guidThe GUID of the user
\ElggMetadata$metadataThe metadata to specifically check (if any; default null)
Returns
bool Whether the user can edit metadata on the entity.

Definition at line 2061 of file deprecated-1.9.php.

can_edit_extender (   $extender_id,
  $type,
  $user_guid = 0 
)

Determines whether or not the specified user can edit the specified piece of extender.

Parameters
int$extender_idThe ID of the piece of extender
string$type'metadata' or 'annotation'
int$user_guidThe GUID of the user
Returns
bool

Definition at line 676 of file deprecated-1.9.php.

count_user_friends_objects (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $timelower = 0,
  $timeupper = 0 
)

Counts the number of objects owned by a user's friends.

Parameters
int$user_guidThe GUID of the user to get the friends of
string$subtypeOptionally, the subtype of objects
int$timelowerThe earliest time the entity can have been created. Default: all
int$timeupperThe latest time the entity can have been created. Default: all
Returns
int The number of objects

Definition at line 910 of file deprecated-1.9.php.

create_group_entity (   $guid,
  $name,
  $description 
)

Create or update the entities table for a given group.

Call create_entity first.

Parameters
int$guidGUID
string$nameName
string$descriptionDescription
Returns
bool private

Definition at line 2315 of file deprecated-1.9.php.

create_object_entity (   $guid,
  $title,
  $description 
)

Create or update the extras table for a given object.

Call create_entity first.

Parameters
int$guidThe guid of the entity you're creating (as obtained by create_entity)
string$titleThe title of the object
string$descriptionThe object's description
Returns
bool private

Definition at line 2443 of file deprecated-1.9.php.

create_site_entity (   $guid,
  $name,
  $description,
  $url 
)

Create or update the entities table for a given site.

Call create_entity first.

Parameters
int$guidSite GUID
string$nameSite name
string$descriptionSite Description
string$urlURL of the site
Returns
bool private

Definition at line 2253 of file deprecated-1.9.php.

create_user_entity (   $guid,
  $name,
  $username,
  $password,
  $salt,
  $email,
  $language,
  $code 
)

Create or update the entities table for a given user.

Call create_entity first.

Parameters
int$guidThe user's GUID
string$nameThe user's display name
string$usernameThe username
string$passwordThe password
string$saltA salt for the password
string$emailThe user's email address
string$languageThe user's default language
string$codeA code
Returns
bool private

Definition at line 2378 of file deprecated-1.9.php.

delete_entity (   $guid,
  $recursive = true 
)

Delete an entity.

Removes an entity and its metadata, annotations, relationships, river entries, and private data.

Optionally can remove entities contained and owned by $guid.

Warning
If deleting recursively, this bypasses ownership of items contained by the entity. That means that if the container_guid = $guid, the item will be deleted regardless of who owns it.
Parameters
int$guidThe guid of the entity to delete
bool$recursiveIf true (default) then all entities which are owned or contained by $guid will also be deleted.
Returns
bool private

Definition at line 2007 of file deprecated-1.9.php.

disable_entity (   $guid,
  $reason = "",
  $recursive = true 
)

Disable an entity.

Disabled entities do not show up in list or elgg_get_entities() calls, but still exist in the database.

Entities are disabled by setting disabled = yes in the entities table.

You can ignore the disabled field by using access_show_hidden_entities().

Parameters
int$guidThe guid
string$reasonOptional reason
bool$recursiveRecursively disable all entities owned or contained by $guid?
Returns
bool
See also
access_show_hidden_entities() private

Definition at line 2090 of file deprecated-1.9.php.

elgg_disable_filepath_cache ( )

private

Definition at line 1864 of file deprecated-1.9.php.

elgg_enable_filepath_cache ( )

private

Definition at line 1856 of file deprecated-1.9.php.

elgg_filepath_cache_load (   $type)

private

Definition at line 1848 of file deprecated-1.9.php.

elgg_filepath_cache_reset ( )

private

Definition at line 1832 of file deprecated-1.9.php.

elgg_filepath_cache_save (   $type,
  $data 
)

private

Definition at line 1840 of file deprecated-1.9.php.

elgg_geocode_location (   $location)

Encode a location into a latitude and longitude, caching the result.

Works by triggering the 'geocode' 'location' plugin hook, and requires a geocoding plugin to be installed.

Parameters
string$locationThe location, e.g. "London", or "24 Foobar Street, Gotham City"
Returns
string|false

Definition at line 972 of file deprecated-1.9.php.

elgg_get_calling_plugin_entity ( )

Returns the entity of the last plugin called.

Returns
ElggPlugin|false
Since
1.8.0 private

Register the import hook

Register the hook, ensuring entities are serialised first

Hook to get certain named bits of volatile data about an entity

Definition at line 3688 of file deprecated-1.9.php.

elgg_get_calling_plugin_id (   $mainfilename = false)

Get the name of the most recent plugin to be called in the call stack (or the plugin that owns the current page, if any).

i.e., if the last plugin was in /mod/foobar/, this would return foo_bar.

Parameters
boolean$mainfilenameIf set to true, this will instead determine the context from the main script filename called by the browser. Default = false.
Returns
string|false Plugin name, or false if no plugin name was called
Since
1.8.0 private

Definition at line 3651 of file deprecated-1.9.php.

elgg_get_entities_from_location ( array  $options = array())

Return entities within a given geographic area.

Also accepts all options available to elgg_get_entities().

See also
elgg_get_entities
Parameters
array$optionsArray in format:
latitude => FLOAT Latitude of the location

longitude => FLOAT Longitude of the location

distance => FLOAT/ARR ( latitude => float, longitude => float, ) The distance in degrees that determines the search box. A single float will result in a square in degrees.

Warning
The Earth is round.
See also
::setLatLong()
Returns
mixed If count, int. If not count, array. false on errors.
Since
1.8.0

Definition at line 1036 of file deprecated-1.9.php.

elgg_get_filepath_cache ( )

private

Definition at line 1824 of file deprecated-1.9.php.

elgg_get_views (   $dir,
  $base 
)

Returns the name of views for in a directory.

Use this to get all namespaced views under the first element.

Parameters
string$dirThe main directory that holds the views. (mod/profile/views/)
string$baseThe root name of the view to use, without the viewtype. (profile)
Returns
array
Since
1.7.0

Definition at line 2904 of file deprecated-1.9.php.

elgg_invalidate_metadata_cache (   $action,
array  $options 
)

Invalidate the metadata cache based on options passed to various *_metadata functions.

Parameters
string$actionAction performed on metadata. "delete", "disable", or "enable"
array$optionsOptions passed to elgg_(delete|disable|enable)_metadata
Returns
void

Definition at line 804 of file deprecated-1.9.php.

elgg_list_entities_from_location ( array  $options = array())

Returns a viewable list of entities from location.

Parameters
array$optionsOptions array
See also
elgg_list_entities()
elgg_get_entities_from_location()
Returns
string The viewable list of entities
Since
1.8.0

Definition at line 1107 of file deprecated-1.9.php.

elgg_regenerate_simplecache (   $viewtype = NULL)

Regenerates the simple cache.

Not required any longer since cached files are created on demand.

Warning
This does not invalidate the cache, but actively rebuilds it.
Parameters
string$viewtypeOptional viewtype to regenerate. Defaults to all valid viewtypes.
Returns
void
Since
1.8.0

Definition at line 1815 of file deprecated-1.9.php.

elgg_register_annotation_url_handler (   $extender_name = "all",
  $function_name 
)

Register an annotation url handler.

Parameters
string$extender_nameThe name, default 'all'.
string$function_nameThe function.
Returns
string

Definition at line 251 of file deprecated-1.9.php.

elgg_register_entity_url_handler (   $entity_type,
  $entity_subtype,
  $function_name 
)

Sets the URL handler for a particular entity type and subtype.

Parameters
string$entity_typeThe entity type
string$entity_subtypeThe entity subtype
string$function_nameThe function to register
Returns
bool Depending on success
See also
get_entity_url()
::getURL()
Since
1.8.0

Definition at line 37 of file deprecated-1.9.php.

elgg_register_extender_url_handler (   $extender_type,
  $extender_name,
  $function_name 
)

Sets the URL handler for a particular extender type and name.

It is recommended that you do not call this directly, instead use one of the wrapper functions such as elgg_register_annotation_url_handler().

Parameters
string$extender_typeExtender type ('annotation', 'metadata')
string$extender_nameThe name of the extender
string$function_nameThe function to register
Returns
bool

Definition at line 142 of file deprecated-1.9.php.

elgg_register_metadata_url_handler (   $extender_name,
  $function 
)

Register a metadata url handler.

Parameters
string$extender_nameThe name, default 'all'.
string$functionThe function name.
Returns
bool

Definition at line 237 of file deprecated-1.9.php.

elgg_register_relationship_url_handler (   $relationship_type,
  $function_name 
)

Sets the URL handler for a particular relationship type.

Parameters
string$relationship_typeThe relationship type.
string$function_nameThe function to register
Returns
bool Depending on success

Definition at line 67 of file deprecated-1.9.php.

elgg_view_tree (   $view_root,
  $viewtype = "" 
)

Returns all views below a partial view.

Settings $view_root = 'profile' will show all available views under the "profile" namespace.

Parameters
string$view_rootThe root view
string$viewtypeOptionally specify a view type other than the current one.
Returns
array A list of view names underneath that root view

Definition at line 2941 of file deprecated-1.9.php.

enable_entity (   $guid,
  $recursive = true 
)

Enable an entity.

Warning
In order to enable an entity using ::enable(), you must first use access_show_hidden_entities().
Parameters
int$guidGUID of entity to enable
bool$recursiveRecursively enable all entities disabled with the entity?
Returns
bool

Definition at line 2028 of file deprecated-1.9.php.

export (   $guid)

Export a GUID.

This function exports a GUID and all information related to it in an XML format.

This function makes use of the "serialise" plugin hook, which is passed an array to which plugins should add data to be serialised to.

Parameters
int$guidThe GUID.
Returns
string XML
See also
for an example of its usage. private

Definition at line 2835 of file deprecated-1.9.php.

export_annotation_plugin_hook (   $hook,
  $type,
  $returnvalue,
  $params 
)

Export the annotations for the specified entity.

Parameters
string$hook'export'
string$type'all'
mixed$returnvalueDefault return value
mixed$paramsParameters determining what annotations to export

export all

Returns
array
Exceptions
InvalidParameterExceptionprivate

Definition at line 3401 of file deprecated-1.9.php.

export_entity_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Exports all attributes of an entity.

Warning
Only exports fields in the entity and entity type tables.
Parameters
string$hookexport
string$entity_typeall
mixed$returnvaluePrevious hook return value
array$paramsParameters

export all

Returns
mixed private
Exceptions
InvalidParameterException|InvalidClassException

Definition at line 3313 of file deprecated-1.9.php.

export_metadata_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Handler called by trigger_plugin_hook on the "export" event.

Parameters
string$hookexport
string$entity_typeall
mixed$returnvalueValue returned from previous hook
mixed$paramsParams
Returns
array private
Exceptions
InvalidParameterException

Definition at line 3525 of file deprecated-1.9.php.

export_relationship_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Handler called by trigger_plugin_hook on the "export" event.

Parameters
string$hookexport
string$entity_typeall
mixed$returnvaluePrevious hook return value
array$paramsParameters

export all

Returns
mixed
Exceptions
InvalidParameterExceptionprivate

Definition at line 3564 of file deprecated-1.9.php.

exportAsArray (   $guid)

Exports an entity as an array.

Parameters
int$guidEntity GUID
Returns
array
Exceptions
ExportExceptionprivate

Definition at line 2805 of file deprecated-1.9.php.

expose_function (   $method,
  $function,
array  $parameters = NULL,
  $description = "",
  $call_method = "GET",
  $require_api_auth = false,
  $require_user_auth = false 
)

Register a function as a web service method.

Definition at line 2182 of file deprecated-1.9.php.

full_url ( )

Return the full URL of the current page.

Returns
string The URL

Definition at line 11 of file deprecated-1.9.php.

generate_tag_cloud ( array  $tags,
  $buckets = 6 
)

This function generates an array of tags with a weighting.

Parameters
array$tagsThe array of tags.
int$bucketsThe number of buckets
Returns
array An associated array of tags with a weighting, this can then be mapped to a display class. private

Definition at line 770 of file deprecated-1.9.php.

get_access_sql_suffix (   $table_prefix = '',
  $owner = null 
)

Returns the SQL where clause for a table with access_id and enabled columns.

This handles returning where clauses for ACCESS_FRIENDS in addition to using get_access_list() for access collections and the standard access levels.

Note that if this code is executed in privileged mode it will return (1=1).

Parameters
string$table_prefixOptional table prefix for the access code.
int$ownerOptional user guid to get access information for. Defaults to logged in user.
Returns
string private

Definition at line 3628 of file deprecated-1.9.php.

get_annotation_url (   $id)

Get the URL for this annotation.

Parameters
int$idAnnotation id
Returns
string|bool False on failure

Definition at line 218 of file deprecated-1.9.php.

get_attachments (   $guid,
  $type = "" 
)

Function to get all objects attached to a particular object.

Parameters
int$guidEntity GUID
string$typeThe type of object to return e.g. 'file', 'friend_of' etc
Returns
ElggObject[] array of objects private

Definition at line 1915 of file deprecated-1.9.php.

get_day_end (   $day = null,
  $month = null,
  $year = null 
)

Return a timestamp for the end of a given day (defaults today).

Parameters
int$dayDay
int$monthMonth
int$yearYear
Returns
int private

Definition at line 1245 of file deprecated-1.9.php.

get_day_start (   $day = null,
  $month = null,
  $year = null 
)

Return a timestamp for the start of a given day (defaults today).

Parameters
int$dayDay
int$monthMonth
int$yearYear
Returns
int private

Definition at line 1229 of file deprecated-1.9.php.

get_entity_from_uuid (   $uuid)

This function attempts to retrieve a previously imported entity via its UUID.

Parameters
string$uuidA unique ID
Returns
|false

Definition at line 2724 of file deprecated-1.9.php.

get_entity_url (   $entity_guid)

Returns the URL for an entity.

Parameters
int$entity_guidThe GUID of the entity
Returns
string The URL of the entity

Definition at line 1978 of file deprecated-1.9.php.

get_extender_url ( \ElggExtender  $extender)

Get the URL of a given elgg extender.

Used by get_annotation_url and get_metadata_url.

Parameters
\ElggExtender$extenderAn extender object
Returns
string

Definition at line 171 of file deprecated-1.9.php.

get_group_members (   $group_guid,
  $limit = 10,
  $offset = 0,
  $site_guid = 0,
  $count = false 
)

Return a list of this group's members.

Parameters
int$group_guidThe ID of the container/group.
int$limitThe limit
int$offsetThe offset
int$site_guidThe site
bool$countReturn the users (false) or the count of them (true)
Returns
mixed

Definition at line 268 of file deprecated-1.9.php.

get_metastring (   $id)

When given an ID, returns the corresponding metastring.

Parameters
int$idMetastring ID
Returns
string Metastring

Definition at line 850 of file deprecated-1.9.php.

get_metastring_id (   $string,
  $case_sensitive = TRUE 
)

Return the meta string id for a given tag, or false.

Parameters
string$stringThe value to store
bool$case_sensitiveDo we want to make the query case sensitive? If not there may be more than one result
Returns
int|array|false meta string id, array of ids or false if none found

Definition at line 822 of file deprecated-1.9.php.

get_notable_entities (   $start_time,
  $end_time,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "asc",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0,
  $container_guid = null 
)

Return the notable entities for a given time period.

Parameters
int$start_timeThe start time as a unix timestamp.
int$end_timeThe end time as a unix timestamp.
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
string$order_byThe field to order by; by default, time_created desc
int$limitThe number of entities to return; 10 by default
int$offsetThe indexing offset, 0 by default
boolean$countSet to true to get a count instead of entities. Defaults to false.
int$site_guidSite to get entities for. Default 0 = current site. -1 = any.
mixed$container_guidContainer or containers to get entities from (default: any).
Returns
array|false private

Definition at line 1271 of file deprecated-1.9.php.

get_notable_entities_from_metadata (   $start_time,
  $end_time,
  $meta_name,
  $meta_value = "",
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false 
)

Return the notable entities for a given time period based on an item of metadata.

Parameters
int$start_timeThe start time as a unix timestamp.
int$end_timeThe end time as a unix timestamp.
mixed$meta_nameMetadata name
mixed$meta_valueMetadata value
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner GUID
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite to get entities for. Default 0 = current site. -1 = any.
bool$countIf true, returns count instead of entities. (Default: false)
Returns
int|array A list of entities, or a count if $count is set to true private

Definition at line 1421 of file deprecated-1.9.php.

get_noteable_entities_from_relationship (   $start_time,
  $end_time,
  $relationship,
  $relationship_guid,
  $inverse_relationship = false,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0 
)

Return the notable entities for a given time period based on their relationship.

Parameters
int$start_timeThe start time as a unix timestamp.
int$end_timeThe end time as a unix timestamp.
string$relationshipThe relationship eg "friends_of"
int$relationship_guidThe guid of the entity to use query
bool$inverse_relationshipReverse the normal function of the query to say "give me all entities for whom $relationship_guid is a $relationship of"
string$typeEntity type
string$subtypeEntity subtype
int$owner_guidOwner GUID
string$order_byOptional Order by
int$limitLimit
int$offsetOffset
boolean$countIf true returns a count of entities (default false)
int$site_guidSite to get entities for. Default 0 = current site. -1 = any
Returns
array|int|false An array of entities, or the number of entities, or false on failure private

Definition at line 1553 of file deprecated-1.9.php.

get_object_sites (   $object_guid,
  $limit = 10,
  $offset = 0 
)

Get the sites this object is part of.

Parameters
int$object_guidThe object's GUID
int$limitNumber of results to return
int$offsetAny indexing offset
Returns
array On success, an array of

Definition at line 624 of file deprecated-1.9.php.

get_relationship_url (   $id)

Get the url for a given relationship.

Parameters
int$idRelationship ID
Returns
string

Definition at line 92 of file deprecated-1.9.php.

get_site_domain (   $guid)

Retrieve a site and return the domain portion of its url.

Parameters
int$guidGUID
Returns
string

Definition at line 3135 of file deprecated-1.9.php.

get_site_objects (   $site_guid,
  $subtype = "",
  $limit = 10,
  $offset = 0 
)

Get the objects belonging to a site.

Parameters
int$site_guidSite GUID
string$subtypeSubtype
int$limitLimit
int$offsetOffset
Returns
mixed

Definition at line 597 of file deprecated-1.9.php.

get_todays_entities (   $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0,
  $container_guid = null 
)

Get all entities for today.

Parameters
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
string$order_byThe field to order by; by default, time_created desc
int$limitThe number of entities to return; 10 by default
int$offsetThe indexing offset, 0 by default
boolean$countIf true returns a count of entities (default false)
int$site_guidSite to get entities for. Default 0 = current site. -1 = any
mixed$container_guidContainer(s) to get entities from (default: any).
Returns
array|false private

Definition at line 1665 of file deprecated-1.9.php.

get_todays_entities_from_metadata (   $meta_name,
  $meta_value = "",
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false 
)

Get entities for today from metadata.

Parameters
mixed$meta_nameMetadata name
mixed$meta_valueMetadata value
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner GUID
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite to get entities for. Default 0 = current site. -1 = any.
bool$countIf true, returns count instead of entities. (Default: false)
Returns
int|array A list of entities, or a count if $count is set to true private

Definition at line 1694 of file deprecated-1.9.php.

get_todays_entities_from_relationship (   $relationship,
  $relationship_guid,
  $inverse_relationship = false,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0 
)

Get entities for today from a relationship.

Parameters
string$relationshipThe relationship eg "friends_of"
int$relationship_guidThe guid of the entity to use query
bool$inverse_relationshipReverse the normal function of the query to say "give me all entities for whom $relationship_guid is a $relationship of"
string$typeEntity type
string$subtypeEntity subtype
int$owner_guidOwner GUID
string$order_byOptional Order by
int$limitLimit
int$offsetOffset
boolean$countIf true returns a count of entities (default false)
int$site_guidSite to get entities for. Default 0 = current site. -1 = any
Returns
array|int|false An array of entities, or the number of entities, or false on failure private

Definition at line 1727 of file deprecated-1.9.php.

get_user_friends (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $limit = 10,
  $offset = 0 
)

Obtains a given user's friends.

Parameters
int$user_guidThe user's GUID
string$subtypeThe subtype of users, if any
int$limitNumber of results to return (default 10)
int$offsetIndexing offset, if any
Returns
[]|false Either an array of or false, depending on success

Definition at line 425 of file deprecated-1.9.php.

get_user_friends_objects (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $limit = 10,
  $offset = 0,
  $timelower = 0,
  $timeupper = 0 
)

Obtains a list of objects owned by a user's friends.

Parameters
int$user_guidThe GUID of the user to get the friends of
string$subtypeOptionally, the subtype of objects
int$limitThe number of results to return (default 10)
int$offsetIndexing offset, if any
int$timelowerThe earliest time the entity can have been created. Default: all
int$timeupperThe latest time the entity can have been created. Default: all
Returns
[]|false An array of or false, depending on success

Definition at line 882 of file deprecated-1.9.php.

get_user_friends_of (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $limit = 10,
  $offset = 0 
)

Obtains the people who have made a given user a friend.

Parameters
int$user_guidThe user's GUID
string$subtypeThe subtype of users, if any
int$limitNumber of results to return (default 10)
int$offsetIndexing offset, if any
Returns
[]|false Either an array of or false, depending on success

Definition at line 450 of file deprecated-1.9.php.

get_user_sites (   $user_guid,
  $limit = 10,
  $offset = 0 
)

Get the sites this user is part of.

Parameters
int$user_guidThe user's GUID
int$limitNumber of results to return
int$offsetAny indexing offset
Returns
[]|false On success, an array of

Definition at line 649 of file deprecated-1.9.php.

get_users_membership (   $user_guid)

Return all groups a user is a member of.

Parameters
int$user_guidGUID of user
Returns
array|false

Definition at line 388 of file deprecated-1.9.php.

get_uuid_from_object (   $object)

Get a UUID from a given object.

Parameters
mixed$objectThe object either an , or
Returns
string|false the UUID or false

Definition at line 2666 of file deprecated-1.9.php.

get_version (   $humanreadable = false)

Get the current Elgg version information.

Parameters
bool$humanreadableWhether to return a human readable version (default: false)
Returns
string|false Depending on success

Definition at line 1126 of file deprecated-1.9.php.

guid_to_uuid (   $guid)

Generate a UUID from a given GUID.

Parameters
int$guidThe GUID of an object.
Returns
string

Definition at line 2694 of file deprecated-1.9.php.

import (   $xml)

Import an XML serialisation of an object.

This will make a best attempt at importing a given xml doc.

Parameters
string$xmlXML string
Returns
bool
Exceptions
ImportExceptionif there was a problem importing the data. private

Definition at line 2853 of file deprecated-1.9.php.

import_entity_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Import an entity.

This function checks the passed XML doc (as array) to see if it is a user, if so it constructs a new elgg user and returns "true" to inform the importer that it's been handled.

Parameters
string$hookimport
string$entity_typeall
mixed$returnvalueValue from previous hook
mixed$paramsArray of params
Returns
mixed import all
Exceptions
ImportException

Definition at line 3268 of file deprecated-1.9.php.

import_extender_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Handler called by trigger_plugin_hook on the "import" event.

Parameters
string$hookvolatile
string$entity_typemetadata
string$returnvalueReturn value from previous hook
array$paramsThe parameters
Returns
null volatile metadata
Exceptions
ImportExceptionprivate

Definition at line 3443 of file deprecated-1.9.php.

import_relationship_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Handler called by trigger_plugin_hook on the "import" event.

Parameters
string$hookimport
string$entity_typeall
mixed$returnvalueValue from previous hook
mixed$paramsArray of params
Returns
mixed private

Definition at line 3599 of file deprecated-1.9.php.

is_group_member (   $group_guid,
  $user_guid 
)

Return whether a given user is a member of the group or not.

Parameters
int$group_guidThe group ID
int$user_guidThe user guid
Returns
bool

Definition at line 369 of file deprecated-1.9.php.

is_uuid_this_domain (   $uuid)

Test to see if a given uuid is for this domain, returning true if so.

Parameters
string$uuidA unique ID
Returns
bool

Definition at line 2707 of file deprecated-1.9.php.

join_group (   $group_guid,
  $user_guid 
)

Join a user to a group.

Parameters
int$group_guidThe group GUID.
int$user_guidThe user GUID.
Returns
bool

Definition at line 2131 of file deprecated-1.9.php.

leave_group (   $group_guid,
  $user_guid 
)

Remove a user from a group.

Parameters
int$group_guidThe group.
int$user_guidThe user.
Returns
bool Whether the user was removed from the group.

Definition at line 2153 of file deprecated-1.9.php.

list_notable_entities (   $start_time,
  $end_time,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $navigation = true 
)

Returns a viewable list of entities for a given time period.

See also
elgg_view_entity_list
Parameters
int$start_timeThe start time as a unix timestamp.
int$end_timeThe end time as a unix timestamp.
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
int$limitThe number of entities to return; 10 by default
boolean$fullviewWhether or not to display the full view (default: true)
boolean$listtypetoggleWhether or not to allow gallery view
boolean$navigationDisplay pagination? Default: true
Returns
string A viewable list of entities private

Definition at line 1759 of file deprecated-1.9.php.

list_todays_entities (   $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $navigation = true 
)

Return a list of today's entities.

See also
list_notable_entities
Parameters
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
int$limitThe number of entities to return; 10 by default
boolean$fullviewWhether or not to display the full view (default: true)
boolean$listtypetoggleWhether or not to allow gallery view
boolean$navigationDisplay pagination? Default: true
Returns
string A viewable list of entities private

Definition at line 1791 of file deprecated-1.9.php.

list_user_friends_objects (   $user_guid,
  $subtype = "",
  $limit = 10,
  $full_view = true,
  $listtypetoggle = true,
  $pagination = true,
  $timelower = 0,
  $timeupper = 0 
)

Displays a list of a user's friends' objects of a particular subtype, with navigation.

See also
elgg_view_entity_list
Parameters
int$user_guidThe GUID of the user
string$subtypeThe object subtype
int$limitThe number of entities to display on a page
bool$full_viewWhether or not to display the full view (default: true)
bool$listtypetoggleWhether or not to allow you to flip to gallery mode (default: true)
bool$paginationWhether to display pagination (default: true)
int$timelowerThe earliest time the entity can have been created. Default: all
int$timeupperThe latest time the entity can have been created. Default: all
Returns
string

Definition at line 943 of file deprecated-1.9.php.

make_attachment (   $guid_one,
  $guid_two 
)

Function to start the process of attaching one object to another.

Parameters
int$guid_oneThis is the target object
int$guid_twoThis is the object trying to attach to $guid_one
Returns
true|void private

Definition at line 1961 of file deprecated-1.9.php.

object_notifications (   $event,
  $object_type,
  $object 
)

Automatically triggered notification on 'create' events that looks at registered objects and attempts to send notifications to anybody who's interested.

See also
register_notification_object
Parameters
string$eventcreate
string$object_typemixed
mixed$objectThe object created
Returns
bool private

Definition at line 3210 of file deprecated-1.9.php.

ODD_Export ( ODDDocument  $document)

Export an ODD Document.

Parameters
ODDDocument$documentThe Document.
Returns
string private

Definition at line 2653 of file deprecated-1.9.php.

ODD_factory ( XmlElement  $element)

Attempt to construct an ODD object out of a XmlElement or sub-elements.

Parameters
XmlElement$elementThe element(s)
Returns
mixed An ODD object if the element can be handled, or false. private

Definition at line 2496 of file deprecated-1.9.php.

ODD_Import (   $xml)

Import an ODD document.

Parameters
string$xmlThe XML ODD.
Returns
ODDDocument private

Definition at line 2611 of file deprecated-1.9.php.

oddentity_to_elggentity ( ODDEntity  $element)

Utility function used by import_entity_plugin_hook() to process an ODDEntity into an unsaved .

Parameters
ODDEntity$elementThe OpenDD element
Returns
the unsaved entity which should be populated by items.
Exceptions
ClassException|InstallationException|ImportException

Definition at line 2547 of file deprecated-1.9.php.

oddmetadata_to_elggextender ( \ElggEntity  $entity,
ODDMetaData  $element 
)

Utility function used by import_extender_plugin_hook() to process an ODDMetaData and add it to an entity.

This function does not hit ->save() on the entity (this lets you construct in memory)

Parameters
\ElggEntity$entityThe entity to add the data to.
ODDMetaData$elementThe OpenDD element
Returns
bool private

Definition at line 3482 of file deprecated-1.9.php.

optimize_table (   $table)

Optimize a table.

Executes an OPTIMIZE TABLE query on $table. Useful after large DB changes.

Parameters
string$tableThe name of the table to optimise
Returns
bool private

Definition at line 1177 of file deprecated-1.9.php.

register_notification_handler (   $method,
  $handler,
  $params = NULL 
)

This function registers a handler for a given notification type (eg "email")

Parameters
string$methodThe method
string$handlerThe handler function, in the format "handler(\ElggEntity $from, \ElggUser $to, $subject, $message, array $params = NULL)". This function should return false on failure, and true/a tracking message ID on success.
array$paramsAn associated array of other parameters for this handler defining some properties eg. supported msg length or rich text support.
Returns
bool

Definition at line 3228 of file deprecated-1.9.php.

register_notification_interest (   $user_guid,
  $author_guid 
)

Establish a 'notify' relationship between the user and a content author.

Parameters
int$user_guidThe GUID of the user who wants to follow a user's content
int$author_guidThe GUID of the user whose content the user wants to follow
Returns
bool Depending on success

Definition at line 3177 of file deprecated-1.9.php.

register_notification_object (   $entity_type,
  $object_subtype,
  $language_name 
)

Register an entity type and subtype to be eligible for notifications.

Parameters
string$entity_typeThe type of entity
string$object_subtypeIts subtype
string$language_nameIts localized notification string (eg "New blog post")
Returns
void

Definition at line 3161 of file deprecated-1.9.php.

register_service_handler (   $handler,
  $function 
)

Registers a web services handler.

Parameters
string$handlerWeb services type
string$functionYour function name
Returns
bool Depending on success

Definition at line 2217 of file deprecated-1.9.php.

remove_attachment (   $guid_one,
  $guid_two 
)

Function to remove a particular attachment between two objects.

Parameters
int$guid_oneThis is the target object
int$guid_twoThis is the object to remove from $guid_one
Returns
void private

Definition at line 1944 of file deprecated-1.9.php.

remove_notification_interest (   $user_guid,
  $author_guid 
)

Remove a 'notify' relationship between the user and a content author.

Parameters
int$user_guidThe GUID of the user who is following a user's content
int$author_guidThe GUID of the user whose content the user wants to unfollow
Returns
bool Depending on success

Definition at line 3191 of file deprecated-1.9.php.

remove_object_from_group (   $group_guid,
  $object_guid 
)

Remove an object from the given group.

Parameters
int$group_guidThe group to remove the object from
int$object_guidThe object to remove
Returns
bool
Exceptions
InvalidClassException

Definition at line 334 of file deprecated-1.9.php.

remove_site_object (   $site_guid,
  $object_guid 
)

Remove an object from a site.

Parameters
int$site_guidSite GUID
int$object_guidObject GUID
Returns
bool

Definition at line 578 of file deprecated-1.9.php.

remove_site_user (   $site_guid,
  $user_guid 
)

Remove a user from a site.

Parameters
int$site_guidSite GUID
int$user_guidUser GUID
Returns
bool

Definition at line 544 of file deprecated-1.9.php.

sanitise_string_special (   $string,
  $extra_escapeable = '' 
)

Sanitise a string for database use, but with the option of escaping extra characters.

Parameters
string$stringThe string to sanitise
string$extra_escapeableExtra characters to escape with '\'
Returns
string The escaped string

Definition at line 1140 of file deprecated-1.9.php.

serialise_array_to_xml ( array  $data,
  $n = 0 
)

Serialise an array.

Parameters
array$dataThe data to serialize
int$nUsed for recursion
Returns
string

Definition at line 3075 of file deprecated-1.9.php.

serialise_object_to_xml (   $data,
  $name = "",
  $n = 0 
)

This function serialises an object recursively into an XML representation.

The function attempts to call $data->export() which expects a in return, otherwise it will attempt to get the object variables using get_object_vars (which will only return public variables!)

Parameters
mixed$dataThe object to serialise.
string$nameThe name?
int$nLevel, only used for recursion.
Returns
string The serialised XML output.

Definition at line 3030 of file deprecated-1.9.php.

setup_db_connections ( )

Establish database connections.

If the configuration has been set up for multiple read/write databases, set those links up separately; otherwise just create the one database link.

Returns
void private

Definition at line 1161 of file deprecated-1.9.php.

unexpose_function (   $method)

Unregister a web services method.

Parameters
string$methodThe api name that was exposed
Returns
void

Definition at line 2202 of file deprecated-1.9.php.

unregister_entity_type (   $type,
  $subtype 
)

Unregisters an entity type and subtype as a public-facing type.

Warning
With a blank subtype, it unregisters that entity type including all subtypes. This must be called after all subtypes have been registered.
Parameters
string$typeThe type of entity (object, site, user, group)
string$subtypeThe subtype to register (may be blank)
Returns
true|false Depending on success

Definition at line 1881 of file deprecated-1.9.php.

unregister_notification_handler (   $method)

This function unregisters a handler for a given notification type (eg "email")

Parameters
string$methodThe method
Returns
void
Since
1.7.1

Definition at line 3243 of file deprecated-1.9.php.

unregister_service_handler (   $handler)

Remove a web service To replace a web service handler, register the desired handler over the old on with register_service_handler().

Parameters
string$handlerweb services type
Returns
void

Definition at line 2233 of file deprecated-1.9.php.

user_add_friend (   $user_guid,
  $friend_guid 
)

Adds a user to another user's friends list.

Parameters
int$user_guidThe GUID of the friending user
int$friend_guidThe GUID of the user to friend
Returns
bool Depending on success

Definition at line 474 of file deprecated-1.9.php.

user_is_friend (   $user_guid,
  $friend_guid 
)

Determines whether or not a user is another user's friend.

Parameters
int$user_guidThe GUID of the user
int$friend_guidThe GUID of the friend
Returns
bool

Definition at line 409 of file deprecated-1.9.php.

user_remove_friend (   $user_guid,
  $friend_guid 
)

Removes a user from another user's friends list.

Parameters
int$user_guidThe GUID of the friending user
int$friend_guidThe GUID of the user on the friends list
Returns
bool Depending on success

Definition at line 502 of file deprecated-1.9.php.

volatile_data_export_plugin_hook (   $hook,
  $entity_type,
  $returnvalue,
  $params 
)

Exports attributes generated on the fly (volatile) about an entity.

Parameters
string$hookvolatile
string$entity_typemetadata
string$returnvalueReturn value from previous hook
array$paramsThe parameters, passed 'guid' and 'varname'
Returns
|null volatile metadata

Definition at line 3360 of file deprecated-1.9.php.

xml_to_object (   $xml)

Parse an XML file into an object.

Parameters
string$xmlThe XML
Returns

Definition at line 3122 of file deprecated-1.9.php.

Variable Documentation

$IMPORTED_DATA = array()

Definition at line 2757 of file deprecated-1.9.php.

$IMPORTED_OBJECT_COUNTER = 0

Definition at line 2758 of file deprecated-1.9.php.

$METASTRINGS_DEADNAME_CACHE = array()

Definition at line 809 of file deprecated-1.9.php.

Definition at line 3699 of file deprecated-1.9.php.

const KILOMETER 0.00932

Definition at line 1116 of file deprecated-1.9.php.

const MILE 0.01515

Definition at line 1115 of file deprecated-1.9.php.