Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes
c_comdef_meeting_search_manager Class Reference

A class to control the basic common functionality of all meeting searches. More...

List of all members.

Public Member Functions

 __construct ($in_results_per_page=0, c_comdef_meeting_search_manager &$in_parent=null, c_comdef_meetings &$in_search_results=null, $in_pageno=0)
 Constructor.
 SetFormats ()
 Sets an internal array of integers, containing the Shared IDs for all available formats on the server. They are initialized to 0 (neutral).
GetFormats ()
 Accessor -Get a reference to the $_formats field.
 SetKeyValueSearch ($in_meeting_key, $in_meeting_key_value, $in_meeting_key_match_case=false, $in_meeting_key_contains=true)
 Sets a key/value search.
 SetSortByDistance ($in_sort_search_by_distance=false)
 Sets the sort by distance flag.
 SetServiceBodies ()
 Sets an internal array of integers, containing the IDs for all available service bodies on the server. They are initialized to 0 (neutral).
 GetResultsPerPage ()
 Accessor -Get the number of results per page.
 SetResultsPerPage ($in_results_per_page)
 Accessor -Set the number of results per page. This will only work on the root object.
 GetPageNo ()
 Accessor -Get the page number of this set.
 GetFirstIndexInPage ()
 Accessor -Get the index (1 - based) of the first meeting in this page.
 GetLastIndexInPage ()
 Accessor -Get the index (1 - based) of the last meeting in this page.
 GetNumberOfPages ()
 Accessor -Get the page number of this set.
 GetNumberOfResults ()
 Accessor -Get the total number of meetings found. This gives the TOTAL number found, not just the subset in this page.
 GetNumberOfResultsInThisPage ()
 Accessor -Get the number of meetings in this page.
GetPageOfResults ($in_page_no=1)
 Accessor -Get the number of meetings in this page.
GetServiceBodies ()
 Accessor -Get a reference to the $_service_bodies field.
 SetLanguages ()
 Sets up an internal array of languages. The array uses the language enum as the key, and the -1->0->1 form as the selector.
GetLanguages ()
 Accessor -Get a reference to the $_languages field.
GetWeekdays ()
 Accessor -Get a reference to the $_weekdays field.
GetServer ()
 Accessor -Get a reference to the c_comdef_server object.
GetRootObject ()
 Accessor -Get a reference to the root object.
 SetSearchRadiusAndCenterInMiles ($in_search_radius_in_miles, $in_long_in_degrees, $in_lat_in_degrees)
 Set a search radius and center, with the Radius in miles.
 SetSearchRadiusAndCenterInKm ($in_search_radius_in_km, $in_long_in_degrees, $in_lat_in_degrees)
 Set a search radius and center, with the radius in Km.
 SetSearchRadiusAndCenterAuto ($in_search_result_count, $in_long_in_degrees, $in_lat_in_degrees)
 Set a search center, and a count for an auto radius hunt. The way this works is that the center is set, and the optimal radius is selected in kilometers to deliver that many meetings. The radius starts at 25 Km (about 10 miles), and goes up or down in 5Km "clicks." Under 5Km, it reduces to 0.5Km "clicks." It will not go out more than 100Km.
 GetRadius ($in_miles=false)
 Get the search radius.
 GetLongitude ()
 Get the longitude.
 GetLatitude ()
 Get the latitude.
 GetPublished ()
 Get the search for published value.
 SetPublished ($in_published_search)
 Sets the search for published value.
 SetStartTime ($in_starts_after, $in_starts_before=null)
 Set a start time window.
 GetStartTime_Min ()
 Get the "starts after" value.
 GetStartTime_Max ()
 Get the "starts before" value.
 SetDuration ($in_max_duration, $in_min_duration=null)
 Set a duration time window.
 GetDuration_Max ()
 Get the Maximum Duration value.
 GetDuration_Min ()
 Get the Minimum Duration value.
 SetSearchString ($in_search_string, $in_all_words=false, $in_literal=false)
 Set a search string.
GetSearchString ()
 Get the current search string.
 SetMeetingIDArray ($in_meeting_id_array)
 Set the current search string.
GetMeetingIDArray ()
 Get the current search string.
 StringSearchForAllWords ()
 Get the current search string "all words" flag.
 StringSearchIsLiteral ()
 Get the current search string literal flag.
