When development time matters, everything that others can help is the goal. My PHP application is now parameterized and configured with an included file that contains an array in the form:
$config = array(
'company' => 'BMC' ,
'aplicable_tax' => .21 ,
'context_arr' => array(
'case1' => 12,
'case2' => 13,
'case3' => 14
),
'EN_welcome_text' => 'hello',
'xx_maxref'=> 5,
'xx_range' => array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
'xx_comp' => array(
array( 0, 3, 5, 5, 5, 5, 5, 5, 5, 5),
array(-3, 0, 3, 5, 5, 5, 5, 5, 5, 5),
array(-5,-3, 0, 3, 5, 5, 5, 5, 5, 5),
array(-5,-5,-3, 0, 3, 5, 5, 5, 5, 5),
array(-5,-5,-5,-3, 0, 3, 5, 5, 5, 5),
array(-5,-5,-5,-5,-3, 0, 3, 5, 5, 5),
array(-5,-5,-5,-5,-5,-3, 0, 3, 5, 5),
array(-5,-5,-5,-5,-5,-5,-3, 0, 3, 5),
array(-5,-5,-5,-5,-5,-5,-5,-3, 0, 3),
array(-5,-5,-5,-5,-5,-5,-5,-5,-3, 0),
),
)
But this approach is unsafe, because any authorized editor can enter PHP code or errors.
My questions:
- Can you offer a simple and flexible format to give three parties the ability to parameterize a PHP application?
- Is there a script conversion from this format to PHP?