UserFrosting API

Core extends Sprinkle

Bootstrapper class for the core sprinkle.

Represents a sprinkle (plugin, theme, site, etc), and the code required to boot up that sprinkle.

Tags
author

Alex Weissman (https://alexanderweissman.com)

Table of Contents

$servicesproviders string[]
$ci ContainerInterface
$servicesproviders string[]
__construct() Create a new Sprinkle object. mixed
getSubscribedEvents() Defines which events in the UF lifecycle our Sprinkle should hook into. array
onSprinklesInitialized() Set static references to DI container in necessary classes. mixed
onSprinklesRegisterServices() Register all sprinkles services providers. mixed
setupShutdownHandlerService() Steps required to register the ShutdownHandler Service. void
onAppInitialize() Register routes. mixed
onAddGlobalMiddleware() Add CSRF middleware. mixed
registerStreams() Register Core sprinkle locator streams. mixed
__construct() Create a new Sprinkle object. mixed
getSubscribedEvents() By default assign all methods as listeners using the default priority. array
registerServices() Register all services providers. void

Properties

$servicesproviders

protected string[] $servicesproviders = [\UserFrosting\Sprinkle\Core\I18n\LocaleServicesProvider::class, \UserFrosting\Sprinkle\Core\I18n\TranslatorServicesProvider::class]

$servicesproviders

protected string[] $servicesproviders = []
Tags
TODO

: Move all theses to their own class (Target UF 5.0) and list the one need registering in config

Methods

__construct()

Create a new Sprinkle object.

public __construct( $ci : ContainerInterface ) : mixed
Parameters
$ci : ContainerInterface

The global container object, which holds all your services.

Return values
mixed

getSubscribedEvents()

Defines which events in the UF lifecycle our Sprinkle should hook into.

public static getSubscribedEvents( ) : array
Return values
array

onSprinklesInitialized()

Set static references to DI container in necessary classes.

public onSprinklesInitialized( ) : mixed
Return values
mixed

onSprinklesRegisterServices()

Register all sprinkles services providers.

public onSprinklesRegisterServices( ) : mixed
Return values
mixed

setupShutdownHandlerService()

Steps required to register the ShutdownHandler Service.

public setupShutdownHandlerService( ) : void

Get shutdownHandler set up. This needs to be constructed explicitly because it's invoked natively by PHP.

Tags
TODO:

Move to it's own serviceProvider class (Target UF 5.0)

onAppInitialize()

Register routes.

public onAppInitialize( $event : Event ) : mixed
Parameters
$event : Event
Return values
mixed

onAddGlobalMiddleware()

Add CSRF middleware.

public onAddGlobalMiddleware( $event : Event ) : mixed
Parameters
$event : Event
Return values
mixed

registerStreams()

Register Core sprinkle locator streams.

protected registerStreams( ) : mixed
Return values
mixed

__construct()

Create a new Sprinkle object.

public __construct( $ci : ContainerInterface ) : mixed
Parameters
$ci : ContainerInterface

The global container object, which holds all your services.

Return values
mixed

getSubscribedEvents()

By default assign all methods as listeners using the default priority.

public static getSubscribedEvents( ) : array
Return values
array

registerServices()

Register all services providers.

public registerServices( ) : void

Search results