GetAvailableLanguages ()
 These functions will help the caller to get information from the server. You can use them to build a search form.
GetAvailableServiceBodies ()
 Returns an array of references to c_comdef_service_body objects.
GetAvailableFormats ()
 Returns a multi-dimensional array of references to c_comdef_format objects.
 GetSpecificSortKeys ()
 These functions deal with the search itself.
 DoSearch ()
 Executes a new search. It will always force a new search.
GetSearchResults_Obj ($in_new_search=false)
 Returns a reference to the c_comdef_meetings object that contains the results of the search. If this is null, or if the $in_new_search parameter is set to true, the search will be executed, otherwise, this just returns a reference to the existing search results.
 ClearSearch ()
 Clears the search results, so the next access will redo the search.
GetSearchResultsAsArray ()
 This will return the search results as an array of c_comdef_meeting objects.
 ClearSort ()
 These are sorting functions.
 SetSortDepth ($in_new_depth=0)
 Accessor. Set the maximum number of sorts to maintain. If the current number is more than the new value, then we remove any beyond that.
 SetTopSortPriority ($in_new_top_sort_key, $in_desc=false)
 Set a new "top" sort priority.
 SetSort ($in_sort_fields_array=null, $in_desc=false, $in_max_sort_keys=0)
 Sets up the sort array and direction. This replaces the entire array and direction. If the array is longer than the maximum number of sort keys, only that number of keys are used.
 SortMeetingObjects ($in_sort_fields_array=null, $in_desc=null)
 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.
 GetSquareForRadius ($in_weekday_tinyint_array)
 These are various utility functions.

Static Public Member Functions

static GetAllAvailableSortKeys ()
 Returns an array of all possible field keys to be used for sorting.
static GetSingleMeetingByID ($in_id)
 These are static functions for directly accessing meetings via ID.
static GetMultipleMeetingsByID ($in_id_array)
 This is a static utility function that will return multiple instances of c_comdef_meeting, based upon the IDs of the meetings. It will create an array to hold these instances.

Protected Attributes

 $_formats = null
 These fields are used to specify the search criteria.
 $_service_bodies = null
 $_languages = null
 $_weekdays = null
 $_start_after = null
 These specify the start time and duration of the meeting. The start time can be specified as a "window.".
 $_start_before = null
 An epoch time (seconds, as returned by time()), that denotes the latest starting time allowed.
 $_min_duration = null
 The number of seconds a meeting should last as a minimum.
 $_max_duration = null
 The number of seconds a meeting can last, at most.
 $_search_radius = null
 These specify the search radius (We store it in kilometers).
 $_search_radius_count = null
 If this is not null, it needs to be a positive integer, indicating the number of meetings to find automatically.
 $_search_center_long = null
 If $_search_radius is not null, this needs to be a floating-point number that indicates the longitude, in degrees, of the search center.
 $_search_center_lat = null
 If $_search_radius is not null, this needs to be a floating-point number that indicates the latitude, in degrees, of the search center.
 $_search_string = null
 We allow a broad string search that goes through all the text items. In English and Spanish, it uses metaphone, which is a "sounds like" phonetic search.
 $_search_string_all_words = false
 A Boolean. If this is true, then all of the words in a phrase must be present.
 $_search_string_literal = false
 A Boolean. If this is true, then the spelling must be literal.
 $_meeting_key = null
 This allows you to filter out a particular value for a key.
 $_meeting_key_value = null
 $_meeting_key_match_case = false
 $_meeting_key_contains = true
 If this is false, then the string must be complete. Default is true (contains).
 $_meeting_id_array = null
 This contains a list of IDs of individual meetings. If it is set, then all other search parameters are ignored.
 $_published_search = 0
 This indicates whether the search should include, exclude, or focus on "published" meetings.
 $_sort_search_by_distance = false
 If this is true, then the search results may be sorted by distance from the geo center.
 $_search_results = null
 This contains the search results.

Private Attributes

 $sort_array = null
 This contains an array of strings that represent the sort keys.
 $sort_desc = false
 This is set to true if the sort is a reverse sort.
 $sort_depth = 3
 An integer. This is how far back a staged sort goes. Default is 3. 0 is forever.
 $_results_per_page = 0
 This refers to portions of a larger search (pages).
 $_pageno = 0
 An integer. The page number represented by this object. If $_results_per_page is 0, this is ignored.
 $_my_root = null
 If this isn't the root, then this will be a reference to the root.
 $_my_server = null
 A reference to a c_comdef_server object. This is the server to be used for the search.

