Hi all,
For a project I'm working I need to have some sort of enumaration class since the data won't be changed It's useless to store it in a database and exhaust the db-server with unnecessary request. So after reading some related posts on SO I tried the following:
class Model_MaintenanceTerminology
{
const SetDefault = array("id" => 1, "title" => "set 1", "levels" => array("OLM", "ILM", "DLM"));
const SetABC = array("id" => 2, "title" => "A, B, C", "levels" => array("A", "B", "C"));
const SetLevel = array("id" => 3, "title" => "Level 1, Level 2, Level 3, Level 4", "levels" => array(1, 2, 3, 4);
}
The problem is that I have to build a dynamic form and the amount of levels used differ per country (some project related info). So I figured an enum-class like above would perfectly fit for my needs.
Now the problem seems that I can't declare arrays as constants. Anyone some thoughts about a different, better approach?