public static function setAccessControlAllowOriginHeader() { // TODO: review! $allowed_hosts = \OLOG\ConfWrapper::value('access_control_allow_origin_header', ''); if ($allowed_hosts != '') { header('Access-Control-Allow-Origin: ' . $allowed_hosts); } }
public function testGetOptionalSubvalue() { $this->assertEquals(self::TEST_DEFAULT_VALUE, \OLOG\ConfWrapper::getOptionalSubvalue(self::TEST_CONFIG_ARR, self::TEST_FIRST_LEVEL_ARR_KEY . '.' . self::TEST_NOT_EXISTING_KEY, self::TEST_DEFAULT_VALUE)); $this->assertEquals(self::TEST_VALUE, \OLOG\ConfWrapper::getOptionalSubvalue(self::TEST_CONFIG_ARR, self::TEST_FIRST_LEVEL_ARR_KEY . '.' . self::TEST_SECOND_LEVEL_STRING_KEY)); }