Skip to content

Kirby::instance()

Returns the current App instance

Kirby::instance(self $instance = null, bool $lazy = false): Kirby\Cms\App|null

Parameters

Name Type Default Description
$instance Kirby\Cms\App null
$lazy bool false If true, the instance is only returned if already existing

Return type

Kirby\Cms\App|null

This method does not modify the existing $kirby object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Cms\App