Matches the current server URI to a route and runs the first matching
callback then outputs a JSON representation of the returned value.
public serve_request ( string $path = null ) : false | null | ||
$path | string | Optional. The request route. If not set, `$_SERVER['PATH_INFO']` will be used. Default null. |
리턴 | false | null | Null if not served and a HEAD request, false otherwise. |
public function serve_request($path = null) { ob_start(); $result = parent::serve_request($path); $this->sent_body = ob_get_clean(); return $result; }