Detailed Description

A class to control the basic common functionality of all meeting searches.


Constructor & Destructor Documentation

c_comdef_meeting_search_manager::__construct ( in_results_per_page = 0,
c_comdef_meeting_search_manager &$  in_parent = null,
c_comdef_meetings &$  in_search_results = null,
in_pageno = 0 
)

Constructor.

Parameters:
in_results_per_pageAn integer that defines how many results per page you want to see. 0 (default) is all in one page.
in_parentA reference to an existing c_comdef_meeting_search_manager object.
in_search_resultsA reference to some pre-parsed search results.
in_pagenoAn integer. The page of the main search this is from.

Member Function Documentation

c_comdef_meeting_search_manager::ClearSearch ( )

Clears the search results, so the next access will redo the search.

c_comdef_meeting_search_manager::ClearSort ( )

These are sorting functions.

Simply clears out the sort array, so the search is unsorted.

c_comdef_meeting_search_manager::DoSearch ( )

Executes a new search. It will always force a new search.

Returns:
an integer that indicates the number of meetings found.
static c_comdef_meeting_search_manager::GetAllAvailableSortKeys ( ) [static]

Returns an array of all possible field keys to be used for sorting.

Returns:
an array of strings, with the key being the same as the value. NOTE: This contains ALL possible keys, including ones that may not be used in the found set.
& c_comdef_meeting_search_manager::GetAvailableFormats ( )

Returns a multi-dimensional array of references to c_comdef_format objects.

This returns ALL formats; whether or not they are used in meetings.

Returns:
a reference to a multi-dimensional array of c_comdef_format objects. The key will be the language enum, and the value will be another array, which will have its key as the Shared ID of the format, and the value will be a reference to the object. Null, if the function fails for any reason.

This will reference the actual objects controlled by the server.

& c_comdef_meeting_search_manager::GetAvailableLanguages ( )

These functions will help the caller to get information from the server. You can use them to build a search form.

Returns an array of language enums and names.

Returns:
a reference to an array of strings, containing the server languages in human-readable, local form. The key will be the enum, and the value will be the name of the language.
& c_comdef_meeting_search_manager::GetAvailableServiceBodies ( )

Returns an array of references to c_comdef_service_body objects.

This returns ALL Service bodies; whether or not they contain meetings.

Returns:
a reference to an array of c_comdef_service_body objects. The key will be the ID of the Service body, and the value will be a reference to the object. Null, if the function fails for any reason.

This will reference the actual objects controlled by the server.

c_comdef_meeting_search_manager::GetDuration_Max ( )

Get the Maximum Duration value.

Returns:
an integer, containing the epoch time for the value.
c_comdef_meeting_search_manager::GetDuration_Min ( )

Get the Minimum Duration value.

Returns:
an integer, containing the epoch time for the value.
c_comdef_meeting_search_manager::GetFirstIndexInPage ( )

Accessor -Get the index (1 - based) of the first meeting in this page.

Returns:
an integer.
& c_comdef_meeting_search_manager::GetFormats ( )

Accessor -Get a reference to the $_formats field.

Returns:
a reference to the $_formats field, which is an array of integers. The key is the format's shared ID, and the value will be one of these:
  • -1 NOT (exclude all meetings that contain this format from the search).
  • 0 No preference (This format will not be a consideration in the search).
  • 1 Return meetings that contain this format.

Default is 0 for all. If no formats are specified (either 1 or -1), then formats will not be a consideration in the meeting search. If any format is specified as 1, then ONLY meetings with the given format will be considered in the search, and you must explicitly set any other formats you wish found.

& c_comdef_meeting_search_manager::GetLanguages ( )

Accessor -Get a reference to the $_languages field.

Returns:
a reference to the $_languages field. The key is the language enum, and the value is as follows:
  • -1 NOT (exclude all meetings that have this language from the search).
  • 0 No preference (This language will not be a consideration in the search).
  • 1 Return meetings that have this language.

Default is 0 for all. If no languages are specified (either 1 or -1), then language will not be a consideration in the meeting search. If any language is specified as 1, then ONLY meetings with the given language will be considered in the search, and you must explicitly set any other language you wish found.

