api/laravel/View/Factory.yaml
2024-09-26 02:03:21 -07:00

599 lines
13 KiB
YAML

name: Factory
class_comment: null
dependencies:
- name: Container
type: class
source: Illuminate\Contracts\Container\Container
- name: Dispatcher
type: class
source: Illuminate\Contracts\Events\Dispatcher
- name: Arrayable
type: class
source: Illuminate\Contracts\Support\Arrayable
- name: FactoryContract
type: class
source: Illuminate\Contracts\View\Factory
- name: Arr
type: class
source: Illuminate\Support\Arr
- name: Macroable
type: class
source: Illuminate\Support\Traits\Macroable
- name: EngineResolver
type: class
source: Illuminate\View\Engines\EngineResolver
- name: InvalidArgumentException
type: class
source: InvalidArgumentException
properties:
- name: engines
visibility: protected
comment: '# * The engine implementation.
# *
# * @var \Illuminate\View\Engines\EngineResolver'
- name: finder
visibility: protected
comment: '# * The view finder implementation.
# *
# * @var \Illuminate\View\ViewFinderInterface'
- name: events
visibility: protected
comment: '# * The event dispatcher instance.
# *
# * @var \Illuminate\Contracts\Events\Dispatcher'
- name: container
visibility: protected
comment: '# * The IoC container instance.
# *
# * @var \Illuminate\Contracts\Container\Container'
- name: shared
visibility: protected
comment: '# * Data that should be available to all templates.
# *
# * @var array'
- name: extensions
visibility: protected
comment: '# * The extension to engine bindings.
# *
# * @var array'
- name: composers
visibility: protected
comment: '# * The view composer events.
# *
# * @var array'
- name: renderCount
visibility: protected
comment: '# * The number of active rendering operations.
# *
# * @var int'
- name: renderedOnce
visibility: protected
comment: '# * The "once" block IDs that have been rendered.
# *
# * @var array'
- name: pathEngineCache
visibility: protected
comment: '# * The cached array of engines for paths.
# *
# * @var array'
- name: normalizedNameCache
visibility: protected
comment: '# * The cache of normalized names for views.
# *
# * @var array'
methods:
- name: __construct
visibility: public
parameters:
- name: engines
- name: finder
- name: events
comment: "# * The engine implementation.\n# *\n# * @var \\Illuminate\\View\\Engines\\\
EngineResolver\n# */\n# protected $engines;\n# \n# /**\n# * The view finder implementation.\n\
# *\n# * @var \\Illuminate\\View\\ViewFinderInterface\n# */\n# protected $finder;\n\
# \n# /**\n# * The event dispatcher instance.\n# *\n# * @var \\Illuminate\\Contracts\\\
Events\\Dispatcher\n# */\n# protected $events;\n# \n# /**\n# * The IoC container\
\ instance.\n# *\n# * @var \\Illuminate\\Contracts\\Container\\Container\n# */\n\
# protected $container;\n# \n# /**\n# * Data that should be available to all templates.\n\
# *\n# * @var array\n# */\n# protected $shared = [];\n# \n# /**\n# * The extension\
\ to engine bindings.\n# *\n# * @var array\n# */\n# protected $extensions = [\n\
# 'blade.php' => 'blade',\n# 'php' => 'php',\n# 'css' => 'file',\n# 'html' =>\
\ 'file',\n# ];\n# \n# /**\n# * The view composer events.\n# *\n# * @var array\n\
# */\n# protected $composers = [];\n# \n# /**\n# * The number of active rendering\
\ operations.\n# *\n# * @var int\n# */\n# protected $renderCount = 0;\n# \n# /**\n\
# * The \"once\" block IDs that have been rendered.\n# *\n# * @var array\n# */\n\
# protected $renderedOnce = [];\n# \n# /**\n# * The cached array of engines for\
\ paths.\n# *\n# * @var array\n# */\n# protected $pathEngineCache = [];\n# \n\
# /**\n# * The cache of normalized names for views.\n# *\n# * @var array\n# */\n\
# protected $normalizedNameCache = [];\n# \n# /**\n# * Create a new view factory\
\ instance.\n# *\n# * @param \\Illuminate\\View\\Engines\\EngineResolver $engines\n\
# * @param \\Illuminate\\View\\ViewFinderInterface $finder\n# * @param \\Illuminate\\\
Contracts\\Events\\Dispatcher $events\n# * @return void"
- name: file
visibility: public
parameters:
- name: path
- name: data
default: '[]'
- name: mergeData
default: '[]'
comment: '# * Get the evaluated view contents for the given view.
# *
# * @param string $path
# * @param \Illuminate\Contracts\Support\Arrayable|array $data
# * @param array $mergeData
# * @return \Illuminate\Contracts\View\View'
- name: make
visibility: public
parameters:
- name: view
- name: data
default: '[]'
- name: mergeData
default: '[]'
comment: '# * Get the evaluated view contents for the given view.
# *
# * @param string $view
# * @param \Illuminate\Contracts\Support\Arrayable|array $data
# * @param array $mergeData
# * @return \Illuminate\Contracts\View\View'
- name: first
visibility: public
parameters:
- name: views
- name: data
default: '[]'
- name: mergeData
default: '[]'
comment: '# * Get the first view that actually exists from the given list.
# *
# * @param array $views
# * @param \Illuminate\Contracts\Support\Arrayable|array $data
# * @param array $mergeData
# * @return \Illuminate\Contracts\View\View
# *
# * @throws \InvalidArgumentException'
- name: renderWhen
visibility: public
parameters:
- name: condition
- name: view
- name: data
default: '[]'
- name: mergeData
default: '[]'
comment: '# * Get the rendered content of the view based on a given condition.
# *
# * @param bool $condition
# * @param string $view
# * @param \Illuminate\Contracts\Support\Arrayable|array $data
# * @param array $mergeData
# * @return string'
- name: renderUnless
visibility: public
parameters:
- name: condition
- name: view
- name: data
default: '[]'
- name: mergeData
default: '[]'
comment: '# * Get the rendered content of the view based on the negation of a given
condition.
# *
# * @param bool $condition
# * @param string $view
# * @param \Illuminate\Contracts\Support\Arrayable|array $data
# * @param array $mergeData
# * @return string'
- name: renderEach
visibility: public
parameters:
- name: view
- name: data
- name: iterator
- name: empty
default: '''raw|'''
comment: '# * Get the rendered contents of a partial from a loop.
# *
# * @param string $view
# * @param array $data
# * @param string $iterator
# * @param string $empty
# * @return string'
- name: normalizeName
visibility: protected
parameters:
- name: name
comment: '# * Normalize a view name.
# *
# * @param string $name
# * @return string'
- name: parseData
visibility: protected
parameters:
- name: data
comment: '# * Parse the given data into a raw array.
# *
# * @param mixed $data
# * @return array'
- name: viewInstance
visibility: protected
parameters:
- name: view
- name: path
- name: data
comment: '# * Create a new view instance from the given arguments.
# *
# * @param string $view
# * @param string $path
# * @param \Illuminate\Contracts\Support\Arrayable|array $data
# * @return \Illuminate\Contracts\View\View'
- name: exists
visibility: public
parameters:
- name: view
comment: '# * Determine if a given view exists.
# *
# * @param string $view
# * @return bool'
- name: getEngineFromPath
visibility: public
parameters:
- name: path
comment: '# * Get the appropriate view engine for the given path.
# *
# * @param string $path
# * @return \Illuminate\Contracts\View\Engine
# *
# * @throws \InvalidArgumentException'
- name: getExtension
visibility: protected
parameters:
- name: path
comment: '# * Get the extension used by the view file.
# *
# * @param string $path
# * @return string|null'
- name: share
visibility: public
parameters:
- name: key
- name: value
default: 'null'
comment: '# * Add a piece of shared data to the environment.
# *
# * @param array|string $key
# * @param mixed|null $value
# * @return mixed'
- name: incrementRender
visibility: public
parameters: []
comment: '# * Increment the rendering counter.
# *
# * @return void'
- name: decrementRender
visibility: public
parameters: []
comment: '# * Decrement the rendering counter.
# *
# * @return void'
- name: doneRendering
visibility: public
parameters: []
comment: '# * Check if there are no active render operations.
# *
# * @return bool'
- name: hasRenderedOnce
visibility: public
parameters:
- name: id
comment: '# * Determine if the given once token has been rendered.
# *
# * @param string $id
# * @return bool'
- name: markAsRenderedOnce
visibility: public
parameters:
- name: id
comment: '# * Mark the given once token as having been rendered.
# *
# * @param string $id
# * @return void'
- name: addLocation
visibility: public
parameters:
- name: location
comment: '# * Add a location to the array of view locations.
# *
# * @param string $location
# * @return void'
- name: addNamespace
visibility: public
parameters:
- name: namespace
- name: hints
comment: '# * Add a new namespace to the loader.
# *
# * @param string $namespace
# * @param string|array $hints
# * @return $this'
- name: prependNamespace
visibility: public
parameters:
- name: namespace
- name: hints
comment: '# * Prepend a new namespace to the loader.
# *
# * @param string $namespace
# * @param string|array $hints
# * @return $this'
- name: replaceNamespace
visibility: public
parameters:
- name: namespace
- name: hints
comment: '# * Replace the namespace hints for the given namespace.
# *
# * @param string $namespace
# * @param string|array $hints
# * @return $this'
- name: addExtension
visibility: public
parameters:
- name: extension
- name: engine
- name: resolver
default: 'null'
comment: '# * Register a valid view extension and its engine.
# *
# * @param string $extension
# * @param string $engine
# * @param \Closure|null $resolver
# * @return void'
- name: flushState
visibility: public
parameters: []
comment: '# * Flush all of the factory state like sections and stacks.
# *
# * @return void'
- name: flushStateIfDoneRendering
visibility: public
parameters: []
comment: '# * Flush all of the section contents if done rendering.
# *
# * @return void'
- name: getExtensions
visibility: public
parameters: []
comment: '# * Get the extension to engine bindings.
# *
# * @return array'
- name: getEngineResolver
visibility: public
parameters: []
comment: '# * Get the engine resolver instance.
# *
# * @return \Illuminate\View\Engines\EngineResolver'
- name: getFinder
visibility: public
parameters: []
comment: '# * Get the view finder instance.
# *
# * @return \Illuminate\View\ViewFinderInterface'
- name: setFinder
visibility: public
parameters:
- name: finder
comment: '# * Set the view finder instance.
# *
# * @param \Illuminate\View\ViewFinderInterface $finder
# * @return void'
- name: flushFinderCache
visibility: public
parameters: []
comment: '# * Flush the cache of views located by the finder.
# *
# * @return void'
- name: getDispatcher
visibility: public
parameters: []
comment: '# * Get the event dispatcher instance.
# *
# * @return \Illuminate\Contracts\Events\Dispatcher'
- name: setDispatcher
visibility: public
parameters:
- name: events
comment: '# * Set the event dispatcher instance.
# *
# * @param \Illuminate\Contracts\Events\Dispatcher $events
# * @return void'
- name: getContainer
visibility: public
parameters: []
comment: '# * Get the IoC container instance.
# *
# * @return \Illuminate\Contracts\Container\Container'
- name: setContainer
visibility: public
parameters:
- name: container
comment: '# * Set the IoC container instance.
# *
# * @param \Illuminate\Contracts\Container\Container $container
# * @return void'
- name: shared
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Get an item from the shared data.
# *
# * @param string $key
# * @param mixed $default
# * @return mixed'
- name: getShared
visibility: public
parameters: []
comment: '# * Get all of the shared data for the environment.
# *
# * @return array'
traits:
- Illuminate\Contracts\Container\Container
- Illuminate\Contracts\Events\Dispatcher
- Illuminate\Contracts\Support\Arrayable
- Illuminate\Support\Arr
- Illuminate\Support\Traits\Macroable
- Illuminate\View\Engines\EngineResolver
- InvalidArgumentException
- Macroable
interfaces:
- FactoryContract