Bootstrap.php değişkenler geçmek için nasıl

0 Cevap php

Ben bootstrap.php değişkenler geçmek nasıl bir yolu var mı? Bu benim index.php önyükleyebilmek nasıl:

// let's go!
$application = new Zend_Application(APPLICATION_ENVIRONMENT,
                                    APPLICATION_PATH.'/configs/application.ini');

try {
    $application->bootstrap();
    $application->run();
} catch (Exception $exception) {
    echo $exception->getMessage();
    exit(1);
}

Benim bootstrap.php sınıfının bir yöntemi ben index.php ve kullanarak $ GLOBALS bazı değişkenlere erişimi olması gerekir sadece korkunç:

protected function _initFilePathConverter()
{
    require_once (PATH_TO_LIB_UTIL.'/FilePathConverter.php');
    $this->aFilePathConverter = new FilePathConverter();
    $this->aFilePathConverter->AddPathPairs($GLOBALS['REAL_PATHS'], $GLOBALS['HTTP_PATHS']);
}

0 Cevap