Head
class Head extends Facade mixin HeadManager
Constants
| protected STATE_CONTEXT_KEY |
The context key for the coroutine-local facade roots. |
Properties
| static protected Container|null | $app | The application instance being facaded. |
from Facade |
| static protected array | $resolvedInstance | The resolved object instances. |
from Facade |
| static protected array<string, true> | $scopedAccessors | Accessors whose resolved objects belong to a coroutine scope. |
from Facade |
| static protected array<string, int> | $coroutineAccessors | Accessors with coroutine-local roots, and their current generation. |
from Facade |
| static protected bool | $cached | Indicates if the resolved instance should be cached. |
from Facade |
Methods
Initiate a mock expectation on the facade.
Initiate a mock expectation on the facade.
Create a fresh mock instance for the given class.
Get the registered name of the component.
Resolve the facade root instance from the container.
Clear a resolved facade instance.
Get the application instance behind the facade.
Handle dynamic, static calls to the object.
Get methods that should be excluded from the generated facade docblock.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
<int, string> toInertiaElements(int|null $status = 'null')
No description
No description
No description
No description
No description
Details
in
Facade at line 85
static void
resolved(Closure $callback)
Run a Closure when the facade has been resolved.
The callback is registered on the worker-global container and runs for every subsequent resolution of the facade accessor.
in
Facade at line 106
static MockInterface|null
spy()
Convert the facade into a Mockery spy.
Swaps the resolved facade instance for the worker lifetime.
in
Facade at line 125
static MockInterface
partialMock()
Initiate a partial mock on the facade.
Swaps the resolved facade instance for the worker lifetime.
in
Facade at line 142
static CompositeExpectation|Expectation|HigherOrderMessage
shouldReceive()
Initiate a mock expectation on the facade.
Swaps the resolved facade instance for the worker lifetime.
in
Facade at line 159
static CompositeExpectation|Expectation|ExpectsHigherOrderMessage
expects()
Initiate a mock expectation on the facade.
Swaps the resolved facade instance for the worker lifetime.
in
Facade at line 176
static protected MockInterface
createFreshMockInstance()
Create a fresh mock instance for the given class.
Swaps the resolved facade instance for the worker lifetime.
in
Facade at line 189
static protected MockInterface
createMock()
Create a fresh mock instance for the given class.
in
Facade at line 199
static protected bool
isMock()
Determines whether a mock is set as the instance of the facade.
in
Facade at line 210
static protected string|null
getMockableClass()
Get the mockable class for the bound instance.
in
Facade at line 226
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
Replaces the worker-wide resolved facade instance and container binding; runtime use races across coroutines and changes every subsequent facade call.
in
Facade at line 239
static bool
isFake()
Determines whether a "fake" has been set as the facade instance.
in
Facade at line 250
static mixed
getFacadeRoot()
Get the root object behind the facade.
at line 98
static protected string
getFacadeAccessor()
Get the registered name of the component.
in
Facade at line 266
static protected mixed
resolveFacadeInstance(string $name)
Resolve the facade root instance from the container.
in
Facade at line 312
static void
clearResolvedInstance(string|null $name = null)
Clear a resolved facade instance.
Later facade calls everywhere resolve again; only references already held keep the previous instance.
in
Facade at line 330
static void
clearResolvedInstances()
Clear all of the resolved instances.
Later facade calls everywhere resolve again; only references already held keep the previous instances.
in
Facade at line 344
static Collection
defaultAliases()
Get the application default aliases.
in
Facade at line 404
static Container|null
getFacadeApplication()
Get the application instance behind the facade.
in
Facade at line 415
static void
setFacadeApplication(Container|null $app)
Set the application instance.
Replaces the worker-wide facade application reference; runtime use races across coroutines and breaks every facade lookup.
in
Facade at line 427
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
at line 79
static protected array
ignoredFacadeDocumenterMethods()
Get methods that should be excluded from the generated facade docblock.
The HeadManager mixin preserves callback, class-string and generic types that generated method tags flatten.
at line 69
static HeadManager
alternates(array<string $, string> $alternates)
No description
at line 69
static HeadManager
appleTouchIcon(string $href, string|null $sizes = 'null')
No description
at line 69
static HeadManager
appleTouchStartupImage(string $href, Media|string|null $media = 'null')
No description
at line 69
static HeadManager
appleWebAppStatusBarStyle(string $style)
No description
at line 69
static HeadManager
appleWebAppTitle(string $title)
No description
at line 69
static HeadManager
applicationName(string $name)
No description
at line 69
static HeadManager
canonical(string|null $url = 'null', bool|null $forceHttps = 'null', bool|null $trailingSlash = 'null')
No description
at line 69
static HeadManager
colorScheme(string $scheme)
No description
at line 69
static HeadManager
description(string $description)
No description
at line 69
static HeadManager
dnsPrefetch(string $href)
No description
at line 69
static HeadManager
favicon(string $href, ImageType|string|null $type = 'null', string|null $sizes = 'null', Media|string|null $media = 'null')
No description
at line 69
static HeadManager
feed(string $href, string $title, string $type = '\'rss\'')
No description
at line 69
static HeadManager
flush()
No description
at line 69
static void
flushMacros()
No description
at line 69
static bool
hasMacro(string $name)
No description
at line 69
static HeadManager
hiddenFromRobots()
No description
at line 69
static HeadManager
icon(string $href, ImageType|string|null $type = 'null', string|null $sizes = 'null', Media|string|null $media = 'null')
No description
at line 69
static HeadManager
inertia(string $prop = '\'head\'')
No description
at line 69
static string
inertiaProp()
No description
at line 69
static HeadManager
link(string $rel, string $href, array<string $, BackedEnum|bool|float|int|string> $attributes = '[]')
No description
at line 69
static void
macro(string $name, callable|object $macro)
No description
at line 69
static HeadManager
manifest(string $href = '\'/site.webmanifest\'', string|bool|null $crossorigin = 'null')
No description
at line 69
static HeadManager
maskIcon(string $href, string|null $color = 'null')
No description
at line 69
static HeadManager
meta(string $key, string $content, bool|null $property = 'null', Media|string|null $media = 'null')
No description
at line 69
static void
mixin(object $mixin, bool $replace = 'true')
No description
at line 69
static HeadManager
og(OgType|string|null $type = 'null', string|null $title = 'null', string|null $description = 'null', string|null $url = 'null', string|null $image = 'null', string|null $video = 'null', string|null $audio = 'null', string|null $siteName = 'null', string|null $locale = 'null', string|null $determiner = 'null')
No description
at line 69
static HeadManager
ogAudio(string $url, string|null $type = 'null', string|null $secureUrl = 'null')
No description
at line 69
static HeadManager
ogImage(string $url, string|null $alt = 'null', int|null $width = 'null', int|null $height = 'null', ImageType|string|null $type = 'null', string|null $secureUrl = 'null')
No description
at line 69
static HeadManager
ogVideo(string $url, string|null $alt = 'null', int|null $width = 'null', int|null $height = 'null', string|null $type = 'null', string|null $secureUrl = 'null')
No description
at line 69
static HeadManager
paginate(Paginator<int $, mixed> $paginator)
No description
at line 69
static HeadManager
preconnect(string $href, string|bool|null $crossorigin = 'null')
No description
at line 69
static HeadManager
prefetch(string $href, string|null $as = 'null')
No description
at line 69
static HeadManager
prefetchAsset(string $path, string|null $as = 'null')
No description
at line 69
static HeadManager
preload(string $href, string|null $as = 'null', string|bool|null $crossorigin = 'null', ImageType|string|null $type = 'null', Media|string|null $media = 'null')
No description
at line 69
static HeadManager
preloadAsset(string $path, string|null $as = 'null', string|bool|null $crossorigin = 'null', ImageType|string|null $type = 'null', Media|string|null $media = 'null')
No description
at line 69
static HeadManager
pwa(string $name, string $manifest = '\'/site.webmanifest\'', string|null $themeColor = 'null', string|null $appleTouchIcon = 'null', string|null $appleTouchIconSizes = '\'180x180\'', string|null $appleWebAppStatusBarStyle = 'null')
No description
at line 69
static HeadManager
referrer(string $policy)
No description
at line 69
static HtmlString
render(int|null $status = 'null')
No description
at line 69
static HtmlString
renderForView(int|null $status = 'null')
No description
at line 69
static HeadManager
robots(array<int $, RobotsRule|string $directives)
No description
at line 69
static HeadManager
searchableByRobots()
No description
at line 69
static HeadManager
status(int $status)
No description
at line 69
static HeadManager
themeColor(string $color, Media|string|null $media = 'null')
No description
at line 69
static HeadManager
title(string $title, string|null $prefix = 'null', string|null $suffix = 'null', bool|null $exact = 'null')
No description
at line 69
static void
array()
<int, string> toInertiaElements(int|null $status = 'null')
at line 69
static string
toHtml(int|null $status = 'null')
No description
at line 69
static HeadManager
twitter(TwitterCard|string|null $card = 'null', string|null $site = 'null', string|null $creator = 'null', string|null $title = 'null', string|null $description = 'null', string|null $image = 'null')
No description
at line 69
static HeadManager
twitterImage(string $url, string|null $alt = 'null')
No description
at line 69
static HeadManager
viewport(string $content)
No description
at line 69
static HeadManager
webAppCapable(bool $capable = 'true')
No description