Include the format class. More...
Public Member Functions | |
| __construct ($in_parent_obj, $in_array) | |
| Constructor. Sets the parent object. | |
| & | GetFormatsArray () |
| Accessor -Get the format object array. | |
| GetFormatBySharedIDCodeAndLanguage ($in_shared_id_bigint, $in_lang_enum=null) | |
| Return a reference to a single object, by shared ID and language. | |
| GetFormatsBySharedIDCode ($in_shared_id_bigint) | |
| Return all the formats that share a given shared ID code. | |
| GetFormatsByLanguage ($in_lang_enum=null) | |
| Return all the formats that share a given language. | |
| GetFormatsByString ($in_string, $in_lang_enum=null) | |
| Return all the formats that contain the given string. | |
| SetParentObj ($in_parent_obj) | |
| Set the parent object of this instance. | |
| GetParentObj () | |
| Return a reference to the parent object of this instance. | |
Private Attributes | |
| $_local_id_parent_obj = null | |
| This is the parent (container) object that holds this instance. | |
| $_local_copy_of_array = null | |
Include the format class.
A Class for Aggregating Format Codes
This class acts as an array aggregator for c_comdef_format objects. It is a class unto itself, because we want to have a couple of additional filtering options (like the ability to get a bunch of formats that share a _shared_id_bigint code).
The formats are kept in a simple two-dimensional array:
$_local_copy_of_array = array[$lang_enum][$shared_id_bigint]
The combination of shared ID and language needs to be unique. This is how we match formats to languages. The same shared ID is used throughout the system, and we use the localization to return its key and description in the appropriate language.
| c_comdef_formats::__construct | ( | $ | in_parent_obj, |
| $ | in_array | ||
| ) |
Constructor. Sets the parent object.
| c_comdef_formats::GetFormatBySharedIDCodeAndLanguage | ( | $ | in_shared_id_bigint, |
| $ | in_lang_enum = null |
||
| ) |
Return a reference to a single object, by shared ID and language.
You do not need to provide a language, in which case, the server's local language is used.
If no language is given, we use the server's native language.
| in_shared_id_bigint | This is the shared ID code. |
| in_lang_enum | This is the code for the desired language. If not given, the server localization will be used. |
| & c_comdef_formats::GetFormatsArray | ( | ) |
Accessor -Get the format object array.
| c_comdef_formats::GetFormatsByLanguage | ( | $ | in_lang_enum = null | ) |
Return all the formats that share a given language.
You do not need to provide a language, in which case, the server's local language is used.
If no language is given, we use the server's native language.
| in_lang_enum | This is the code for the desired language. If not given, the server localization will be used. |
| c_comdef_formats::GetFormatsBySharedIDCode | ( | $ | in_shared_id_bigint | ) |
Return all the formats that share a given shared ID code.
| in_shared_id_bigint | This is the shared ID code. |
| c_comdef_formats::GetFormatsByString | ( | $ | in_string, |
| $ | in_lang_enum = null |
||
| ) |
Return all the formats that contain the given string.
If the language is English or Spanish, this does a metaphone search of all all the strings in the "en" or "es" formats. If it is any other language, then a simple string search is performed.
If no language is given, we use the server's native language.
We force the search to happen in lowercase. This is a very basic search.
If we will use metaphone, we convert our search criteria to metaphone keys.
We will look in each of the text fields for our string.
| in_string | This is the string to search for. |
| in_lang_enum | This is the code for the desired language. If not given, the server localization will be used. |
| c_comdef_formats::GetParentObj | ( | ) |
Return a reference to the parent object of this instance.
Implements i_comdef_has_parent.
| c_comdef_formats::SetParentObj | ( | $ | in_parent_obj | ) |
Set the parent object of this instance.
| in_parent_obj | A reference to the parent object. |
Implements i_comdef_has_parent.
c_comdef_formats::$_local_copy_of_array = null [private] |
We keep a local copy of the simple array, because we can instantly access it, as opposed to having to instantiate iterators.
c_comdef_formats::$_local_id_parent_obj = null [private] |
This is the parent (container) object that holds this instance.
1.7.4