FileGenerator
in package
Class FileGenerator.
Table of Contents
Properties
- $contents : string
- The contents will be used.
- $filesystem : Filesystem
- The laravel filesystem or null.
- $path : string
- The path wil be used.
- $overwriteFile : bool
Methods
- __construct() : mixed
- The constructor.
- generate() : bool|int
- Generate the file.
- getContents() : string
- Get contents.
- getFilesystem() : Filesystem
- Get filesystem.
- getPath() : string
- Get path.
- isOverwriteFile() : bool
- setContents() : $this
- Set contents.
- setFilesystem() : $this
- Set filesystem.
- setPath() : $this
- Set path.
- withFileOverwrite() : self
Properties
$contents
The contents will be used.
protected
string
$contents
$filesystem
The laravel filesystem or null.
protected
Filesystem
$filesystem
$path
The path wil be used.
protected
string
$path
$overwriteFile
private
bool
$overwriteFile
= false
Methods
__construct()
The constructor.
public
__construct(string $path, string $contents[, Filesystem|null $filesystem = null ]) : mixed
Parameters
- $path : string
- $contents : string
- $filesystem : Filesystem|null = null
generate()
Generate the file.
public
generate() : bool|int
Tags
Return values
bool|intgetContents()
Get contents.
public
getContents() : string
Return values
stringgetFilesystem()
Get filesystem.
public
getFilesystem() : Filesystem
Return values
FilesystemgetPath()
Get path.
public
getPath() : string
Return values
stringisOverwriteFile()
public
isOverwriteFile() : bool
Return values
boolsetContents()
Set contents.
public
setContents(string $contents) : $this
Parameters
- $contents : string
Return values
$thissetFilesystem()
Set filesystem.
public
setFilesystem(Filesystem $filesystem) : $this
Parameters
- $filesystem : Filesystem
Return values
$thissetPath()
Set path.
public
setPath(mixed $path) : $this
Parameters
- $path : mixed
Return values
$thiswithFileOverwrite()
public
withFileOverwrite(bool $overwrite) : self
Parameters
- $overwrite : bool