Services
extends BaseService
in package
Services Configuration file.
Services are simply other classes/libraries that the system uses to do its job. This is used by CodeIgniter to allow the core of the framework to be swapped out easily without affecting the usage within the rest of your application.
This is used in place of a Dependency Injection container primarily due to its simplicity, which allows a better long-term maintenance of the applications built on top of CodeIgniter. A bonus side-effect is that IDEs are able to determine what class you are calling whereas with DI Containers there usually isn't a way for them to do this.
Tags
Table of Contents
Properties
- $discovered : bool
- Have we already discovered other Services?
- $factories : array<string, callable(mixed ...$params): object>
- Factory method list.
- $instances : array<string, object>
- Cache for instance of any services that have been requested as a "shared" instance.
- $mocks : array<string, object>
- Mock objects for testing which are returned if exist.
- $services : array<string|int, mixed>
- A cache of other service classes we've found.
- $serviceNames : array<int, string>
- A cache of the names of services classes found.
Methods
- __callStatic() : object|null
- Provides the ability to perform case-insensitive calling of service names.
- autoloader() : Autoloader
- The Autoloader class is the central class that handles our spl_autoload_register method, and helper methods.
- cache() : CacheInterface
- cache() : CacheInterface
- The cache class provides a simple way to store and retrieve complex data for later.
- clirequest() : CLIRequest
- codeigniter() : CodeIgniter
- codeigniter() : CodeIgniter
- CodeIgniter, the core of the framework.
- commands() : Commands
- commands() : Commands
- The commands utility for running and working with CLI commands.
- createRequest() : void
- csp() : ContentSecurityPolicy
- csp() : ContentSecurityPolicy
- Content Security Policy
- curlrequest() : CURLRequest
- curlrequest() : CURLRequest
- The CURL Request class acts as a simple HTTP client for interacting with other servers, typically through APIs.
- email() : Email
- email() : Email
- The Email class allows you to send email via mail, sendmail, SMTP.
- encrypter() : EncrypterInterface
- encrypter() : EncrypterInterface
- The Encryption class provides two-way encryption.
- exceptions() : Exceptions
- exceptions() : Exceptions
- The Exceptions class holds the methods that handle:
- filters() : Filters
- filters() : Filters
- Filters allow you to run tasks before and/or after a controller is executed. During before filters, the request can be modified, and actions taken based on the request, while after filters can act on or modify the response itself before it is sent to the client.
- format() : Format
- format() : Format
- The Format class is a convenient place to create Formatters.
- get() : object|null
- Simple method to get an entry fast.
- honeypot() : Honeypot
- honeypot() : Honeypot
- The Honeypot provides a secret input on forms that bots should NOT fill in, providing an additional safeguard when accepting user input.
- image() : BaseHandler
- image() : BaseHandler
- Acts as a factory for ImageHandler classes and returns an instance of the handler. Used like service('image')->withFile($path)->rotate(90)->save();
- incomingrequest() : IncomingRequest
- injectMock() : void
- Inject mock object for testing.
- iterator() : Iterator
- iterator() : Iterator
- The Iterator class provides a simple way of looping over a function and timing the results and memory usage. Used when debugging and optimizing applications.
- language() : Language
- language() : Language
- Responsible for loading the language string translations.
- locator() : FileLocatorInterface
- The file locator provides utility methods for looking for non-classes within namespaced folders, as well as convenience methods for loading 'helpers', and 'libraries'.
- logger() : Logger
- logger() : Logger
- The Logger class is a PSR-3 compatible Logging class that supports multiple handlers that process the actual logging.
- migrations() : MigrationRunner
- migrations() : MigrationRunner
- Return the appropriate Migration runner.
- negotiator() : Negotiate
- negotiator() : Negotiate
- The Negotiate class provides the content negotiation features for working the request to determine correct language, encoding, charset, and more.
- override() : void
- Overrides an existing entry.
- pager() : Pager
- pager() : Pager
- Return the appropriate pagination handler.
- parser() : Parser
- parser() : Parser
- The Parser is a simple template parser.
- redirectresponse() : RedirectResponse
- redirectresponse() : RedirectResponse
- The Redirect class provides nice way of working with redirects.
- renderer() : View
- renderer() : View
- The Renderer class is the class that actually displays a file to the user.
- request() : IncomingRequest|CLIRequest
- request() : CLIRequest|IncomingRequest
- Returns the current Request object.
- reset() : void
- Reset shared instances and mocks for testing.
- resetSingle() : void
- Resets any mock and shared instances for a single service.
- response() : ResponseInterface
- response() : ResponseInterface
- The Response class models an HTTP response.
- responsecache() : ResponseCache
- responsecache() : ResponseCache
- Return the ResponseCache.
- router() : Router
- router() : Router
- The Router class uses a RouteCollection's array of routes, and determines the correct Controller and Method to execute.
- routes() : RouteCollection
- routes() : RouteCollection
- The Routes service is a class that allows for easily building a collection of routes.
- security() : Security
- security() : Security
- The Security class provides a few handy tools for keeping the site secure, most notably the CSRF protection tools.
- serviceExists() : string|null
- Check if the requested service is defined and return the declaring class. Return null if not found.
- session() : Session
- session() : Session
- Return the session manager.
- set() : void
- Sets an entry.
- siteurifactory() : SiteURIFactory
- siteurifactory() : SiteURIFactory
- The Factory for SiteURI.
- superglobals() : Superglobals
- superglobals() : Superglobals
- Superglobals.
- throttler() : Throttler
- throttler() : Throttler
- The Throttler class provides a simple method for implementing rate limiting in your applications.
- timer() : Timer
- timer() : Timer
- The Timer class provides a simple way to Benchmark portions of your application.
- toolbar() : Toolbar
- toolbar() : Toolbar
- Return the debug toolbar.
- typography() : Typography
- typography() : Typography
- The Typography class provides a way to format text in semantically relevant ways.
- uri() : URI
- uri() : URI
- The URI class provides a way to model and manipulate URIs.
- validation() : ValidationInterface
- validation() : ValidationInterface
- The Validation class provides tools for validating input data.
- viewcell() : Cell
- viewcell() : Cell
- View cells are intended to let you insert HTML into view that has been generated by any callable in the system.
- buildServicesCache() : void
- getSharedInstance() : object
- Returns a shared instance of any of the class' services.
Properties
$discovered
Have we already discovered other Services?
protected
static bool
$discovered
= false
$factories
Factory method list.
protected
static array<string, callable(mixed ...$params): object>
$factories
= []
[key => callable]
$instances
Cache for instance of any services that have been requested as a "shared" instance.
protected
static array<string, object>
$instances
= []
Keys should be lowercase service names.
[key => instance]
$mocks
Mock objects for testing which are returned if exist.
protected
static array<string, object>
$mocks
= []
[key => instance]
$services
A cache of other service classes we've found.
No longer used.
protected
static array<string|int, mixed>
$services
= []
$serviceNames
A cache of the names of services classes found.
private
static array<int, string>
$serviceNames
= []
Methods
__callStatic()
Provides the ability to perform case-insensitive calling of service names.
public
static __callStatic(string $name, array<string|int, mixed> $arguments) : object|null
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
object|nullautoloader()
The Autoloader class is the central class that handles our spl_autoload_register method, and helper methods.
public
static autoloader([bool $getShared = true ]) : Autoloader
Parameters
- $getShared : bool = true
Return values
Autoloadercache()
public
static cache([Cache $config = null ][, mixed $getShared = true ]) : CacheInterface
Parameters
- $config : Cache = null
- $getShared : mixed = true
Return values
CacheInterfacecache()
The cache class provides a simple way to store and retrieve complex data for later.
public
static cache([Cache|null $config = null ][, bool $getShared = true ]) : CacheInterface
Parameters
- $config : Cache|null = null
- $getShared : bool = true
Return values
CacheInterfaceclirequest()
public
static clirequest([App $config = null ][, mixed $getShared = true ]) : CLIRequest
Parameters
- $config : App = null
- $getShared : mixed = true
Return values
CLIRequestcodeigniter()
public
static codeigniter([App $config = null ][, mixed $getShared = true ]) : CodeIgniter
Parameters
- $config : App = null
- $getShared : mixed = true
Return values
CodeIgnitercodeigniter()
CodeIgniter, the core of the framework.
public
static codeigniter([App|null $config = null ][, bool $getShared = true ]) : CodeIgniter
Parameters
- $config : App|null = null
- $getShared : bool = true
Return values
CodeIgnitercommands()
public
static commands([mixed $getShared = true ]) : Commands
Parameters
- $getShared : mixed = true
Return values
Commandscommands()
The commands utility for running and working with CLI commands.
public
static commands([bool $getShared = true ]) : Commands
Parameters
- $getShared : bool = true
Return values
CommandscreateRequest()
public
static createRequest([App $config = ][, bool $isCli = false ]) : void
Parameters
- $config : App =
- $isCli : bool = false
csp()
public
static csp([ContentSecurityPolicy $config = null ][, mixed $getShared = true ]) : ContentSecurityPolicy
Parameters
- $config : ContentSecurityPolicy = null
- $getShared : mixed = true
Return values
ContentSecurityPolicycsp()
Content Security Policy
public
static csp([ContentSecurityPolicy|null $config = null ][, bool $getShared = true ]) : ContentSecurityPolicy
Parameters
- $config : ContentSecurityPolicy|null = null
- $getShared : bool = true
Return values
ContentSecurityPolicycurlrequest()
public
static curlrequest([mixed $options = [] ][, ResponseInterface $response = null ][, App $config = null ][, mixed $getShared = true ]) : CURLRequest
Parameters
- $options : mixed = []
- $response : ResponseInterface = null
- $config : App = null
- $getShared : mixed = true
Return values
CURLRequestcurlrequest()
The CURL Request class acts as a simple HTTP client for interacting with other servers, typically through APIs.
public
static curlrequest([array<string|int, mixed> $options = [] ][, ResponseInterface|null $response = null ][, App|null $config = null ][, bool $getShared = true ]) : CURLRequest
Parameters
- $options : array<string|int, mixed> = []
- $response : ResponseInterface|null = null
- $config : App|null = null
- $getShared : bool = true
Return values
CURLRequestemail()
public
static email([mixed $config = null ][, mixed $getShared = true ]) : Email
Parameters
- $config : mixed = null
- $getShared : mixed = true
Return values
Emailemail()
The Email class allows you to send email via mail, sendmail, SMTP.
public
static email([array<string|int, mixed>|Email|null $config = null ][, bool $getShared = true ]) : Email
Parameters
- $config : array<string|int, mixed>|Email|null = null
- $getShared : bool = true
Return values
Emailencrypter()
public
static encrypter([Encryption $config = null ][, mixed $getShared = false ]) : EncrypterInterface
Parameters
- $config : Encryption = null
- $getShared : mixed = false
Return values
EncrypterInterfaceencrypter()
The Encryption class provides two-way encryption.
public
static encrypter([Encryption|null $config = null ][, bool $getShared = false ]) : EncrypterInterface
Parameters
- $config : Encryption|null = null
- $getShared : bool = false
Return values
EncrypterInterface —Encryption handler
exceptions()
public
static exceptions([Exceptions $config = null ][, mixed $getShared = true ]) : Exceptions
Parameters
- $config : Exceptions = null
- $getShared : mixed = true
Return values
Exceptionsexceptions()
The Exceptions class holds the methods that handle:
public
static exceptions([Exceptions|null $config = null ][, bool $getShared = true ]) : Exceptions
- set_exception_handler
- set_error_handler
- register_shutdown_function
Parameters
- $config : Exceptions|null = null
- $getShared : bool = true
Return values
Exceptionsfilters()
public
static filters([Filters $config = null ][, mixed $getShared = true ]) : Filters
Parameters
- $config : Filters = null
- $getShared : mixed = true
Return values
Filtersfilters()
Filters allow you to run tasks before and/or after a controller is executed. During before filters, the request can be modified, and actions taken based on the request, while after filters can act on or modify the response itself before it is sent to the client.
public
static filters([Filters|null $config = null ][, bool $getShared = true ]) : Filters
Parameters
- $config : Filters|null = null
- $getShared : bool = true
Return values
Filtersformat()
public
static format([Format $config = null ][, mixed $getShared = true ]) : Format
Parameters
- $config : Format = null
- $getShared : mixed = true
Return values
Formatformat()
The Format class is a convenient place to create Formatters.
public
static format([Format|null $config = null ][, bool $getShared = true ]) : Format
Parameters
- $config : Format|null = null
- $getShared : bool = true
Return values
Formatget()
Simple method to get an entry fast.
public
static get(string $key) : object|null
Parameters
- $key : string
-
Identifier of the entry to look for.
Return values
object|null —Entry.
honeypot()
public
static honeypot([Honeypot $config = null ][, mixed $getShared = true ]) : Honeypot
Parameters
- $config : Honeypot = null
- $getShared : mixed = true
Return values
Honeypothoneypot()
The Honeypot provides a secret input on forms that bots should NOT fill in, providing an additional safeguard when accepting user input.
public
static honeypot([Honeypot|null $config = null ][, bool $getShared = true ]) : Honeypot
Parameters
- $config : Honeypot|null = null
- $getShared : bool = true
Return values
Honeypotimage()
public
static image([mixed $handler = null ][, Images $config = null ][, mixed $getShared = true ]) : BaseHandler
Parameters
- $handler : mixed = null
- $config : Images = null
- $getShared : mixed = true
Return values
BaseHandlerimage()
Acts as a factory for ImageHandler classes and returns an instance of the handler. Used like service('image')->withFile($path)->rotate(90)->save();
public
static image([string|null $handler = null ][, Images|null $config = null ][, bool $getShared = true ]) : BaseHandler
Parameters
- $handler : string|null = null
- $config : Images|null = null
- $getShared : bool = true
Return values
BaseHandlerincomingrequest()
public
static incomingrequest([App|null $config = null ][, bool $getShared = true ]) : IncomingRequest
Parameters
- $config : App|null = null
- $getShared : bool = true
Return values
IncomingRequestinjectMock()
Inject mock object for testing.
public
static injectMock(string $name, object $mock) : void
Parameters
- $name : string
- $mock : object
Tags
iterator()
public
static iterator([mixed $getShared = true ]) : Iterator
Parameters
- $getShared : mixed = true
Return values
Iteratoriterator()
The Iterator class provides a simple way of looping over a function and timing the results and memory usage. Used when debugging and optimizing applications.
public
static iterator([bool $getShared = true ]) : Iterator
Parameters
- $getShared : bool = true
Return values
Iteratorlanguage()
public
static language([mixed $locale = null ][, mixed $getShared = true ]) : Language
Parameters
- $locale : mixed = null
- $getShared : mixed = true
Return values
Languagelanguage()
Responsible for loading the language string translations.
public
static language([string|null $locale = null ][, bool $getShared = true ]) : Language
Parameters
- $locale : string|null = null
- $getShared : bool = true
Return values
Languagelocator()
The file locator provides utility methods for looking for non-classes within namespaced folders, as well as convenience methods for loading 'helpers', and 'libraries'.
public
static locator([bool $getShared = true ]) : FileLocatorInterface
Parameters
- $getShared : bool = true
Return values
FileLocatorInterfacelogger()
public
static logger([mixed $getShared = true ]) : Logger
Parameters
- $getShared : mixed = true
Return values
Loggerlogger()
The Logger class is a PSR-3 compatible Logging class that supports multiple handlers that process the actual logging.
public
static logger([bool $getShared = true ]) : Logger
Parameters
- $getShared : bool = true
Return values
Loggermigrations()
public
static migrations([Migrations $config = null ][, ConnectionInterface $db = null ][, mixed $getShared = true ]) : MigrationRunner
Parameters
- $config : Migrations = null
- $db : ConnectionInterface = null
- $getShared : mixed = true
Return values
MigrationRunnermigrations()
Return the appropriate Migration runner.
public
static migrations([Migrations|null $config = null ][, ConnectionInterface|null $db = null ][, bool $getShared = true ]) : MigrationRunner
Parameters
- $config : Migrations|null = null
- $db : ConnectionInterface|null = null
- $getShared : bool = true
Return values
MigrationRunnernegotiator()
public
static negotiator([RequestInterface $request = null ][, mixed $getShared = true ]) : Negotiate
Parameters
- $request : RequestInterface = null
- $getShared : mixed = true
Return values
Negotiatenegotiator()
The Negotiate class provides the content negotiation features for working the request to determine correct language, encoding, charset, and more.
public
static negotiator([RequestInterface|null $request = null ][, bool $getShared = true ]) : Negotiate
Parameters
- $request : RequestInterface|null = null
- $getShared : bool = true
Return values
Negotiateoverride()
Overrides an existing entry.
public
static override(string $key, object $value) : void
Parameters
- $key : string
-
Identifier of the entry.
- $value : object
pager()
public
static pager([Pager $config = null ][, RendererInterface $view = null ][, mixed $getShared = true ]) : Pager
Parameters
- $config : Pager = null
- $view : RendererInterface = null
- $getShared : mixed = true
Return values
Pagerpager()
Return the appropriate pagination handler.
public
static pager([Pager|null $config = null ][, RendererInterface|null $view = null ][, bool $getShared = true ]) : Pager
Parameters
- $config : Pager|null = null
- $view : RendererInterface|null = null
- $getShared : bool = true
Return values
Pagerparser()
public
static parser([mixed $viewPath = null ][, View $config = null ][, mixed $getShared = true ]) : Parser
Parameters
- $viewPath : mixed = null
- $config : View = null
- $getShared : mixed = true
Return values
Parserparser()
The Parser is a simple template parser.
public
static parser([string|null $viewPath = null ][, View|null $config = null ][, bool $getShared = true ]) : Parser
Parameters
- $viewPath : string|null = null
- $config : View|null = null
- $getShared : bool = true
Return values
Parserredirectresponse()
public
static redirectresponse([App $config = null ][, mixed $getShared = true ]) : RedirectResponse
Parameters
- $config : App = null
- $getShared : mixed = true
Return values
RedirectResponseredirectresponse()
The Redirect class provides nice way of working with redirects.
public
static redirectresponse([App|null $config = null ][, bool $getShared = true ]) : RedirectResponse
Parameters
- $config : App|null = null
- $getShared : bool = true
Return values
RedirectResponserenderer()
public
static renderer([mixed $viewPath = null ][, View $config = null ][, mixed $getShared = true ]) : View
Parameters
- $viewPath : mixed = null
- $config : View = null
- $getShared : mixed = true
Return values
Viewrenderer()
The Renderer class is the class that actually displays a file to the user.
public
static renderer([string|null $viewPath = null ][, View|null $config = null ][, bool $getShared = true ]) : View
The default View class within CodeIgniter is intentionally simple, but this service could easily be replaced by a template engine if the user needed to.
Parameters
- $viewPath : string|null = null
- $config : View|null = null
- $getShared : bool = true
Return values
Viewrequest()
public
static request([App $config = null ][, mixed $getShared = true ]) : IncomingRequest|CLIRequest
Parameters
- $config : App = null
- $getShared : mixed = true
Return values
IncomingRequest|CLIRequestrequest()
Returns the current Request object.
public
static request([App|null $config = null ][, bool $getShared = true ]) : CLIRequest|IncomingRequest
The parameter $config and $getShared are deprecated.
createRequest() injects IncomingRequest or CLIRequest.
Parameters
- $config : App|null = null
- $getShared : bool = true
Return values
CLIRequest|IncomingRequestreset()
Reset shared instances and mocks for testing.
public
static reset([bool $initAutoloader = true ]) : void
Parameters
- $initAutoloader : bool = true
Tags
resetSingle()
Resets any mock and shared instances for a single service.
public
static resetSingle(string $name) : void
Parameters
- $name : string
Tags
response()
public
static response([App $config = null ][, mixed $getShared = true ]) : ResponseInterface
Parameters
- $config : App = null
- $getShared : mixed = true
Return values
ResponseInterfaceresponse()
The Response class models an HTTP response.
public
static response([App|null $config = null ][, bool $getShared = true ]) : ResponseInterface
Parameters
- $config : App|null = null
- $getShared : bool = true
Return values
ResponseInterfaceresponsecache()
public
static responsecache([Cache|null $config = null ][, CacheInterface|null $cache = null ][, bool $getShared = true ]) : ResponseCache
Parameters
- $config : Cache|null = null
- $cache : CacheInterface|null = null
- $getShared : bool = true
Return values
ResponseCacheresponsecache()
Return the ResponseCache.
public
static responsecache([Cache|null $config = null ][, CacheInterface|null $cache = null ][, bool $getShared = true ]) : ResponseCache
Parameters
- $config : Cache|null = null
- $cache : CacheInterface|null = null
- $getShared : bool = true
Return values
ResponseCacherouter()
public
static router([RouteCollectionInterface $routes = null ][, Request $request = null ][, mixed $getShared = true ]) : Router
Parameters
- $routes : RouteCollectionInterface = null
- $request : Request = null
- $getShared : mixed = true
Return values
Routerrouter()
The Router class uses a RouteCollection's array of routes, and determines the correct Controller and Method to execute.
public
static router([RouteCollectionInterface|null $routes = null ][, Request|null $request = null ][, bool $getShared = true ]) : Router
Parameters
- $routes : RouteCollectionInterface|null = null
- $request : Request|null = null
- $getShared : bool = true
Return values
Routerroutes()
public
static routes([mixed $getShared = true ]) : RouteCollection
Parameters
- $getShared : mixed = true
Return values
RouteCollectionroutes()
The Routes service is a class that allows for easily building a collection of routes.
public
static routes([bool $getShared = true ]) : RouteCollection
Parameters
- $getShared : bool = true
Return values
RouteCollectionsecurity()
public
static security([App $config = null ][, mixed $getShared = true ]) : Security
Parameters
- $config : App = null
- $getShared : mixed = true
Return values
Securitysecurity()
The Security class provides a few handy tools for keeping the site secure, most notably the CSRF protection tools.
public
static security([Security|null $config = null ][, bool $getShared = true ]) : Security
Parameters
- $config : Security|null = null
- $getShared : bool = true
Return values
SecurityserviceExists()
Check if the requested service is defined and return the declaring class. Return null if not found.
public
static serviceExists(string $name) : string|null
Parameters
- $name : string
Return values
string|nullsession()
public
static session([Session $config = null ][, mixed $getShared = true ]) : Session
Parameters
- $config : Session = null
- $getShared : mixed = true
Return values
Sessionsession()
Return the session manager.
public
static session([Session|null $config = null ][, bool $getShared = true ]) : Session
Parameters
- $config : Session|null = null
- $getShared : bool = true
Return values
Sessionset()
Sets an entry.
public
static set(string $key, object $value) : void
Parameters
- $key : string
-
Identifier of the entry.
- $value : object
siteurifactory()
public
static siteurifactory([App $config = null ][, Superglobals $superglobals = null ][, mixed $getShared = true ]) : SiteURIFactory
Parameters
- $config : App = null
- $superglobals : Superglobals = null
- $getShared : mixed = true
Return values
SiteURIFactorysiteurifactory()
The Factory for SiteURI.
public
static siteurifactory([App|null $config = null ][, Superglobals|null $superglobals = null ][, bool $getShared = true ]) : SiteURIFactory
Parameters
- $config : App|null = null
- $superglobals : Superglobals|null = null
- $getShared : bool = true
Return values
SiteURIFactorysuperglobals()
public
static superglobals([array<string|int, mixed> $server = null ][, array<string|int, mixed> $get = null ][, bool $getShared = true ]) : Superglobals
Parameters
- $server : array<string|int, mixed> = null
- $get : array<string|int, mixed> = null
- $getShared : bool = true
Return values
Superglobalssuperglobals()
Superglobals.
public
static superglobals([array<string|int, mixed>|null $server = null ][, array<string|int, mixed>|null $get = null ][, bool $getShared = true ]) : Superglobals
Parameters
- $server : array<string|int, mixed>|null = null
- $get : array<string|int, mixed>|null = null
- $getShared : bool = true
Return values
Superglobalsthrottler()
public
static throttler([mixed $getShared = true ]) : Throttler
Parameters
- $getShared : mixed = true
Return values
Throttlerthrottler()
The Throttler class provides a simple method for implementing rate limiting in your applications.
public
static throttler([bool $getShared = true ]) : Throttler
Parameters
- $getShared : bool = true
Return values
Throttlertimer()
public
static timer([mixed $getShared = true ]) : Timer
Parameters
- $getShared : mixed = true
Return values
Timertimer()
The Timer class provides a simple way to Benchmark portions of your application.
public
static timer([bool $getShared = true ]) : Timer
Parameters
- $getShared : bool = true
Return values
Timertoolbar()
public
static toolbar([Toolbar $config = null ][, mixed $getShared = true ]) : Toolbar
Parameters
- $config : Toolbar = null
- $getShared : mixed = true
Return values
Toolbartoolbar()
Return the debug toolbar.
public
static toolbar([Toolbar|null $config = null ][, bool $getShared = true ]) : Toolbar
Parameters
- $config : Toolbar|null = null
- $getShared : bool = true
Return values
Toolbartypography()
public
static typography([mixed $getShared = true ]) : Typography
Parameters
- $getShared : mixed = true
Return values
Typographytypography()
The Typography class provides a way to format text in semantically relevant ways.
public
static typography([bool $getShared = true ]) : Typography
Parameters
- $getShared : bool = true
Return values
Typographyuri()
public
static uri([mixed $uri = null ][, mixed $getShared = true ]) : URI
Parameters
- $uri : mixed = null
- $getShared : mixed = true
Return values
URIuri()
The URI class provides a way to model and manipulate URIs.
public
static uri([string|null $uri = null ][, bool $getShared = true ]) : URI
Parameters
- $uri : string|null = null
-
The URI string
- $getShared : bool = true
Return values
URI —The current URI if $uri is null.
validation()
public
static validation([Validation $config = null ][, mixed $getShared = true ]) : ValidationInterface
Parameters
- $config : Validation = null
- $getShared : mixed = true
Return values
ValidationInterfacevalidation()
The Validation class provides tools for validating input data.
public
static validation([Validation|null $config = null ][, bool $getShared = true ]) : ValidationInterface
Parameters
- $config : Validation|null = null
- $getShared : bool = true
Return values
ValidationInterfaceviewcell()
public
static viewcell([mixed $getShared = true ]) : Cell
Parameters
- $getShared : mixed = true
Return values
Cellviewcell()
View cells are intended to let you insert HTML into view that has been generated by any callable in the system.
public
static viewcell([bool $getShared = true ]) : Cell
Parameters
- $getShared : bool = true
Return values
CellbuildServicesCache()
protected
static buildServicesCache() : void
getSharedInstance()
Returns a shared instance of any of the class' services.
protected
static getSharedInstance(string $key, array<string|int, mixed>|bool|float|int|object|string|null ...$params) : object
$key must be a name matching a service.
Parameters
- $key : string
- $params : array<string|int, mixed>|bool|float|int|object|string|null