Unfortunately, the scope bootstrap.phpis equal bootstrap.php, so the variable $adv_typeswill not be available as soon as PHP completes the parsing bootstrap.php.
There are several approaches you can take, depending on your actual requirements.
1:
, , AppController::beforeRender().
app/app_controller.php:
class AppController extends Controller
{
function beforeRender()
{
parent::beforeRender();
$adv_types = array('top' => '', 'left' => '', 'right' => '', 'bottom' => '');
$this->set(compact('adv_types'));
}
}
$adv_types.
2: CakePHP
$adv_types , Configure. bootstrap.php:
Configure::write('NameOfYourAppAsNamespace.adv_types', array('top' => '', 'left' => '', 'right' => '', 'bottom' => ''));
; adv_types , , . , , Configure , .
, CakePHP, Configure::read(). :
$adv_types = Configure::read('NameOfYourAppAsNamespace.adv_types');
3: ,
PHP, :
$GLOBALS['adv_types'] = array('top' => '', 'left' => '', 'right' => '', 'bottom' => '');
, , , . - , .
Edit/Update!
30 Google Translate , , . CakePHP , /// ( ).