Пример #1
0
 public static function setJSON()
 {
     static::Init();
     //Debug::log('Response::setJson()');
     self::$autoHeaders = false;
     self::setHeader(Response::HEADER_CONTENT_TYPE, Mimes::getType('json') . '; charset=utf-8');
 }
Пример #2
0
 public function detectType()
 {
     $result = false;
     if ($this->isOk()) {
         $this->type = Mimes::getType($this->extension);
         $result = $this->type;
     }
     return $result;
 }
Пример #3
0
 /**
  * @dataProvider mimesList
  */
 public function testGuessTypeFromExtension($expected, $ext)
 {
     $this->assertEquals($expected, Mimes::guessTypeFromExtension($ext));
 }