A class to hold a single meeting object. More...
Public Member Functions | |
| ReduceToArrays () | |
| Returns the object, in 3 storable arrays. | |
| UpdateToDB ($is_rollback=false) | |
| Updates the DB to the current values of this instance. (replacing current values of the DB). | |
| DeleteFromDB_NoRecord () | |
| Deletes this instance from the database. | |
| DeleteFromDB () | |
| Deletes this instance from the database. | |
| RestoreFromDB () | |
| Updates this instance to the current values in the DB (replacing current values of the instance). | |
| __construct ($in_parent_obj, $inMeetingData) | |
| Constructor. | |
| & | GetMeetingData () |
| Returns a reference to the internal meeting data. | |
| GetMeetingDataKeys () | |
| Returns a list of the available keys in this meeting. | |
| GetMeetingDataValue ($in_key) | |
| Returns a reference to the internal meeting data. | |
| GetMeetingDataPrompt ($in_key) | |
| Returns the internal meeting data string prompt. | |
| IsValidMeeting () | |
| Accessor - Returns true if the meeting data is valid. | |
| IsCopy () | |
| Accessor - Reflects the meeting's status as a duplicate of another. | |
| IsCopyOf () | |
| Accessor - Reflects the meeting's status as a duplicate of another. | |
| IsPublished () | |
| Accessor - Reflects the meeting's published status. | |
| SetPublished ($in_published) | |
| Accessor - Sets the meeting's published status. | |
| GetID () | |
| Accessor - Returns the user ID as an integer. | |
| SetMeetingID ($in_meeting_id_bigint) | |
| Set this meeting's ID. | |
| GetEmailContact () | |
| Get this meeting's Email Contact Address. | |
| SetEmailContact ($in_email_contact) | |
| Set this meeting's Email Contact Address This "vets" the email address, to ensure it has the appropriate structure. It won't set the address if it is not the appropriate structure. | |
| GetServiceBodyID () | |
| Get this meeting's Service Body ID. | |
| SetServiceBodyID ($in_service_body_id) | |
| Set this meeting's Service Body ID. | |
| & | GetServiceBodyObj () |
| Get this meeting's Service Body, as a reference to an object. | |
| GetServiceBodyName () | |
| Get this meeting's Service Body name, as a string. | |
| AddDataField ($in_key_enum, $in_field_prompt_string, $in_value_mixed, $in_lang_enum=null, $in_visibility=null, $in_force=false) | |
| Add a new data field to the object. If the field already exists, then the existing field is changed to match the new data. | |
| DeleteDataField ($in_key_enum) | |
| Deletes a data field. Will not delete a principal field. | |
| GetMeetingLang () | |
| Get this meeting's Language Enum. | |
| GetMeetingAddressString ($in_list=false) | |
| Get this meeting's Address in the string format specified for this server. | |
| AddFormat ($in_format) | |
| Add a format to the meeting (by code). | |
| RemoveFormat ($in_format) | |
| Remove a format from the meeting (by code). | |
| SerializeObject () | |
| Returns a storable serialization of the object, as a string. | |
| GetContactEmail ($in_recursive=false) | |
| Get the contact email for this meeting. If $in_recursive is false, then it simply looks at this meeting's Service Body. | |
| UserCanEdit ($in_user_object=null) | |
| Test to see if a user is allowed to edit an instance (change the data). | |
| UserCanObserve ($in_user_object=null) | |
| Test to see if a user is allowed to observe an instance (view the data). | |
Static Public Member Functions | |
| static | GetAddressDataItemKeys ($in_list=false) |
| Return an array of data item keys that are used to build an address. | |
| static | GetAddressDataItemBuilder ($in_list=false) |
| Return an array of data item keys, as well as their prefixes and suffixes, that are used to build an address. | |
| static | GetAllMeetingKeys () |
| Returns an array of strings, containing the keys (table columns) used for all meetings (specified in ID 0 table rows). | |
| static | GetDataTableTemplate ($in_lang_enum=null) |
| Returns an array that provides a template for the data table values (the optional/additional values). | |
| static | GetLongDataTableTemplate ($in_lang_enum=null) |
| Returns an array that provides a template for the long data table values (the optional/additional values). | |
| static | format_sorter_preference ($a, $b) |
| Determines which format goes first (used in sorting). | |
| static | format_sorter_simple ($a, $b) |
| Determines which format goes first (used in sorting). Very simple version, with no preferences. | |
| static | UnserializeObject ($in_parent, $serialized_array) |
| This takes a serialized object, and instantiates a new object from it. | |
| static | process_meeting_row ($row, $data_rows=null, $longdata_rows=null) |
| This processes the data retrieved from a single main table meeting. It will look up the corollary data in the data and longdata tables, and will consolidate it into an atomic array. It will also return c_comdef_format objects for the formats in the server language. | |
Private Attributes | |
| $_my_meeting_data = null | |
| This is the data for this meeting. | |
A class to hold a single meeting object.
| c_comdef_meeting::__construct | ( | $ | in_parent_obj, |
| $ | inMeetingData | ||
| ) |
Constructor.
This sets the local ID and the parent object.
| c_comdef_meeting::AddDataField | ( | $ | in_key_enum, |
| $ | in_field_prompt_string, | ||
| $ | in_value_mixed, | ||
| $ | in_lang_enum = null, |
||
| $ | in_visibility = null, |
||
| $ | in_force = false |
||
| ) |
Add a new data field to the object. If the field already exists, then the existing field is changed to match the new data.
| in_key_enum | The data field key, which is a string enum for the field. |
| in_field_prompt_string | A string, containing the field prompt. |
| in_value_mixed | The value of the data field, which can be passed by reference. |
| in_lang_enum | The language enum. Optional. If not specified, the meeting value will be used. |
| in_visibility | The visibility of the data field. An integer.
|
| in_force | If this is set to true, then the value is written, regardless of whether or not it is already set. Default is false. |
| c_comdef_meeting::AddFormat | ( | $ | in_format | ) |
Add a format to the meeting (by code).
Given an integer, representing the format code, it will add it to the meeting, and will reference the object for the meeting's language for that format.
| in_format | An integer, containing the format to be added. |
| c_comdef_meeting::DeleteDataField | ( | $ | in_key_enum | ) |
Deletes a data field. Will not delete a principal field.
| in_key_enum | The data field key, which is a string enum for the field. |
| c_comdef_meeting::DeleteFromDB | ( | ) |
Deletes this instance from the database.
| a | PDOException if there is a problem. |
Implements i_comdef_db_stored.
| c_comdef_meeting::DeleteFromDB_NoRecord | ( | ) |
Deletes this instance from the database.
| a | PDOException if there is a problem. |
| static c_comdef_meeting::format_sorter_preference | ( | $ | a, |
| $ | b | ||
| ) | [static] |
Determines which format goes first (used in sorting).
Format 4 (Closed) and format 17 (Open) are always in front. Otherwise, it's a simple numeric sort.
| a | The first value to check |
| b | The second value to check |
| static c_comdef_meeting::format_sorter_simple | ( | $ | a, |
| $ | b | ||
| ) | [static] |
Determines which format goes first (used in sorting). Very simple version, with no preferences.
| a | The first value to check |
| b | The second value to check |
| static c_comdef_meeting::GetAddressDataItemBuilder | ( | $ | in_list = false | ) | [static] |
Return an array of data item keys, as well as their prefixes and suffixes, that are used to build an address.
| an | exception if there is a problem. |
| in_list | If this is true, then the return is for the list view. If false, for the "More Details" screen. |
| static c_comdef_meeting::GetAddressDataItemKeys | ( | $ | in_list = false | ) | [static] |
Return an array of data item keys that are used to build an address.
| an | exception if there is a problem. |
| in_list | If this is true, then the return is for the list view. If false, for the "More Details" screen. |
| static c_comdef_meeting::GetAllMeetingKeys | ( | ) | [static] |
Returns an array of strings, containing the keys (table columns) used for all meetings (specified in ID 0 table rows).
| a | PDOException if there is a problem. |
Referenced by DisplaySearchResultsCSV(), GetAddressDataItemBuilder(), GetAddressDataItemKeys(), and c_comdef_meeting_search_manager::GetAllAvailableSortKeys().
| c_comdef_meeting::GetContactEmail | ( | $ | in_recursive = false | ) |
Get the contact email for this meeting. If $in_recursive is false, then it simply looks at this meeting's Service Body.
| in_recursive | If this is true, then the function will return a recursive result. Default is false. |
| static c_comdef_meeting::GetDataTableTemplate | ( | $ | in_lang_enum = null | ) | [static] |
Returns an array that provides a template for the data table values (the optional/additional values).
| a | PDOException if there is a problem. |
| in_lang_enum | The language to use. If not given the server default will be used. |
Referenced by ApplyDataItem(), DisplayDataEditor(), and DisplayMeetingForEdit().
| c_comdef_meeting::GetEmailContact | ( | ) |
Get this meeting's Email Contact Address.
| c_comdef_meeting::GetID | ( | ) |
Accessor - Returns the user ID as an integer.
Referenced by DisplayMeeting().
| static c_comdef_meeting::GetLongDataTableTemplate | ( | $ | in_lang_enum = null | ) | [static] |
Returns an array that provides a template for the long data table values (the optional/additional values).
| a | PDOException if there is a problem. |
| in_lang_enum | The language to use. If not given the server default will be used. |
Referenced by ApplyDataItem(), DisplayDataEditor(), and DisplayMeetingForEdit().
| c_comdef_meeting::GetMeetingAddressString | ( | $ | in_list = false | ) |
Get this meeting's Address in the string format specified for this server.
| in_list | If this is true, then the version returned will be for the list display. Default is false (The More Details display). |
Referenced by DisplayMeeting().
| & c_comdef_meeting::GetMeetingData | ( | ) |
Returns a reference to the internal meeting data.
| c_comdef_meeting::GetMeetingDataKeys | ( | ) |
Returns a list of the available keys in this meeting.
| c_comdef_meeting::GetMeetingDataPrompt | ( | $ | in_key | ) |
Returns the internal meeting data string prompt.
| in_key | A string. This is the key in the data array. |
| c_comdef_meeting::GetMeetingDataValue | ( | $ | in_key | ) |
Returns a reference to the internal meeting data.
| in_key | A string. This is the key in the data array. |
Referenced by DisplayMeeting().
| c_comdef_meeting::GetMeetingLang | ( | ) |
Get this meeting's Language Enum.
| c_comdef_meeting::GetServiceBodyID | ( | ) |
Get this meeting's Service Body ID.
| c_comdef_meeting::GetServiceBodyName | ( | ) |
Get this meeting's Service Body name, as a string.
| & c_comdef_meeting::GetServiceBodyObj | ( | ) |
Get this meeting's Service Body, as a reference to an object.
| c_comdef_meeting::IsCopy | ( | ) |
Accessor - Reflects the meeting's status as a duplicate of another.
| c_comdef_meeting::IsCopyOf | ( | ) |
Accessor - Reflects the meeting's status as a duplicate of another.
| c_comdef_meeting::IsPublished | ( | ) |
Accessor - Reflects the meeting's published status.
| c_comdef_meeting::IsValidMeeting | ( | ) |
Accessor - Returns true if the meeting data is valid.
| static c_comdef_meeting::process_meeting_row | ( | $ | row, |
| $ | data_rows = null, |
||
| $ | longdata_rows = null |
||
| ) | [static] |
This processes the data retrieved from a single main table meeting. It will look up the corollary data in the data and longdata tables, and will consolidate it into an atomic array. It will also return c_comdef_format objects for the formats in the server language.
| row | One row of meeting data, fresh from the database. |
| data_rows | These are used to unserialize the object, which bypasses the database. Optional. If non-null, this should be an array of data table values |
| longdata_rows | Optional. If non-null, this should be an array of longdata table values |
Referenced by c_comdef_server::GetMeetingsFromSQL(), and c_comdef_server::GetOneMeeting().
| c_comdef_meeting::ReduceToArrays | ( | ) |
Returns the object, in 3 storable arrays.
This "unwinds" the object's central data, turning it from a single compound array, with object references, into 3 standalone arrays.
| c_comdef_meeting::RemoveFormat | ( | $ | in_format | ) |
Remove a format from the meeting (by code).
Given an integer, representing the format code, it will remove it from the meeting.
| in_format | An integer, containing the format to be removed. |
| c_comdef_meeting::RestoreFromDB | ( | ) |
Updates this instance to the current values in the DB (replacing current values of the instance).
| a | PDOException if there is a problem. |
Implements i_comdef_db_stored.
| c_comdef_meeting::SerializeObject | ( | ) |
Returns a storable serialization of the object, as a string.
This is only used for the changes, as the serialized string may not be easily searched.
Implements i_comdef_serialized.
| c_comdef_meeting::SetEmailContact | ( | $ | in_email_contact | ) |
Set this meeting's Email Contact Address This "vets" the email address, to ensure it has the appropriate structure. It won't set the address if it is not the appropriate structure.
| in_email_contact | A string. The contact email address. |
| c_comdef_meeting::SetMeetingID | ( | $ | in_meeting_id_bigint | ) |
Set this meeting's ID.
| in_meeting_id_bigint | An integer, with the meeting's new ID. |
| c_comdef_meeting::SetPublished | ( | $ | in_published | ) |
Accessor - Sets the meeting's published status.
| in_published | A boolean. True if the meeting is published. |
| c_comdef_meeting::SetServiceBodyID | ( | $ | in_service_body_id | ) |
Set this meeting's Service Body ID.
| in_service_body_id | An integer, the ID of the new Service Body for this meeting. |
| static c_comdef_meeting::UnserializeObject | ( | $ | in_parent, |
| $ | serialized_array | ||
| ) | [static] |
This takes a serialized object, and instantiates a new object from it.
| in_parent | The parent object. |
| serialized_array | String containing 3 sequential arrays, each with the serialized data. |
Implements i_comdef_serialized.
Referenced by c_comdef_change::GetAfterObject(), and c_comdef_change::GetBeforeObject().
| c_comdef_meeting::UpdateToDB | ( | $ | is_rollback = false | ) |
Updates the DB to the current values of this instance. (replacing current values of the DB).
| a | PDOException if there is a problem. |
We give the prepared statement a token, that will be filled by a value.
We give the value by declaring an associative array element with the token name.
We give the prepared statement a token, that will be filled by a value.
We give the value by declaring an associative array element with the token name.
We give the prepared statement a token, that will be filled by a value.
We give the value by declaring an associative array element with the token name.
| is_rollback | If true, this is a rollback operation. |
| c_comdef_meeting::UserCanEdit | ( | $ | in_user_object = null | ) |
Test to see if a user is allowed to edit an instance (change the data).
| in_user_object | A reference to a c_comdef_user object, for the user to be validated. If null, or not supplied, the server current user is tested. |
Implements i_comdef_auth.
Referenced by DisplayMeeting().
| c_comdef_meeting::UserCanObserve | ( | $ | in_user_object = null | ) |
Test to see if a user is allowed to observe an instance (view the data).
| in_user_object | A reference to a c_comdef_user object, for the user to be validated. If null, or not supplied, the server current user is tested. |
c_comdef_meeting::$_my_meeting_data = null [private] |
This is the data for this meeting.
1.7.4