示例#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;
 }