A class to hold a collection of c_comdef_meeting objects. More...
Public Member Functions | |
| __construct ($in_parent_obj, $in_meetings_data) | |
| Constructor. | |
| RemoveInvalidMeetings () | |
| Run through the list, and remove meetings that do not show up as "valid.". | |
| SetParentObj ($in_parent_obj) | |
| Set the parent object of this instance. | |
| GetParentObj () | |
| Return a reference to the parent object of this instance. | |
| GetNumMeetings () | |
| Get the number of meetings. | |
| & | GetMeetingObjects () |
| Accessor -Get the meetings array. | |
| & | GetFormatsUsed () |
| Accessor -Get the formats array. | |
| & | GetServiceBodiesUsed () |
| Accessor -Get the service bodies array. | |
| GetMeetingTableName () | |
| RemoveMeeting ($in_id) | |
| Removes a meeting by a given ID from the set. | |
| GetMeetingsByDistance ($in_longitude, $in_latitude, $in_radius, $in_radius_is_km=true, $in_sort_by_distance=false) | |
| Return all the meetings that are within a certain radius of the given location. | |
| GetMeetingsByKeyValue ($in_key_string_array, $in_value, $in_contains=true, $in_match_case=false) | |
| Return all the meetings that have a given key value. | |
| GetMeetingsByString ($in_string, $in_lang_enum=null, $in_all_words_bool=false, $in_literal=false) | |
| Return all the meetings that contain the given string. | |
| GetMeetingKeys () | |
| Returns an array of all the field keys used by the meetings in this search set. | |
| SortMeetingObjects ($in_sort_fields_array, $in_desc=false, $in_by_distance=false) | |
| Sorts the meetings. This will apply a sort, dependent upon the given fields. The given array contains the field names (SQL columns and keys) for the data to be sorted. | |
| GetSortKey () | |
| GetSortDir () | |
Static Public Member Functions | |
| static | IsInDistance ($lat1, $lon1, $lat2, $lon2, $in_distance_in_KM, &$out_dist_in_KM) |
| Uses the Vincenty calculation to estimate a distance between the two given lat/long pairs, then returns true or false as to whether or not the distance between them falls within the given distance (in KM). | |
| static | GetDistance ($lat1, $lon1, $lat2, $lon2) |
| Uses the Vincenty calculation to estimate a distance between the two given lat/long pairs, then returns true or false as to whether or not the distance between them falls within the given distance (in KM). | |
| static | SortDistanceKernel ($object_a, $object_b) |
| This is the standard PHP sort callback used in the sort loops for distance. This will not be effective if the meetings don't both have _distance_in_km fields. | |
| static | SortKernel ($object_a, $object_b) |
| This is the standard PHP sort callback used in the sort loops. | |
Private Member Functions | |
| CreateMeetingObjects ($in_meetings_data) | |
| Create a bunch of meeting objects from the given data. | |
Private Attributes | |
| $_local_id_parent_obj = null | |
| A reference to the "parent" object for this instance. | |
| $_meetings_objects = null | |
| An array of new c_comdef_meeting objects that comprises the content. | |
| $_formats_used = null | |
| An array of references to the c_comdef_format objects that are used in this dataset. | |
| $_service_bodies_used = null | |
| An array of references to the c_comdef_service_body objects that are used in this dataset. | |
| $_sort_key = null | |
| An array of string. This is used during sorting, to indicate which key is being sorted. | |
| $_sort_dir = null | |
| $_sort_search_by_distance = false | |
| This is true if the meetings have a distance by which they can be sorted, and the sort should be done with it. | |
A class to hold a collection of c_comdef_meeting objects.
| c_comdef_meetings::__construct | ( | $ | in_parent_obj, |
| $ | in_meetings_data | ||
| ) |
Constructor.
| c_comdef_meetings::CreateMeetingObjects | ( | $ | in_meetings_data | ) | [private] |
Create a bunch of meeting objects from the given data.
| in_meetings_data | An array of data for one meeting. |
| static c_comdef_meetings::GetDistance | ( | $ | lat1, |
| $ | lon1, | ||
| $ | lat2, | ||
| $ | lon2 | ||
| ) | [static] |
Uses the Vincenty calculation to estimate a distance between the two given lat/long pairs, then returns true or false as to whether or not the distance between them falls within the given distance (in KM).
| lat1 | These four parameters are the given two points long/lat, in degrees. |
Referenced by c_comdef_server::GetMeetings().
| & c_comdef_meetings::GetFormatsUsed | ( | ) |
Accessor -Get the formats array.
| c_comdef_meetings::GetMeetingKeys | ( | ) |
Returns an array of all the field keys used by the meetings in this search set.
| & c_comdef_meetings::GetMeetingObjects | ( | ) |
Accessor -Get the meetings array.
| c_comdef_meetings::GetMeetingsByDistance | ( | $ | in_longitude, |
| $ | in_latitude, | ||
| $ | in_radius, | ||
| $ | in_radius_is_km = true, |
||
| $ | in_sort_by_distance = false |
||
| ) |
Return all the meetings that are within a certain radius of the given location.
| in_longitude | Floating-point. The longitude value of the center point. |
| in_latitude | Floating-point. The latitude value of the center point. |
| in_radius | Floating-point. The radius from the center |
| in_radius_is_km | Boolean. Set this to false if the radius is in miles (default is true). |
| in_sort_by_distance | Boolean. Set this to true to sort the results by distance. |
| c_comdef_meetings::GetMeetingsByKeyValue | ( | $ | in_key_string_array, |
| $ | in_value, | ||
| $ | in_contains = true, |
||
| $ | in_match_case = false |
||
| ) |
Return all the meetings that have a given key value.
Use this to filter for meetings within a single key/value.
| in_key_string_array | This is data item keys (an array of string). These must match exactly. |
| in_value | This is a string with a literal value to find. |
| in_contains | If this is false, then the entire value must match (Defalt is true). |
| in_match_case | If this is true, then the case must match (Default is false). NOTE: As of Version 1.5, the behavior has changed. This now refers to using metaphone or not. If it is true, the the string must match exactly, including case. However, if it is false, a case-insensitive metaphone search is done in the native server language. |
| c_comdef_meetings::GetMeetingsByString | ( | $ | in_string, |
| $ | in_lang_enum = null, |
||
| $ | in_all_words_bool = false, |
||
| $ | in_literal = false |
||
| ) |
Return all the meetings that contain the given string.
If the language is English or Spanish, this does a metaphone search of all all the strings in the "en" or "es" formats and weekdays. If it is any other language, then a simple string search is performed.
If no language is given, we use the server's native language.
We force the search to happen in lowercase. This is a very basic search.
If we will use metaphone, we convert our search criteria to metaphone keys.
| in_string | This is the string to search for. |
| in_lang_enum | This is the code for the desired language. If not given, the server localization will be used. |
| in_all_words_bool | If true, then all the words in the given search term need to be found (They could be distributed all around the various components of the meeting record). |
| in_literal | If this is set to true, then metaphone-capable languages will not use metaphone, and will literally test the strings. Default is false. |
| c_comdef_meetings::GetMeetingTableName | ( | ) |
Returns the name of the Meeting Table.
| c_comdef_meetings::GetNumMeetings | ( | ) |
Get the number of meetings.
| c_comdef_meetings::GetParentObj | ( | ) |
Return a reference to the parent object of this instance.
Implements i_comdef_has_parent.
| & c_comdef_meetings::GetServiceBodiesUsed | ( | ) |
Accessor -Get the service bodies array.
| c_comdef_meetings::GetSortDir | ( | ) |
| c_comdef_meetings::GetSortKey | ( | ) |
| static c_comdef_meetings::IsInDistance | ( | $ | lat1, |
| $ | lon1, | ||
| $ | lat2, | ||
| $ | lon2, | ||
| $ | in_distance_in_KM, | ||
| &$ | out_dist_in_KM | ||
| ) | [static] |
Uses the Vincenty calculation to estimate a distance between the two given lat/long pairs, then returns true or false as to whether or not the distance between them falls within the given distance (in KM).
| lat1 | These four parameters are the given two points long/lat, in degrees. |
| in_distance_in_KM | The distance they must be within to return true (in Kilometers). |
| out_dist_in_KM | This is an optional field that allows the calculated distance to be returned (in KM). |
| c_comdef_meetings::RemoveInvalidMeetings | ( | ) |
Run through the list, and remove meetings that do not show up as "valid.".
If a user is logged in, they see dead meetings.
| c_comdef_meetings::RemoveMeeting | ( | $ | in_id | ) |
Removes a meeting by a given ID from the set.
| in_id | Integer: the id_bigint for the meeting to be removed. |
| c_comdef_meetings::SetParentObj | ( | $ | in_parent_obj | ) |
Set the parent object of this instance.
| in_parent_obj | A reference to the parent object. |
Implements i_comdef_has_parent.
| static c_comdef_meetings::SortDistanceKernel | ( | $ | object_a, |
| $ | object_b | ||
| ) | [static] |
This is the standard PHP sort callback used in the sort loops for distance. This will not be effective if the meetings don't both have _distance_in_km fields.
| static c_comdef_meetings::SortKernel | ( | $ | object_a, |
| $ | object_b | ||
| ) | [static] |
This is the standard PHP sort callback used in the sort loops.
| c_comdef_meetings::SortMeetingObjects | ( | $ | in_sort_fields_array, |
| $ | in_desc = false, |
||
| $ | in_by_distance = false |
||
| ) |
Sorts the meetings. This will apply a sort, dependent upon the given fields. The given array contains the field names (SQL columns and keys) for the data to be sorted.
| in_sort_fields_array | An array of strings. The array will deliniate the sort order, by field name. Array element [0] will be the highest priority, and it will descend from there. |
| in_desc | If this is set to true, the sort will be highest to lowest. Default is false. |
| in_by_distance | If true, then, after the regular sort, we sort by distance (May be ignored if the meetings don't have a |
c_comdef_meetings::$_formats_used = null [private] |
An array of references to the c_comdef_format objects that are used in this dataset.
c_comdef_meetings::$_local_id_parent_obj = null [private] |
A reference to the "parent" object for this instance.
c_comdef_meetings::$_meetings_objects = null [private] |
An array of new c_comdef_meeting objects that comprises the content.
c_comdef_meetings::$_service_bodies_used = null [private] |
An array of references to the c_comdef_service_body objects that are used in this dataset.
c_comdef_meetings::$_sort_dir = null [private] |
A string. This is used during sorting, to indicate which direction to take for the sort. It is either:
c_comdef_meetings::$_sort_key = null [private] |
An array of string. This is used during sorting, to indicate which key is being sorted.
c_comdef_meetings::$_sort_search_by_distance = false [private] |
This is true if the meetings have a distance by which they can be sorted, and the sort should be done with it.
1.7.4