Public Member Functions | Static Public Member Functions | Private Attributes
c_comdef_meeting Class Reference

A class to hold a single meeting object. More...

List of all members.

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.

Detailed Description

A class to hold a single meeting object.


Constructor & Destructor Documentation

c_comdef_meeting::__construct ( in_parent_obj,
inMeetingData 
)

Constructor.

This sets the local ID and the parent object.


Member Function Documentation

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.

Returns:
a bool that is true, if the operation was successful.
Parameters:
in_key_enumThe data field key, which is a string enum for the field.
in_field_prompt_stringA string, containing the field prompt.
in_value_mixedThe value of the data field, which can be passed by reference.
in_lang_enumThe language enum. Optional. If not specified, the meeting value will be used.
in_visibilityThe visibility of the data field. An integer.
  • null or 0 if completely visible (default)
  • 1 if visible only to logged-in admins and internal processes
  • 2 if visible only when displayed on a regular Web page or a Mobile page
  • 3 if visible only when displayed on a regular Web page
  • 4 if visible only when displayed on a Mobile page
  • 5 if visible only when printed
in_forceIf 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.

Returns:
true if the format was not already there, and false if the format was there.
Parameters:
in_formatAn integer, containing the format to be added.
c_comdef_meeting::DeleteDataField ( in_key_enum)

Deletes a data field. Will not delete a principal field.

Returns:
a bool that is true, if the operation was successful.
Parameters:
in_key_enumThe data field key, which is a string enum for the field.
c_comdef_meeting::DeleteFromDB ( )

Deletes this instance from the database.

Returns:
true if successful, false, otherwise.
Exceptions:
aPDOException if there is a problem.

Implements i_comdef_db_stored.

c_comdef_meeting::DeleteFromDB_NoRecord ( )

Deletes this instance from the database.

Returns:
true if successful, false, otherwise.
Exceptions:
aPDOException 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.

Returns:
-1 if $a is 4, 17, or less than $b, 0 if they are equal, and 1 if $b is 4, 17 or less than $a
Parameters:
aThe first value to check
bThe 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.

Returns:
-1 if $a is less than $b, 0 if they are equal, and 1 if $b is less than $a
Parameters:
aThe first value to check
bThe 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.

Returns:
an array of strings, containing the data item field keys.
Exceptions:
anexception if there is a problem.
Parameters:
in_listIf 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.

Returns:
an array of strings, containing the data item field keys.
Exceptions:
anexception if there is a problem.
Parameters:
in_listIf 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).

Returns:
an array of strings, with the key being the same as the value. NOTE: This contains ALL possible keys.
Exceptions:
aPDOException 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.

Returns:
a string, which is the contact email for this meeting
Parameters:
in_recursiveIf 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).

Returns:
an array with all of the _data values.
Exceptions:
aPDOException if there is a problem.
Parameters:
in_lang_enumThe 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.

Returns:
a string, which is the contact email.
c_comdef_meeting::GetID ( )

Accessor - Returns the user ID as an integer.

Returns:
an integer, containing the user ID.

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).

Returns:
an array with all of the _longdata values.
Exceptions:
aPDOException if there is a problem.
Parameters:
in_lang_enumThe 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.

Returns:
a string, containing the meeting's address in easily-readable form.
Parameters:
in_listIf 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.

Returns:
a reference to the internal array, containing the meeting data.
c_comdef_meeting::GetMeetingDataKeys ( )

Returns a list of the available keys in this meeting.

Returns:
an array of strings, with each one being a key.
c_comdef_meeting::GetMeetingDataPrompt ( in_key)

Returns the internal meeting data string prompt.

Returns:
a string. Null if the element is not there.
Parameters:
in_keyA string. This is the key in the data array.
c_comdef_meeting::GetMeetingDataValue ( in_key)

Returns a reference to the internal meeting data.

Returns:
a reference to the value of the requested element. Null if the element is not there.
Parameters:
in_keyA string. This is the key in the data array.

Referenced by DisplayMeeting().

c_comdef_meeting::GetMeetingLang ( )

Get this meeting's Language Enum.

Returns:
a string, containing the meeting's language.
c_comdef_meeting::GetServiceBodyID ( )

Get this meeting's Service Body ID.

Returns:
an integer, which is the ID of the Service Body for this meeting.
c_comdef_meeting::GetServiceBodyName ( )

Get this meeting's Service Body name, as a string.

Returns:
a reference to an instance of c_comdef_service_body, which is the Service Body object for this meeting.
& c_comdef_meeting::GetServiceBodyObj ( )

Get this meeting's Service Body, as a reference to an object.

Returns:
a reference to an instance of c_comdef_service_body, which is the Service Body object for this meeting.
c_comdef_meeting::IsCopy ( )

Accessor - Reflects the meeting's status as a duplicate of another.

Returns:
a boolean, true if the meeting is a duplicate.
c_comdef_meeting::IsCopyOf ( )

Accessor - Reflects the meeting's status as a duplicate of another.

Returns:
an integer, if the meeting is a duplicate, it is the ID of the meeting it copies.
c_comdef_meeting::IsPublished ( )

Accessor - Reflects the meeting's published status.

Returns:
a boolean, true if the meeting is published.
c_comdef_meeting::IsValidMeeting ( )

Accessor - Returns true if the meeting data is valid.

Returns:
a boolean, true if the meeting is valid (has data).
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.

Returns:
an array of data that can be used as the data for the meeting object.
Parameters:
rowOne row of meeting data, fresh from the database.
data_rowsThese are used to unserialize the object, which bypasses the database. Optional. If non-null, this should be an array of data table values
longdata_rowsOptional. 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.

Returns:
an array, containing 3 arrays; one for each table.
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.

Returns:
true if successful, and false if the format was not there.
Parameters:
in_formatAn 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).

Exceptions:
aPDOException 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.

Returns:
an array, containing the 3 component strings, each one a table array, in serialized form.

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.

Returns:
a boolean, which is true if the address was set correctly.
Parameters:
in_email_contactA string. The contact email address.
c_comdef_meeting::SetMeetingID ( in_meeting_id_bigint)

Set this meeting's ID.

Parameters:
in_meeting_id_bigintAn integer, with the meeting's new ID.
c_comdef_meeting::SetPublished ( in_published)

Accessor - Sets the meeting's published status.

Parameters:
in_publishedA boolean. True if the meeting is published.
c_comdef_meeting::SetServiceBodyID ( in_service_body_id)

Set this meeting's Service Body ID.

Returns:
an integer, which is the previous ID of the Service Body for this meeting.
Parameters:
in_service_body_idAn 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.

Returns:
a new instance of c_comdef_meeting, set up according to the serialized data passed in.
Parameters:
in_parentThe parent object.
serialized_arrayString 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).

Returns:
true if successful, false, otherwise.
Exceptions:
aPDOException 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.

Parameters:
is_rollbackIf 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).

Returns:
true, if the user is allowed to edit, false, otherwise.
Parameters:
in_user_objectA 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).

Returns:
true, if the user is allowed to observe, false, otherwise.
Parameters:
in_user_objectA reference to a c_comdef_user object, for the user to be validated. If null, or not supplied, the server current user is tested.

Member Data Documentation

c_comdef_meeting::$_my_meeting_data = null [private]

This is the data for this meeting.


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