function loadTestConfig() { $configFile = \dirname(__FILE__) . \DIRECTORY_SEPARATOR . 'config.ini'; if (!\file_exists($configFile)) { print 'No configuration file exists. Please copy ' . \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'config_example.ini to ' . $configFile . " and edit it to set the right configuration options\n"; die(1); } \BeeHub::loadConfig($configFile); \BeeHub::changeConfigField('namespace', 'admin_group', '/system/groups/admin'); }
} if (is_null($contentType)) { $finfo = new finfo(FILEINFO_MIME); $contentType = $finfo->file(self::localPath($path)); } if ($contentType === false) { return null; } return $contentType; } /** * Starts a session * * @api * @return void */ public static function startSession() { // This should actually be tested with session_status(), but that does not exist in PHP 5.3 yet if (session_status() === PHP_SESSION_NONE && php_sapi_name() !== 'cli') { session_start(); } } } // class BeeHub // When PHP 5.4 is more widely adapted, all calls to BeeHub::$CONFIG['some_key'] // should be replaced by BeeHub::config()['some_key']. But as PHP 5.3.3 and // earlier don't support this, let's not make things more complicated and make // BeeHub::$CONFIG public and call BeeHub::loadConfig() here so it is always filled. BeeHub::loadConfig(); // End of file