많은 유틸리티 함수를 Util, FileUtil, WebUtil로 이동

This commit is contained in:
2018-03-24 22:03:54 +09:00
parent b5cba27df9
commit 157ecdbf2a
36 changed files with 364 additions and 517 deletions
+1 -10
View File
@@ -2,15 +2,6 @@
namespace sammo;
class Json{
private static function setHeaderNoCache(){
if(!headers_sent()) {
header('Expires: Wed, 01 Jan 2014 00:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
}
}
public static function encode($value, $pretty = false){
if($pretty){
$flag = JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT;
@@ -27,7 +18,7 @@ class Json{
public static function die($value, $noCache = true, $pretty = false, $die = true){
if($noCache){
self::setHeaderNoCache();
WebUtil::setHeaderNoCache();
}
header('Content-Type: application/json');