TractorCow\Fluent\State\FluentState
Stores the current fluent state
Synopsis
class FluentState
{
- // members
- protected $locale;
- protected string|null $domain;
- protected bool $isDomainMode;
- protected bool $isFrontend;
- // methods
- public string getLocale()
- public $this setLocale()
- public string|null getDomain()
- public $this setDomain()
- public bool getIsDomainMode()
- public $this setIsDomainMode()
- public bool getIsFrontend()
- public $this setIsFrontend()
- public mixed withState()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Members
protected
- $domain
—
TractorCow\Fluent\State\string|null
Current domain, if set - $isDomainMode
—
TractorCow\Fluent\State\bool
Whether the website is running in domain segmentation mode - $isFrontend
—
TractorCow\Fluent\State\bool
Whether the request is for the frontend website - $locale
—
string
Current locale
Methods
public
- getDomain() — Get the current domain code
- getIsDomainMode() — Get whether the website is in domain segmentation mode
- getIsFrontend() — Get whether a request is for the frontend website or not
- getLocale() — Get the currently active locale code
- setDomain() — Set the current domain code
- setIsDomainMode() — Set whether the website is in domain segmentation mode
- setIsFrontend() — Set whether a request is for the frontend website or not
- setLocale() — Set the currently active locale code
- withState() — Perform the given operation in an isolated state.