PHP 클래스 Nwidart\Modules\Support\Stub

파일 보기 프로젝트 열기: nwidart/laravel-modules 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$basePath null | string The base path of stub file.
$path string The stub path.
$replaces array The replacements array.

공개 메소드들

메소드 설명
__construct ( string $path, array $replaces = [] ) The contructor.
__toString ( ) : string Handle magic method __toString.
create ( string $path, array $replaces = [] ) : self Create new self instance.
createFromPath ( string $path, array $replaces = [] ) : self Create new self instance from full path.
getBasePath ( ) : string | null Get base path.
getContents ( ) : mixed | string Get stub contents.
getPath ( ) : string Get stub path.
getReplaces ( ) : array Get replacements.
render ( ) : string Get stub contents.
replace ( array $replaces = [] ) Set replacements array.
saveTo ( string $path, string $filename ) : boolean Save stub to specific path.
setBasePath ( string $path ) Set base path.
setPath ( string $path ) : self Set stub path.

메소드 상세

__construct() 공개 메소드

The contructor.
public __construct ( string $path, array $replaces = [] )
$path string
$replaces array

__toString() 공개 메소드

Handle magic method __toString.
public __toString ( ) : string
리턴 string

create() 공개 정적인 메소드

Create new self instance.
public static create ( string $path, array $replaces = [] ) : self
$path string
$replaces array
리턴 self

createFromPath() 공개 정적인 메소드

Create new self instance from full path.
public static createFromPath ( string $path, array $replaces = [] ) : self
$path string
$replaces array
리턴 self

getBasePath() 공개 정적인 메소드

Get base path.
public static getBasePath ( ) : string | null
리턴 string | null

getContents() 공개 메소드

Get stub contents.
public getContents ( ) : mixed | string
리턴 mixed | string

getPath() 공개 메소드

Get stub path.
public getPath ( ) : string
리턴 string

getReplaces() 공개 메소드

Get replacements.
public getReplaces ( ) : array
리턴 array

render() 공개 메소드

Get stub contents.
public render ( ) : string
리턴 string

replace() 공개 메소드

Set replacements array.
public replace ( array $replaces = [] )
$replaces array

saveTo() 공개 메소드

Save stub to specific path.
public saveTo ( string $path, string $filename ) : boolean
$path string
$filename string
리턴 boolean

setBasePath() 공개 정적인 메소드

Set base path.
public static setBasePath ( string $path )
$path string

setPath() 공개 메소드

Set stub path.
public setPath ( string $path ) : self
$path string
리턴 self

프로퍼티 상세

$basePath 보호되어 있는 정적으로 프로퍼티

The base path of stub file.
protected static null|string $basePath
리턴 null | string

$path 보호되어 있는 프로퍼티

The stub path.
protected string $path
리턴 string

$replaces 보호되어 있는 프로퍼티

The replacements array.
protected array $replaces
리턴 array