Property | Type | Description | |
---|---|---|---|
$basePath | null | string | The base path of stub file. | |
$path | string | The stub path. | |
$replaces | array | The replacements array. |
Method | Description | |
---|---|---|
__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. |
public __construct ( string $path, array $replaces = [] ) | ||
$path | string | |
$replaces | array |
public __toString ( ) : string | ||
return | string |
public static createFromPath ( string $path, array $replaces = [] ) : self | ||
$path | string | |
$replaces | array | |
return | self |
public static getBasePath ( ) : string | null | ||
return | string | null |
public getContents ( ) : mixed | string | ||
return | mixed | string |
public static setBasePath ( string $path ) | ||
$path | string |