c_comdef_meeting_search_manager::GetLastIndexInPage ( )

Accessor -Get the index (1 - based) of the last meeting in this page.

Returns:
an integer.
c_comdef_meeting_search_manager::GetLatitude ( )

Get the latitude.

Returns:
a floating-point number. The return is in degrees.
c_comdef_meeting_search_manager::GetLongitude ( )

Get the longitude.

Returns:
a floating-point number. The return is in degrees.
& c_comdef_meeting_search_manager::GetMeetingIDArray ( )

Get the current search string.

Returns:
a reference to the meeting ID array.
static c_comdef_meeting_search_manager::GetMultipleMeetingsByID ( in_id_array) [static]

This is a static utility function that will return multiple instances of c_comdef_meeting, based upon the IDs of the meetings. It will create an array to hold these instances.

NOTE: This is NOT the same as the c_comdef_server::GetMeetingsByID() function, as that function returns an instance of c_comdef_meetings.

Returns:
an array of new (not reference) c_comdef_meeting instances. Null if it fails.
Parameters:
in_id_arrayAn array of integers. The IDs of the meetings.
c_comdef_meeting_search_manager::GetNumberOfPages ( )

Accessor -Get the page number of this set.

Returns:
an integer.
c_comdef_meeting_search_manager::GetNumberOfResults ( )

Accessor -Get the total number of meetings found. This gives the TOTAL number found, not just the subset in this page.

Returns:
an integer.
c_comdef_meeting_search_manager::GetNumberOfResultsInThisPage ( )

Accessor -Get the number of meetings in this page.

Returns:
an integer.
c_comdef_meeting_search_manager::GetPageNo ( )

Accessor -Get the page number of this set.

Returns:
an integer.
& c_comdef_meeting_search_manager::GetPageOfResults ( in_page_no = 1)

Accessor -Get the number of meetings in this page.

This system allows each page to be treated independently, like allowing different sorts without re-sorting the entire search.

This object needs to be the "root" object to return a page.

Returns:
a new instance (not a reference) to a c_comdef_meeting_search_manager object, containing a subset of the meetings to fill this one page.
Parameters:
in_page_noA positive integer. This should be 1 to $this->GetNumberOfPages() (1-based)
c_comdef_meeting_search_manager::GetPublished ( )

Get the search for published value.

Returns:
an integer.
  • -1 Search for ONLY unpublished meetings
  • 0 Search for published and unpublished meetings.
  • 1 Search for ONLY published meetings.
c_comdef_meeting_search_manager::GetRadius ( in_miles = false)

Get the search radius.

Returns:
a floating-point number. If the $in_miles parameter is false, the returned value is kilometers. If it is true, the returned value is in miles.
Parameters:
in_milesA boolean. If true, the returned value will be in miles. Otherwise, it is returned in kilometers.
c_comdef_meeting_search_manager::GetResultsPerPage ( )

Accessor -Get the number of results per page.

Returns:
an integer.
& c_comdef_meeting_search_manager::GetRootObject ( )

Accessor -Get a reference to the root object.

Returns:
a reference to the c_comdef_meeting_search_manager object. If this is the root object, it will return a reference to itself.
& c_comdef_meeting_search_manager::GetSearchResults_Obj ( in_new_search = false)

Returns a reference to the c_comdef_meetings object that contains the results of the search. If this is null, or if the $in_new_search parameter is set to true, the search will be executed, otherwise, this just returns a reference to the existing search results.

Returns:
a reference to the internal $_search_results field (an instance of c_comdef_search_results).
Parameters:
in_new_searchIf this is set to true, the search is done anew.
& c_comdef_meeting_search_manager::GetSearchResultsAsArray ( )

This will return the search results as an array of c_comdef_meeting objects.

Returns:
a reference to an array of references to c_comdef_meeting objects.
& c_comdef_meeting_search_manager::GetSearchString ( )

Get the current search string.

Returns:
a reference to the search string.
& c_comdef_meeting_search_manager::GetServer ( )

Accessor -Get a reference to the c_comdef_server object.

Returns:
a reference to the c_comdef_server object instantiated by this object.
& c_comdef_meeting_search_manager::GetServiceBodies ( )

Accessor -Get a reference to the $_service_bodies field.

