create functions based on array values
Can you use the __call PHP class functionality? http://www.php.net/manual/en/language.oop5.overloading.php#object.call You could use __call in your class and call your function for grabbing the page types and check them against the $name (first) argument and running custom code against it. For instance: __call ($name, $args) { $types = array (‘type_a’, ‘type_b’, ‘type_c’); if (in_array($name, $types) { … Read more