예제 #1
0
파일: App.php 프로젝트: Talesoft/tale-base
 private static function _setPhpOptions()
 {
     $options = Config::get('php-options', []);
     foreach ($options as $name => $value) {
         ini_set(StringUtil::dasherize($name, '.'), $value);
     }
 }
예제 #2
0
 public static function getHeaders()
 {
     foreach ($_SERVER as $name => $value) {
         if (strncmp($name, 'HTTP_', 5) === 0) {
             $name = StringUtil::dasherize(StringUtil::humanize(strtolower(substr($name, 5))));
             (yield $name => $value);
         }
     }
 }
예제 #3
0
 public static function getHeadersFromEnvironment()
 {
     self::_validateWebEnvironment();
     foreach ($_SERVER as $name => $value) {
         if (strncmp($name, 'HTTP_', 5) === 0) {
             $name = StringUtil::dasherize(StringUtil::humanize(strtolower(substr($name, 5))));
             (yield $name => $value);
         }
     }
 }