Returns:
a reference to the $_service_bodies field. The key is the Service Body ID. The value is as follows:
  • -1 NOT (exclude all meetings that contain this Service Body from the search).
  • 0 No preference (This Service Body will not be a consideration in the search).
  • 1 Return meetings that contain this Service Body.

Default is 0 for all. If no Service Bodies are specified (either 1 or -1), then Service Bodies will not be a consideration in the meeting search. If any Service Body is specified as 1, then ONLY meetings with the given Service Body will be considered in the search, and you must explicitly set any other Service Bodies you wish found.

static c_comdef_meeting_search_manager::GetSingleMeetingByID ( in_id) [static]

These are static functions for directly accessing meetings via ID.

This is a static utility function that will return one single instance of c_comdef_meeting, based upon the ID of that meeting.

Returns:
a new (not reference) c_comdef_meeting instance. Null if it fails.
Parameters:
in_idAn integer. The ID of the meeting.
c_comdef_meeting_search_manager::GetSpecificSortKeys ( )

These functions deal with the search itself.

Returns an array of field keys to be used for sorting. This function is not static, and searches the found set for keys. As a result, it takes longer.

Returns:
an array of strings, with the key being the same as the value. NOTE: This contains only the keys used in this found set.

As a result, this will return null until after a search has been performed.

c_comdef_meeting_search_manager::GetSquareForRadius ( in_weekday_tinyint_array)

These are various utility functions.

This is an internal utility function that takes a specified radius and center point and calculates a square, in longitude and latitude points, that encompasses that radius. This greatly narrows the scope of the search, so the radius calculation will simply eliminate any meetings that are "in the corners."

If the setting is for auto-radius, the auto-radius is first resolved, then the main radius value is set. Remember that auto-radius is for all meetings, all days of the week. It is really a "density test," as opposed to an accurate selector.

Returns:
an array of floating-point values, in the following form:
  • ['east'] = longitude of the Eastern side of the rectangle
  • ['west'] = longitude of the Western side of the rectangle
  • ['north'] = latitude of the Northern side of the rectangle
  • ['south'] = latitude of the Southern side of the rectangle
Parameters:
in_weekday_tinyint_arrayAn array of weekdays in which to filter for.
c_comdef_meeting_search_manager::GetStartTime_Max ( )

Get the "starts before" value.

Returns:
an integer, containing the epoch time for the value.
c_comdef_meeting_search_manager::GetStartTime_Min ( )

Get the "starts after" value.

Returns:
an integer, containing the epoch time for the value.
& c_comdef_meeting_search_manager::GetWeekdays ( )

Accessor -Get a reference to the $_weekdays field.

Returns:
a reference to the $_weekdays field. The key is the weekday (1 = Sunday, 7 = Saturday), and the value is as follows:
  • -1 NOT (exclude all meetings that occur on this weekday from the search).
  • 0 No preference (This weekday will not be a consideration in the search).
  • 1 Return meetings that occur on this weekday.

Default is 0 for all. If no weekdays are specified (either 1 or -1), then the weekday will not be a consideration in the meeting search. If any weekday is specified as 1, then ONLY meetings that occur on the given weekday will be considered in the search, and you must explicitly set any other weekday you wish found.

c_comdef_meeting_search_manager::SetDuration ( in_max_duration,
in_min_duration = null 
)

Set a duration time window.

Parameters:
in_max_durationAn epoch time, defining the maximum duration of a meeting.
in_min_durationIf defined, the minimum duration of the meeting.
c_comdef_meeting_search_manager::SetFormats ( )

Sets an internal array of integers, containing the Shared IDs for all available formats on the server. They are initialized to 0 (neutral).

c_comdef_meeting_search_manager::SetKeyValueSearch ( in_meeting_key,
in_meeting_key_value,
in_meeting_key_match_case = false,
in_meeting_key_contains = true 
)

Sets a key/value search.

Parameters:
in_meeting_keyA string. This is the xact name of the key to match.
in_meeting_key_valueA string. The value to match.
in_meeting_key_match_caseIf true, the case must match. Default is false.
in_meeting_key_containsIf this is false, then the string must be complete. Default is true (contains).
c_comdef_meeting_search_manager::SetLanguages ( )

Sets up an internal array of languages. The array uses the language enum as the key, and the -1->0->1 form as the selector.

