Brimbox Logo Brimbox Version 2.3.4 Released


This is the arrays landing page.

Note: default global array initialization at bb-utilities/bb_arrays.php

Brimbox global arrays are arrays that are global and defined in $array_global. They implement hooks, define the parameters of the interface and outline the security workings. The global array is unpacked into arrays named with the first key of the global array. Some of the arrays, like validation and security, must be available to all interfaces if there are multiple interfaces. However some arrays; like the links and hooks arrays may only exist for a active interface. The global array is defined in the following form:

$array_global['example']... will unpack to $array_example

Typically global arrays have three forms, an action form, an array form and a value form.

The action form of the array is:

$array_example[action][] = $value;

Note that $value is mixed and contains a callable function, usually an array

which is manipulated by:

$main->add_action($set, $action, $value, $priority);
$main->remove_action($unset, $action, $callable, $priority);

The array form is:

$array_example[identifier][$key] = $value;

which is manipulated by:

$main->add_array($set, $identifier, $value, $key);
$main->remove_array($unset, $identifier, $key);

and unpacks to:

$array_example[key] =  $value;

The value form is:

$array_example[$key] = $value;

which is manipulated by:

$main->add_value($set, $value, $key);
$main->remove_value($unset, $key);

Generally in Brimbox arrays should not be named with the prefix $array_ to avoid conflicts with the global array.

Updated: 2018-06-06