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.
파일 보기 프로젝트 열기: devisephp/cms 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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