UserFrosting API

UserFrosting

UserFrosting Main Class.

Table of Contents

$ci Container
$app App
__construct() Create the UserFrosting application instance. mixed
fireEvent() Fires an event with optional parameters. Event
getApp() Return the underlying Slim App instance, if available. App
getContainer() Return the DI container. Container
run() Initialize the application. Set up Sprinkles and the Slim app, define routes, register global middleware, and run Slim. mixed
setupSprinkles() Register system services, load all sprinkles, and add their resources and services. mixed
setupApp() Setup UserFrosting App, load sprinkles, load routes, etc. mixed
renderSprinkleErrorPage() Render a basic error page for problems with loading Sprinkles. mixed
renderSprinkleErrorCli() Render a CLI error message for problems with loading Sprinkles. mixed

Properties

Methods

__construct()

Create the UserFrosting application instance.

public __construct( [ $cli : bool = false ] ) : mixed
Parameters
$cli : bool = false

Is the app in CLI mode. Set to false if setting up in an HTTP/web environment, true if setting up for CLI scripts.

Return values
mixed

fireEvent()

Fires an event with optional parameters.

public fireEvent( $eventName : string [, $event : Event|null = null ] ) : Event
Parameters
$eventName : string
$event : Event|null = null
Return values
Event

getApp()

Return the underlying Slim App instance, if available.

public getApp( ) : App
Return values
App

getContainer()

Return the DI container.

public getContainer( ) : Container
Return values
Container

run()

Initialize the application. Set up Sprinkles and the Slim app, define routes, register global middleware, and run Slim.

public run( ) : mixed
Return values
mixed

setupSprinkles()

Register system services, load all sprinkles, and add their resources and services.

protected setupSprinkles( ) : mixed
Return values
mixed

setupApp()

Setup UserFrosting App, load sprinkles, load routes, etc.

protected setupApp( ) : mixed
Return values
mixed

renderSprinkleErrorPage()

Render a basic error page for problems with loading Sprinkles.

protected renderSprinkleErrorPage( [ $errorMessage : string = '' ] ) : mixed
Parameters
$errorMessage : string = ''

Message to display [Default ""]

Return values
mixed

renderSprinkleErrorCli()

Render a CLI error message for problems with loading Sprinkles.

protected renderSprinkleErrorCli( [ $errorMessage : string = '' ] ) : mixed
Parameters
$errorMessage : string = ''

Message to display [Default ""]

Return values
mixed

Search results