class
View extends Facade (View source)
Properties
static protected Application|null
|
$app |
The application instance being facaded. |
from
Facade |
static protected array
|
$resolvedInstance |
The resolved object instances. |
from
Facade |
static protected bool
|
$cached |
Indicates if the resolved instance should be cached. |
from
Facade |
Methods
static void
resolved(
Closure $callback)
Run a Closure when the facade has been resolved.
spy()
Convert the facade into a Mockery spy.
expects()
Initiate a mock expectation on the facade.
createMock()
Create a fresh mock instance for the given class.
static bool
isMock()
Determines whether a mock is set as the instance of the facade.
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
static bool
isFake()
Determines whether a "fake" has been set as the facade instance.
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
file(string $path,
Arrayable|array $data = [], array $mergeData = [])
No description
make(string $view,
Arrayable|array $data = [], array $mergeData = [])
No description
first(array $views,
Arrayable|array $data = [], array $mergeData = [])
No description
static string
renderWhen(bool $condition, string $view,
Arrayable|array $data = [], array $mergeData = [])
No description
static string
renderUnless(bool $condition, string $view,
Arrayable|array $data = [], array $mergeData = [])
No description
static string
renderEach(string $view, array $data, string $iterator, string $empty = 'raw|')
No description
static bool
exists(string $view)
No description
static mixed
share(array|string $key, mixed|null $value = null)
No description
addNamespace(string $namespace, string|array $hints)
No description
static void
addExtension(string $extension, string $engine, Closure|null $resolver = null)
No description
static mixed
shared(string $key, mixed $default = null)
No description
static void
macro(string $name, object|callable $macro)
No description
static void
mixin(object $mixin, bool $replace = true)
No description
static void
slot(string $name, string|null $content = null, array $attributes = [])
No description
static array
creator(array|string $views, Closure|string $callback)
No description
static array
composer(array|string $views, Closure|string $callback)
No description
static mixed
getFragment(string $name, string|null $default = null)
No description
static void
startSection(string $section, string|null $content = null)
No description
static void
inject(string $section, string $content)
No description
static string
yieldContent(string $section, string $default = '')
No description
static mixed
getSection(string $name, string|null $default = null)
No description
static void
addLoop(Countable|array $data)
No description
static void
startPush(string $section, string $content = '')
No description
static void
startPrepend(string $section, string $content = '')
No description
Details
Run a Closure when the facade has been resolved.
Convert the facade into a Mockery spy.
static MockInterface
partialMock()
Initiate a partial mock on the facade.
static Expectation
shouldReceive()
Initiate a mock expectation on the facade.
Initiate a mock expectation on the facade.
static protected MockInterface
createFreshMockInstance()
Create a fresh mock instance for the given class.
static protected MockInterface
createMock()
Create a fresh mock instance for the given class.
static protected bool
isMock()
Determines whether a mock is set as the instance of the facade.
static protected string|null
getMockableClass()
Get the mockable class for the bound instance.
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
Determines whether a "fake" has been set as the facade instance.
Get the root object behind the facade.
static protected string
getFacadeAccessor()
Get the registered name of the component.
static protected mixed
resolveFacadeInstance(string $name)
Resolve the facade root instance from the container.
static void
clearResolvedInstance(string $name)
Clear a resolved facade instance.
static void
clearResolvedInstances()
Clear all of the resolved instances.
Get the application default aliases.
Get the application instance behind the facade.
Set the application instance.
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
static View
file(string $path, Arrayable|array $data = [], array $mergeData = [])
static View
make(string $view, Arrayable|array $data = [], array $mergeData = [])
static View
first(array $views, Arrayable|array $data = [], array $mergeData = [])
static string
renderWhen(bool $condition, string $view, Arrayable|array $data = [], array $mergeData = [])
static string
renderUnless(bool $condition, string $view, Arrayable|array $data = [], array $mergeData = [])
static string
renderEach(string $view, array $data, string $iterator, string $empty = 'raw|')
static bool
exists(string $view)
static Engine
getEngineFromPath(string $path)
static mixed
share(array|string $key, mixed|null $value = null)
static void
incrementRender()
static void
decrementRender()
static bool
doneRendering()
static bool
hasRenderedOnce(string $id)
static void
markAsRenderedOnce(string $id)
static void
addLocation(string $location)
static void
prependLocation(string $location)
static Factory
addNamespace(string $namespace, string|array $hints)
static Factory
prependNamespace(string $namespace, string|array $hints)
static Factory
replaceNamespace(string $namespace, string|array $hints)
static void
addExtension(string $extension, string $engine, Closure|null $resolver = null)
static void
flushStateIfDoneRendering()
static array
getExtensions()
static void
flushFinderCache()
static mixed
shared(string $key, mixed $default = null)
static void
macro(string $name, object|callable $macro)
static void
mixin(object $mixin, bool $replace = true)
static bool
hasMacro(string $name)
static void
flushMacros()
static void
startComponent(Closure|string $view, array $data = [])
static void
startComponentFirst(array $names, array $data = [])
static string
renderComponent()
static mixed|null
getConsumableComponentData(string $key, mixed $default = null)
static void
slot(string $name, string|null $content = null, array $attributes = [])
static array
creator(array|string $views, Closure|string $callback)
static array
composers(array $composers)
static array
composer(array|string $views, Closure|string $callback)
static void
callComposer(View $view)
static void
callCreator(View $view)
static void
startFragment(string $fragment)
static string
stopFragment()
static mixed
getFragment(string $name, string|null $default = null)
static array
getFragments()
static void
flushFragments()
static void
startSection(string $section, string|null $content = null)
static void
inject(string $section, string $content)
static string
yieldSection()
static string
stopSection(bool $overwrite = false)
static string
appendSection()
static string
yieldContent(string $section, string $default = '')
static string
parentPlaceholder(string $section = '')
static bool
hasSection(string $name)
static bool
sectionMissing(string $name)
static mixed
getSection(string $name, string|null $default = null)
static array
getSections()
static void
flushSections()
static void
addLoop(Countable|array $data)
static void
incrementLoopIndices()
static stdClass|null
getLastLoop()
static array
getLoopStack()
static void
startPush(string $section, string $content = '')
static void
startPrepend(string $section, string $content = '')
static string
stopPrepend()
static string
yieldPushContent(string $section, string $default = '')
static void
flushStacks()
static void
startTranslation(array $replacements = [])
static string
renderTranslation()