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
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]
$ci
protected
ContainerInterface
$ci
$servicesproviders
protected
string[]
$servicesproviders
= []
Tags
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
mixedgetSubscribedEvents()
Defines which events in the UF lifecycle our Sprinkle should hook into.
public
static getSubscribedEvents(
)
: array
Return values
arrayonSprinklesInitialized()
Set static references to DI container in necessary classes.
public
onSprinklesInitialized(
)
: mixed
Return values
mixedonSprinklesRegisterServices()
Register all sprinkles services providers.
public
onSprinklesRegisterServices(
)
: mixed
Return values
mixedsetupShutdownHandlerService()
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
onAppInitialize()
Register routes.
public
onAppInitialize(
$event :
Event
)
: mixed
Parameters
- $event : Event
Return values
mixedonAddGlobalMiddleware()
Add CSRF middleware.
public
onAddGlobalMiddleware(
$event :
Event
)
: mixed
Parameters
- $event : Event
Return values
mixedregisterStreams()
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
mixedgetSubscribedEvents()
By default assign all methods as listeners using the default priority.
public
static getSubscribedEvents(
)
: array
Return values
arrayregisterServices()
Register all services providers.
public
registerServices(
)
: void