public function app_format($action, $reply, $status = true) { if (is_array($reply) && !empty($reply)) { $this->app_events = []; } JSON::set(["ACTION" => $action, "REPLY" => $reply, "EVENTS" => $this->app_events, "STATUS" => $status, "MESSAGE" => MESSAGE::$ERROR]); }
public static function render() { if (REQUEST::$HTML) { HTML::render(); print self::$HTML; } elseif (REQUEST::$MOBILE) { HTML::render("MOBILE"); print self::$MOBILE; } elseif (REQUEST::$JSON) { JSON::render(); print self::$JSON; } exit; }