c_comdef_meeting_search_manager::SetMeetingIDArray ( in_meeting_id_array)

Set the current search string.

Parameters:
in_meeting_id_arrayAn array of positive integers. These are the IDs of individual meetings to find.
c_comdef_meeting_search_manager::SetPublished ( in_published_search)

Sets the search for published value.

Parameters:
in_published_searchThe value to set. It can be:
  • -1 Search for ONLY unpublished meetings
  • 0 Search for published and unpublished meetings.
  • 1 Search for ONLY published meetings.
c_comdef_meeting_search_manager::SetResultsPerPage ( in_results_per_page)

Accessor -Set the number of results per page. This will only work on the root object.

Returns:
a boolean. If the operation was successful, it is true. False otherwise.
Parameters:
in_results_per_pageA positive integer. If it is 0, then all results will be returned in one page.
c_comdef_meeting_search_manager::SetSearchRadiusAndCenterAuto ( in_search_result_count,
in_long_in_degrees,
in_lat_in_degrees 
)

Set a search center, and a count for an auto radius hunt. The way this works is that the center is set, and the optimal radius is selected in kilometers to deliver that many meetings. The radius starts at 25 Km (about 10 miles), and goes up or down in 5Km "clicks." Under 5Km, it reduces to 0.5Km "clicks." It will not go out more than 100Km.

When it passes the threshold for the number of meetings in the square, the radius is selected, and the _search_radius is set to the number of Kilometers.

We are not looking for an exact meeting count. It should select the first radius that contains AT LEAST the number of meetings requested.

If not enough meetings are found, the radius ends up at 0.

Parameters:
in_search_result_countA positive integer. It specifies the number of meetings to find.
in_long_in_degreesThe longitude needs to be specified in degrees.
in_lat_in_degreesThe latitude needs to be specified in degrees.
c_comdef_meeting_search_manager::SetSearchRadiusAndCenterInKm ( in_search_radius_in_km,
in_long_in_degrees,
in_lat_in_degrees 
)

Set a search radius and center, with the radius in Km.

Parameters:
in_search_radius_in_kmThe radius needs to be specified in kilometers, not miles.
in_long_in_degreesThe longitude needs to be specified in degrees.
in_lat_in_degreesThe latitude needs to be specified in degrees.
c_comdef_meeting_search_manager::SetSearchRadiusAndCenterInMiles ( in_search_radius_in_miles,
in_long_in_degrees,
in_lat_in_degrees 
)

Set a search radius and center, with the Radius in miles.

Parameters:
in_search_radius_in_milesThe radius as specified in miles, not Km.
in_long_in_degreesThe longitude needs to be specified in degrees.
in_lat_in_degreesThe latitude needs to be specified in degrees.
c_comdef_meeting_search_manager::SetSearchString ( in_search_string,
in_all_words = false,
in_literal = false 
)

Set a search string.

Parameters:
in_search_stringA string. This is a string for which to search.
in_all_wordsA Boolean. If this is true, then all of the words in a phrase must be present.
in_literalA Boolean. If this is true, then the spelling must be literal.
c_comdef_meeting_search_manager::SetServiceBodies ( )

Sets an internal array of integers, containing the IDs for all available service bodies on the server. They are initialized to 0 (neutral).

c_comdef_meeting_search_manager::SetSort ( in_sort_fields_array = null,
in_desc = false,
in_max_sort_keys = 0 
)

Sets up the sort array and direction. This replaces the entire array and direction. If the array is longer than the maximum number of sort keys, only that number of keys are used.

It will reset the sort direction, so you need to explicitly indicate the sort direction if you want it descending, as opposed to ascending.

Parameters:
in_sort_fields_arrayAn 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. If this is not specified, the sort will be cleared.
in_descIf this is set to true, the sort will be highest to lowest. Default is false.
in_max_sort_keysA positive integer, specifying a new maximum sort depth. If it is not specified, the max will not be changed.
c_comdef_meeting_search_manager::SetSortByDistance ( in_sort_search_by_distance = false)

Sets the sort by distance flag.

Parameters:
in_sort_search_by_distanceA Boolean. False is default.
c_comdef_meeting_search_manager::SetSortDepth ( in_new_depth = 0)

Accessor. Set the maximum number of sorts to maintain. If the current number is more than the new value, then we remove any beyond that.

