Public Member Functions | Static Public Member Functions | Public Attributes
c_comdef_format Class Reference

A Class for Format Codes. More...

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
in_parent_objThe object that "owns" this instance.
in_shared_id_bigintThe shared ID (If this is the same as other formats -used for different languages).
in_format_type_stringThe format code type
  • An enumerated string value, representing the classification of the format:
    • "FC1" -Meeting Format (Speaker, Book Study, etc.)
    • "FC2" -Location Code (Wheelchair Accessible, Limited Parking, etc.)
    • "FC3" -Attendance Restriction (Men Only, Closed, Open, No Children, etc.)
in_key_stringThe format Key, as a text string (1-3 Characters).
in_icon_blobThe format icon, as 64-pixel-square GIF image data.
in_worldid_mixedThe t_comdef_world_type Class: The NAWS ID for this format (can be the same as other format IDs)
in_lang_enumThe t_comdef_local_type Class The language to be used for this instance (if null, the server language is used).
in_name_stringThe name of this instance
in_description_stringA verbose description

Member Function Documentation

c_comdef_format::DeleteFromDB ( )

Deletes this instance from the database.

Exceptions:
aPDOException if there is a problem.

Implements i_comdef_db_stored.

c_comdef_format::DeleteFromDB_NoRecord ( )

Deletes this instance from the database without recording it.

Returns:
true, if the delete was successful. False, otherwise.
Exceptions:
aPDOException if there is a problem.
& c_comdef_format::GetFormatCodes ( )

Accessor -Returns a reference to the _format_codes data member.

Returns:
The _format_codes data member, as a reference.
& c_comdef_format::GetFormatType ( )

Accessor -Returns a reference to the format type code.

Returns:
The _format_type_string data member, as a reference.
& c_comdef_format::GetIcon ( )

Accessor -Returns a reference to the _icon_blob data member.

Returns:
The _icon_blob data member, as a reference.
& c_comdef_format::GetKey ( )

Accessor -Returns a reference to the _key_string data member.

Returns:
The _key_string data member, as a reference.
c_comdef_format::GetSharedID ( )

Accessor -Get a reference to the shared ID.

Returns:
The _shared_id_bigint data member, as a reference.
c_comdef_format::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_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.

Returns:
an array, containing the object in serialized form.

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.

Parameters:
in_format_code_arrayAn associative array, with the format codes.
c_comdef_format::SetFormatType ( in_format_type_string)

Accessor -Sets the format type code.

Parameters:
in_format_type_string- An enumerated string value, representing the classification of the format:
  • "FC1" -Meeting Format (Speaker, Book Study, etc.)
  • "FC2" -Location Code (Wheelchair Accessible, Limited Parking, etc.)
  • "FC3" -Attendance Restriction (Men Only, Closed, Open, No Children, etc.)
c_comdef_format::SetIcon ( in_icon_blob)

Accessor -Sets a 64-pixel-square image (as a GIF), to be used to indicate the format.

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

Parameters:
in_key_stringThe 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.

Parameters:
in_shared_id_bigintThe 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.

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

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

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

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.


Member Data Documentation

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.

  • An enumerated string value, representing the classification of the format:
    • "FC1" -Meeting Format (Speaker, Book Study, etc.)
    • "FC2" -Location Code (Wheelchair Accessible, Limited Parking, etc.)
    • "FC3" -Attendance Restriction (Men Only, Closed, Open, No Children, etc.)
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).


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