A Class for Change Record Objects. More...
Public Member Functions | |
| UpdateToDB () | |
| Updates or adds this instance to 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, $in_change_type_enum, $in_user_id_int, $in_service_body_id_bigint, $in_before_string, $in_after_string, $in_object_class_string, $in_before_obj_id_bigint, $in_after_obj_id_bigint, $in_before_obj_lang_enum=null, $in_after_obj_lang_enum=null, $in_change_id_int=null, $in_change_name_string=null, $in_change_description_string=null, $in_lang_enum=null, $in_datetime_int=null) | |
| The initial setup call for the class. If you send in values, the object will set itself up to use them. | |
| GetObjectClass () | |
| Accessor. Get the Object Class of this change record. | |
| GetID () | |
| Accessor. Get the ID of this change record. | |
| GetChangeType () | |
| Accessor. Get the type of this change record. | |
| GetUserID () | |
| Accessor. Get the ID of the user that created this change record. | |
| GetServiceBodyID () | |
| Accessor. Get the ID of the Service Body that was represented by the user that created this change record. | |
| GetBeforeObjectID () | |
| Accessor. Return the ID of the "before" object. | |
| GetAfterObjectID () | |
| Accessor. Return the ID of the "after" object. | |
| GetChangeDate () | |
| Accessor. Return the date/time the change was made. | |
| GetBeforeSerialized () | |
| Accessor. Return the before object in serialized form. | |
| GetAfterSerialized () | |
| Accessor. Return the after object in serialized form. | |
| GetBeforeObject ($in_parent_object=null) | |
| Return the before object in object form. | |
| GetAfterObject ($in_parent_object=null) | |
| Return the after object in object form. | |
| Rollback () | |
| Rolls the subject of this change to the "before" version. | |
| DescribeChange () | |
| Return a string that describes the change. | |
| DetailedChangeDescription () | |
| Return an array of strings that describes the change in a fairly detailed manner. | |
Private Attributes | |
| $change_id_bigint = null | |
| An integer, containing the unique ID of this change record. | |
| $before_object_string = null | |
| A serialized object (either c_comdef_format or c_comdef_meeting) before the change. | |
| $after_object_string = null | |
| The same object, serialized after the change. | |
| $before_object_id_bigint = null | |
| The ID of the Before Object. | |
| $after_object_id_bigint = null | |
| The ID of the After Object. | |
| $before_object_lang_enum = null | |
| The Language of the Before Object. | |
| $after_object_lang_enum = null | |
| The Language of the After Object. | |
| $change_user_int = null | |
| The ID of the user making the change. | |
| $change_service_body_int = null | |
| The ID of the Service Body on behalf of which the user is acting. | |
| $change_datetime_int = null | |
| The date and time (as a time() seconds value) when the change was made. | |
| $object_class_string = null | |
| The name of the object class that has been serialized. | |
| $change_type_enum = null | |
A Class for Change Record Objects.
This class handles the Model for the way we record changes in the CoMDEF architecture. A change record has a record of who made the change, when it was made, notes on the change, and a "before" and "after" snapshot of the changed entity. Meetings, Users, Service bodies or formats can have changes recorded. If a new entity is created, the "before" is null. If an entity is deleted, then the "after" snapshot is null. Snapshots are serialized objects.
| c_comdef_change::__construct | ( | $ | in_parent_obj, |
| $ | in_change_type_enum, | ||
| $ | in_user_id_int, | ||
| $ | in_service_body_id_bigint, | ||
| $ | in_before_string, | ||
| $ | in_after_string, | ||
| $ | in_object_class_string, | ||
| $ | in_before_obj_id_bigint, | ||
| $ | in_after_obj_id_bigint, | ||
| $ | in_before_obj_lang_enum = null, |
||
| $ | in_after_obj_lang_enum = null, |
||
| $ | in_change_id_int = null, |
||
| $ | in_change_name_string = null, |
||
| $ | in_change_description_string = null, |
||
| $ | in_lang_enum = null, |
||
| $ | in_datetime_int = null |
||
| ) |
The initial setup call for the class. If you send in values, the object will set itself up to use them.
This is the server language.
This is the global language.
Should never be necessary.
If no languages are given for the input objects, we use the main language.
| in_parent_obj | A reference to the parent object for this change object (usually an instance of c_comdef_changes) |
| in_change_type_enum | Enum. The type of change. Can be:
|
| in_user_id_int | Integer. The ID of the user that made this change. |
| in_service_body_id_bigint | Integer. The Service Body the user was acting for. |
| in_before_string | String (serialized object of either c_comdef_format or c_comdef_meeting). The object as it was immediately BEFORE the change. |
| in_after_string | String (serialized object of either c_comdef_format or c_comdef_meeting). The object as it was immediately AFTER the change. |
| in_object_class_string | A string, containing the class of the object[s] being passed in as serialized. |
| in_before_obj_id_bigint | Integer, The ID of the Before Object. |
| in_after_obj_id_bigint | Integer, The ID of the After Object. |
| in_before_obj_lang_enum | Enum, the language of the Before Object. |
| in_after_obj_lang_enum | Enum. The language of the After Object. |
| in_change_id_int | Integer. The unique ID of this change record. If left null, the DB interaction will assign one. |
| in_change_name_string | String. A brief header (1-line description) of the change (optional). |
| in_change_description_string | String. A more detailed description of the change (optional). |
| in_lang_enum | Enum. The language to record the change as. If null, the server or global language will be used. |
| in_datetime_int | Integer containing the UNIX epoch (time() value) of the datetime the change was made. If null, the current time will be used. |
| c_comdef_change::DeleteFromDB | ( | ) |
Deletes this instance from the database.
| a | PDOException if there is a problem. |
Implements i_comdef_db_stored.
| c_comdef_change::DescribeChange | ( | ) |
Return a string that describes the change.
| c_comdef_change::DetailedChangeDescription | ( | ) |
Return an array of strings that describes the change in a fairly detailed manner.
| c_comdef_change::GetAfterObject | ( | $ | in_parent_object = null | ) |
Return the after object in object form.
| in_parent_object | A reference to the parent object for the new object. If null, the server will be used. |
| c_comdef_change::GetAfterObjectID | ( | ) |
Accessor. Return the ID of the "after" object.
| c_comdef_change::GetAfterSerialized | ( | ) |
Accessor. Return the after object in serialized form.
| c_comdef_change::GetBeforeObject | ( | $ | in_parent_object = null | ) |
Return the before object in object form.
| in_parent_object | A reference to the parent object for the new object. If null, the server will be used. |
| c_comdef_change::GetBeforeObjectID | ( | ) |
Accessor. Return the ID of the "before" object.
| c_comdef_change::GetBeforeSerialized | ( | ) |
Accessor. Return the before object in serialized form.
| c_comdef_change::GetChangeDate | ( | ) |
Accessor. Return the date/time the change was made.
| c_comdef_change::GetChangeType | ( | ) |
Accessor. Get the type of this change record.
| c_comdef_change::GetID | ( | ) |
Accessor. Get the ID of this change record.
| c_comdef_change::GetObjectClass | ( | ) |
Accessor. Get the Object Class of this change record.
| c_comdef_change::GetServiceBodyID | ( | ) |
Accessor. Get the ID of the Service Body that was represented by the user that created this change record.
| c_comdef_change::GetUserID | ( | ) |
Accessor. Get the ID of the user that created this change record.
| c_comdef_change::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_change::Rollback | ( | ) |
Rolls the subject of this change to the "before" version.
This will only work if there is a "before," and if the current user is cleared to edit both the before and current versions of the item.
| c_comdef_change::UpdateToDB | ( | ) |
Updates or adds this instance to the database.
| a | PDOException if there is a problem. |
Implements i_comdef_db_stored.
c_comdef_change::$after_object_id_bigint = null [private] |
The ID of the After Object.
c_comdef_change::$after_object_lang_enum = null [private] |
The Language of the After Object.
c_comdef_change::$after_object_string = null [private] |
The same object, serialized after the change.
c_comdef_change::$before_object_id_bigint = null [private] |
The ID of the Before Object.
c_comdef_change::$before_object_lang_enum = null [private] |
The Language of the Before Object.
c_comdef_change::$before_object_string = null [private] |
A serialized object (either c_comdef_format or c_comdef_meeting) before the change.
c_comdef_change::$change_datetime_int = null [private] |
The date and time (as a time() seconds value) when the change was made.
c_comdef_change::$change_id_bigint = null [private] |
An integer, containing the unique ID of this change record.
c_comdef_change::$change_service_body_int = null [private] |
The ID of the Service Body on behalf of which the user is acting.
c_comdef_change::$change_type_enum = null [private] |
The type of change this was Can be:
c_comdef_change::$change_user_int = null [private] |
The ID of the user making the change.
c_comdef_change::$object_class_string = null [private] |
The name of the object class that has been serialized.
1.7.4