\duncan3dc\LaravelBladeInstance

Standalone class for generating text using blade templates.

Summary

Methods
Properties
Constants
__construct()
addPath()
exists()
share()
composer()
creator()
addNamespace()
file()
make()
render()
No public properties found
No constants found
getViewFinder()
getViewFactory()
$path
$cache
$factory
$finder
N/A
No private methods found
No private properties found
N/A

Properties

$path

$path : string

Type

string — The default path for views.

$cache

$cache : string

Type

string — The default path for cached php.

$factory

$factory : \Illuminate\View\Factory

Type

\Illuminate\View\Factory — The internal cache of the Factory to only instantiate it once.

$finder

$finder : \Illuminate\View\FileViewFinder

Type

\Illuminate\View\FileViewFinder — The internal cache of the FileViewFinder to only instantiate it once.

Methods

__construct()

__construct(string  $path, string  $cache) 

Create a new instance of the blade view factory.

Parameters

string $path

The default path for views

string $cache

The default path for cached php

addPath()

addPath(string  $path) : static

Add a path to look for views in.

Parameters

string $path

The path to look in

Returns

static

exists()

exists(string  $view) : boolean

Check if a view exists.

Parameters

string $view

The name of the view to check

Returns

boolean

share()

share(string  $key, mixed  $value = null) : static

Share data across all views.

Parameters

string $key

The name of the variable to share

mixed $value

The value to assign to the variable

Returns

static

composer()

composer(string  $key, mixed  $value,   $priority = null) : static

Register a composer.

Parameters

string $key

The name of the composer to register

mixed $value

The closure or class to use

$priority

Returns

static

creator()

creator(string  $key, mixed  $value) : static

Register a creator.

Parameters

string $key

The name of the creator to register

mixed $value

The closure or class to use

Returns

static

addNamespace()

addNamespace(string  $namespace, array|string  $hints) : static

Add a new namespace to the loader.

Parameters

string $namespace

The namespace to use

array|string $hints

The hints to apply

Returns

static

file()

file(string  $path, array  $data = array(), array  $mergeData = array()) : \Illuminate\View\View

Get the evaluated view contents for the given path.

Parameters

string $path

The path of the file to use

array $data

The parameters to pass to the view

array $mergeData

The extra data to merge

Returns

\Illuminate\View\View —

The generated view

make()

make(string  $view, array  $params = array(),   $mergeData = array()) : \Illuminate\View\View

Generate a view.

Parameters

string $view

The name of the view to make

array $params

The parameters to pass to the view

$mergeData

Returns

\Illuminate\View\View —

The generated view

render()

render(string  $view, array  $params = array()) : string

Get the content by generating a view.

Parameters

string $view

The name of the view to make

array $params

The parameters to pass to the view

Returns

string —

The generated content

getViewFinder()

getViewFinder() : \Illuminate\View\FileViewFinder

Get the laravel view finder.

Returns

\Illuminate\View\FileViewFinder

getViewFactory()

getViewFactory() : \Illuminate\View\Factory

Get the laravel view factory.

Returns

\Illuminate\View\Factory