Zum Hauptinhalt springen

Zymba Documentation

REST.Server​

Text
object @REST.Server(@Base) {
construct() {}
bind(function $callback, string $route, string $method): $this {}
bindMethods(...$routes): $this {}
handle(): mixed {}
}

RESTful server prototype.

Prototype​

Base

Methods​

CODE
$this.construct(): void
CODE
$this.bind(function $callback, string $route, string $method): this
Parameters​
NameTypeValueDefault
callbackfunctionnull
routestring""
methodstring"GET"
Returns​
TypeValue
$this
CODE
$this.bindMethods(variadic $routes): this
Parameters​
NameTypeValueDefault
routesvariadic...
Returns​
TypeValue
$this
CODE
$this.handle(): mixed
Returns​
TypeValue
mixed