Parameters:
in_new_depthA positive integer. If nothing is provided, we set to endless (0).
c_comdef_meeting_search_manager::SetStartTime ( in_starts_after,
in_starts_before = null 
)

Set a start time window.

Parameters:
in_starts_afterAn epoch time, defining when the meeting should start (or after)
in_starts_beforeIf defined, the meeting must start no later than this.
c_comdef_meeting_search_manager::SetTopSortPriority ( in_new_top_sort_key,
in_desc = false 
)

Set a new "top" sort priority.

The prior "top" sort priority will be made secondary. If the key was previously "lower" in the sort priority, it is removed from there.

It will trigger a sort after the new key has been established.

This allows a very "natural" type of sorting, where the user goes from one field to another.

This will always reset the sort direction to the given one (or will reset to ascending). We could save the direction with each column, but that is likely to result in a confusing mess. It's a better idea to just apply the same direction to every column.

Parameters:
in_new_top_sort_keyA string. This should be the database table column name for the new "top" sort key.
in_descIf this is set to true, the sort will be highest to lowest. Default is false.
c_comdef_meeting_search_manager::SortMeetingObjects ( in_sort_fields_array = null,
in_desc = null 
)

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.

If you don't specify any parameters, the ones from the last sort will be used.

Parameters:
in_sort_fields_arrayAn 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_descIf this is set to true, the sort will be highest to lowest. Default is false.
c_comdef_meeting_search_manager::StringSearchForAllWords ( )

Get the current search string "all words" flag.

c_comdef_meeting_search_manager::StringSearchIsLiteral ( )

Get the current search string literal flag.


Member Data Documentation

c_comdef_meeting_search_manager::$_formats = null [protected]

These fields are used to specify the search criteria.

An array of integers. These are formats. The filtering will be an "AND" filtering, so qualified meetings must have all of the given formats. The key is the format's shared ID, and the value will be one of these:

  • -1 NOT (exclude all meetings that contain this format from the search).
  • 0 No preference (This format will not be a consideration in the search).
  • 1 Return meetings that contain this format.

Default is 0 for all. If no formats are specified (either 1 or -1), then formats will not be a consideration in the meeting search. If any format is specified as 1, then ONLY meetings with the given format will be considered in the search, and you must explicitly set any other formats you wish found.

c_comdef_meeting_search_manager::$_languages = null [protected]

An array of integers. The key is the language enum, and the value is as follows:

  • -1 NOT (exclude all meetings that have this language from the search).
  • 0 No preference (This language will not be a consideration in the search).
  • 1 Return meetings that have this language.

Default is 0 for all. If no languages are specified (either 1 or -1), then language will not be a consideration in the meeting search. If any language is specified as 1, then ONLY meetings with the given language will be considered in the search, and you must explicitly set any other language you wish found.

c_comdef_meeting_search_manager::$_max_duration = null [protected]

The number of seconds a meeting can last, at most.

c_comdef_meeting_search_manager::$_meeting_id_array = null [protected]

This contains a list of IDs of individual meetings. If it is set, then all other search parameters are ignored.

An array of positive integers. The Ids of meetings to find. If this is set, all other search criteria are ignored.

c_comdef_meeting_search_manager::$_meeting_key = null [protected]

This allows you to filter out a particular value for a key.

A string. This is the xact name of the key to match. NOTE: As of Version 1.5, this can be an array of strings (it can still be a single string). The array should contain the names of string fields.

c_comdef_meeting_search_manager::$_meeting_key_contains = true [protected]

If this is false, then the string must be complete. Default is true (contains).

c_comdef_meeting_search_manager::$_meeting_key_match_case = false [protected]

If true, the case must match. Default is false. NOTE: As of Version 1.5, setting this to TRUE also stops the metaphone search.

c_comdef_meeting_search_manager::$_meeting_key_value = null [protected]

A string. The value to match. NOTE: As of Version 1.5, this is matched with a metaphone match, as well as the RegEx match.

c_comdef_meeting_search_manager::$_min_duration = null [protected]

The number of seconds a meeting should last as a minimum.

c_comdef_meeting_search_manager::$_my_root = null [private]

If this isn't the root, then this will be a reference to the root.

A reference to an instance of c_comdef_meeting_search_manager -The root object.

