PHP Класс Devise\Pages\Interpreter\ViewOpener

"@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.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$finder Illuminate\View\FileViewFinder Search for view paths

Открытые методы

Метод Описание
__construct ( Illuminate\View\FileViewFinder $finder = null, $file = null ) Construct a new view opener
findAllIncludedViews ( $viewPath, $ignore = [] ) : [type] Recursively finds every view that is included inside this view
open ( $includeStatement, &$includedViews ) : string Attempt to open the view path if something fails then we silently fail and return an empty string.
openViewPath ( [type] $path ) : [type] Find the real path

Защищенные методы

Метод Описание
includeStatements ( string $content ) : array Gets the included views from all these matches
pathFromIncludeStatement ( $statement ) : null Finds the path from a $statement string. The pattern below searches for "@include('this.is.what.we.want', .

Описание методов

__construct() публичный Метод

Construct a new view opener
public __construct ( Illuminate\View\FileViewFinder $finder = null, $file = null )
$finder Illuminate\View\FileViewFinder

findAllIncludedViews() публичный Метод

Recursively finds every view that is included inside this view
public findAllIncludedViews ( $viewPath, $ignore = [] ) : [type]
Результат [type]

includeStatements() защищенный Метод

Gets the included views from all these matches
protected includeStatements ( string $content ) : array
$content string
Результат array

open() публичный Метод

.. 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).
public open ( $includeStatement, &$includedViews ) : string
$includeStatement
$includedViews
Результат string

openViewPath() публичный Метод

Find the real path
public openViewPath ( [type] $path ) : [type]
$path [type]
Результат [type]

pathFromIncludeStatement() защищенный Метод

..)"
protected pathFromIncludeStatement ( $statement ) : null
$statement
Результат null

Описание свойств

$finder защищенное свойство

Search for view paths
protected Illuminate\View\FileViewFinder $finder
Результат Illuminate\View\FileViewFinder