class ViewOpener

Class ViewOpener opens a view for an include statement in this format:

"@include('some.path.here", ...)

We will use Laravel's view path finder in order to transform the 'some.path.here' into a real file that we can open and inspect the html and thus fetch all devise tags from it.

Methods

__construct($finder = null, $file = null)

Construct a new view opener

string
open($includeStatement, $includedViews)

Attempt to open the view path if something fails then we silently fail and return an empty string.

[type]
findAllIncludedViews($viewPath, $ignore = array())

Recursively finds every view that is included inside this view

[type]
openViewPath($path)

Find the real path

Details

at line 26
__construct($finder = null, $file = null)

Construct a new view opener

Parameters

$finder
$file

at line 46
string open($includeStatement, $includedViews)

Attempt to open the view path if something fails then we silently fail and return an empty string.

..

We have added the includedViews array so we do not attempt to open up those views (we don't need to because we've already found all the devise tags inside of those files since they've already been opened). If view#1 includes view#2 which includes view#1, this would have cause an infinite loop but b/c we keep up with which views have been included we know when to stop).

Parameters

$includeStatement
$includedViews

Return Value

string

at line 66
[type] findAllIncludedViews($viewPath, $ignore = array())

Recursively finds every view that is included inside this view

Parameters

$viewPath
$ignore

Return Value

[type]

at line 93
[type] openViewPath($path)

Find the real path

Parameters

$path

Return Value

[type]