Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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));
 }