c_comdef_meeting_search_manager::$_my_server = null [private]

A reference to a c_comdef_server object. This is the server to be used for the search.

c_comdef_meeting_search_manager::$_pageno = 0 [private]

An integer. The page number represented by this object. If $_results_per_page is 0, this is ignored.

c_comdef_meeting_search_manager::$_published_search = 0 [protected]

This indicates whether the search should include, exclude, or focus on "published" meetings.

This only counts if the searcher is a logged-in admin. The value can be:

  • -1 Search for ONLY unpublished meetings
  • 0 Search for published and unpublished meetings.
  • 1 Search for ONLY published meetings.
c_comdef_meeting_search_manager::$_results_per_page = 0 [private]

This refers to portions of a larger search (pages).

The number of meetings to list per page.

c_comdef_meeting_search_manager::$_search_center_lat = null [protected]

If $_search_radius is not null, this needs to be a floating-point number that indicates the latitude, in degrees, of the search center.

c_comdef_meeting_search_manager::$_search_center_long = null [protected]

If $_search_radius is not null, this needs to be a floating-point number that indicates the longitude, in degrees, of the search center.

c_comdef_meeting_search_manager::$_search_radius = null [protected]

These specify the search radius (We store it in kilometers).

If this is not null, it needs to be a positive, floating-point number, indicating the radius, in Kilometers.

c_comdef_meeting_search_manager::$_search_radius_count = null [protected]

If this is not null, it needs to be a positive integer, indicating the number of meetings to find automatically.

c_comdef_meeting_search_manager::$_search_results = null [protected]

This contains the search results.

A c_comdef_meetings object. If this is null, a new search is performed. This contains the entire search results.

c_comdef_meeting_search_manager::$_search_string = null [protected]

We allow a broad string search that goes through all the text items. In English and Spanish, it uses metaphone, which is a "sounds like" phonetic search.

A string to be located from within the results. This search is done after all of the previous ones. This is applied at the end.

c_comdef_meeting_search_manager::$_search_string_all_words = false [protected]

A Boolean. If this is true, then all of the words in a phrase must be present.

c_comdef_meeting_search_manager::$_search_string_literal = false [protected]

A Boolean. If this is true, then the spelling must be literal.

c_comdef_meeting_search_manager::$_service_bodies = null [protected]

An array of integers. The key is the ID for a Service Body, and the value is one of these:

  • -1 NOT (exclude all meetings that contain this Service Body from the search).
  • 0 No preference (This Service Body will not be a consideration in the search).
  • 1 Return meetings that contain this Service Body.

Default is 0 for all. If no Service Bodies are specified (either 1 or -1), then Service Bodies will not be a consideration in the meeting search. If any Service Body is specified as 1, then ONLY meetings with the given Service Body will be considered in the search, and you must explicitly set any other Service Bodies you wish found.

c_comdef_meeting_search_manager::$_sort_search_by_distance = false [protected]

If this is true, then the search results may be sorted by distance from the geo center.

c_comdef_meeting_search_manager::$_start_after = null [protected]

These specify the start time and duration of the meeting. The start time can be specified as a "window.".

An epoch time (seconds, as returned by time()), that denotes the earliest starting time allowed.

c_comdef_meeting_search_manager::$_start_before = null [protected]

An epoch time (seconds, as returned by time()), that denotes the latest starting time allowed.

c_comdef_meeting_search_manager::$_weekdays = null [protected]

An array of integers. The key is the weekday (1 = Sunday, 7 = Saturday), and the value is as follows:

  • -1 NOT (exclude all meetings that occur on this weekday from the search).
  • 0 No preference (This weekday will not be a consideration in the search).
  • 1 Return meetings that occur on this weekday.

Default is 0 for all. If no weekdays are specified (either 1 or -1), then the weekday will not be a consideration in the meeting search. If any weekday is specified as 1, then ONLY meetings that occur on the given weekday will be considered in the search, and you must explicitly set any other weekday you wish found.

c_comdef_meeting_search_manager::$sort_array = null [private]

This contains an array of strings that represent the sort keys.

c_comdef_meeting_search_manager::$sort_depth = 3 [private]

An integer. This is how far back a staged sort goes. Default is 3. 0 is forever.

c_comdef_meeting_search_manager::$sort_desc = false [private]

This is set to true if the sort is a reverse sort.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations