Skip to content

Kirby 3.8.4

new Api()

Creates a new API instance

new Api(array $props)

Parameters

Name Type Default
$props * array

For the $props parameter, you pass an array with the following data, which will be used to set up the Kirby\Cms\Api object:

Name Type Description
authentication Closure Setter for the authentication callback
collections array Setter for the collections definition
data array Setter for the injected data
debug bool Setter for the debug flag
kirby * Kirby\Cms\App Setter for the parent Kirby instance
models array Setter for the model definitions
requestData array Setter for the request data
requestMethod string Setter for the request method
routes array Setter for the route definitions

Parent class

Kirby\Cms\Api inherited from Kirby\Api\Api