A Class for Format Codes. More...
Public Member Functions | |
| 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 without recording it. | |
| 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_shared_id_bigint=null, $in_format_type_string=null, $in_key_string=null, $in_icon_blob=null, $in_worldid_mixed=null, $in_lang_enum=null, $in_name_string=null, $in_description_string=null) | |
| The initial setup call for the class. If you send in values, the object will set itself up to use them. | |
| SetSharedID ($in_shared_id_bigint) | |
| Accessor -Set the shared ID. | |
| GetSharedID () | |
| Accessor -Get a reference to the shared ID. | |
| SetFormatType ($in_format_type_string) | |
| Accessor -Sets the format type code. | |
| & | GetFormatType () |
| Accessor -Returns a reference to the format type code. | |
| SetKey ($in_key_string) | |
| Accessor -Sets the format key (the 1-3 letter code that represents the format). | |
| & | GetKey () |
| Accessor -Returns a reference to the _key_string data member. | |
| SetIcon ($in_icon_blob) | |
| Accessor -Sets a 64-pixel-square image (as a GIF), to be used to indicate the format. | |
| & | GetIcon () |
| Accessor -Returns a reference to the _icon_blob data member. | |
| SetFormatCodes ($in_format_code_array) | |
| Accessor -Sets a brief description string for the format, in whatever language has been selected. | |
| & | GetFormatCodes () |
| Accessor -Returns a reference to the _format_codes data member. | |
| SerializeObject () | |
| Returns a storable serialization of the object, as a string. | |
| UserCanEdit ($in_user_object=null) | |
| Test to see if a user is allowed to edit an instance (change the data). | |
Static Public Member Functions | |
| static | UnserializeObject ($in_parent, $serialized_array) |
| This takes the serialized data, and instantiates a new object from it. | |
Public Attributes | |
| $_shared_id_bigint = null | |
| The shared ID (for multiple instances of the same format code). | |
| $_format_type_string = null | |
| This is the type of format. | |
| $_key_string = null | |
| The Format Key, in Text Form. | |
| $_icon_blob = null | |
| The Format Icon, as a 64-pixel-square Icon, in GIF format. | |
| $_format_codes = null | |
| This will be an array of the format types (localized). | |
A Class for Format Codes.
This class handles the model for the NA Meeting Format Codes. The codes are stored one code per language per instance of this class. If codes are related (Same code, different languages), then you should give them all the same shared ID.
| c_comdef_format::__construct | ( | &$ | in_parent_obj, |
| $ | in_shared_id_bigint = null, |
||
| $ | in_format_type_string = null, |
||
| $ | in_key_string = null, |
||
| $ | in_icon_blob = null, |
||
| $ | in_worldid_mixed = null, |
||
| $ | in_lang_enum = null, |
||
| $ | in_name_string = null, |
||
| $ | in_description_string = 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.
Should never be necessary.
This gets us the format codes, with their localized descriptions.
| in_parent_obj | The object that "owns" this instance. |
| in_shared_id_bigint | The shared ID (If this is the same as other formats -used for different languages). |
| in_format_type_string | The format code type
|
| in_key_string | The format Key, as a text string (1-3 Characters). |
| in_icon_blob | The format icon, as 64-pixel-square GIF image data. |
| in_worldid_mixed | The t_comdef_world_type Class: The NAWS ID for this format (can be the same as other format IDs) |
| in_lang_enum | The t_comdef_local_type Class The language to be used for this instance (if null, the server language is used). |
| in_name_string | The name of this instance |
| in_description_string | A verbose description |
| c_comdef_format::DeleteFromDB | ( | ) |
Deletes this instance from the database.
| a | PDOException if there is a problem. |
Implements i_comdef_db_stored.
| c_comdef_format::DeleteFromDB_NoRecord | ( | ) |
Deletes this instance from the database without recording it.
| a | PDOException if there is a problem. |
| & c_comdef_format::GetFormatCodes | ( | ) |
Accessor -Returns a reference to the _format_codes data member.
| & c_comdef_format::GetFormatType | ( | ) |
Accessor -Returns a reference to the format type code.
| & c_comdef_format::GetIcon | ( | ) |
Accessor -Returns a reference to the _icon_blob data member.
| & c_comdef_format::GetKey | ( | ) |
Accessor -Returns a reference to the _key_string data member.
| c_comdef_format::GetSharedID | ( | ) |
Accessor -Get a reference to the shared ID.
| c_comdef_format::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_format::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_format::SetFormatCodes | ( | $ | in_format_code_array | ) |
Accessor -Sets a brief description string for the format, in whatever language has been selected.
< Make sure we copy it.
| in_format_code_array | An associative array, with the format codes. |
| c_comdef_format::SetFormatType | ( | $ | in_format_type_string | ) |
Accessor -Sets the format type code.
| in_format_type_string | - An enumerated string value, representing the classification of the format:
|
| c_comdef_format::SetIcon | ( | $ | in_icon_blob | ) |
Accessor -Sets a 64-pixel-square image (as a GIF), to be used to indicate the format.
| in_icon_blob | The GIF image, as a stream of binary data. |
| c_comdef_format::SetKey | ( | $ | in_key_string | ) |
Accessor -Sets the format key (the 1-3 letter code that represents the format).
| in_key_string | The format Key, as a text string (1-3 Characters) |
| c_comdef_format::SetSharedID | ( | $ | in_shared_id_bigint | ) |
Accessor -Set the shared ID.
The shared ID may be the same for a number of different instances. It is how we link different language versions of the same format together.
| in_shared_id_bigint | The shared ID (If this is the same as other formats -used for different languages). |
| static c_comdef_format::UnserializeObject | ( | $ | in_parent, |
| $ | serialized_array | ||
| ) | [static] |
This takes the serialized data, and instantiates a new object from it.
| in_parent | The parent object. |
| serialized_array | An array containing the serialized data. |
Implements i_comdef_serialized.
Referenced by c_comdef_change::GetAfterObject(), and c_comdef_change::GetBeforeObject().
| c_comdef_format::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. |
Set the values for this instance, to be stored in the database.
< This is used to keep track of the first iteration, to prevent a comma before it.
< This is the prepared statement value array.
Create a new entry.
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_format::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.
| c_comdef_format::$_format_codes = null |
This will be an array of the format types (localized).
| c_comdef_format::$_format_type_string = null |
This is the type of format.
| c_comdef_format::$_icon_blob = null |
The Format Icon, as a 64-pixel-square Icon, in GIF format.
| c_comdef_format::$_key_string = null |
The Format Key, in Text Form.
| c_comdef_format::$_shared_id_bigint = null |
The shared ID (for multiple instances of the same format code).
1.7.4