コード例 #1
0
ファイル: helper.php プロジェクト: educakanchay/educa
 /**
  * 
  * @staticvar int $cnt
  * @staticvar int $no
  * @param type $arr
  * @param type $count
  * @param type $optimized
  */
 public static function postStatus($arr, $count = FALSE, $optimized = FALSE)
 {
     if ($arr['total'] == 0) {
         return;
     }
     static $cnt = 0;
     static $no = 0;
     if ($count) {
         $arr['current'] = ++$cnt;
     }
     $arr['optimize'] = $optimized ? ++$no : $no;
     $json = json_encode($arr);
     JchPlatformUtility::write(JCH_PLUGIN_DIR . 'status.json', $json);
 }