WinterMirror
Console command to implement a "public" folder.
class System\Console\WinterMirror
extends Illuminate\Console\Command
This command will create symbolic links to files and directories that are commonly required to be publicly available.
Extends
Class | Description |
---|---|
Illuminate\Console\Command
|
Properties
protected
$description
:
mixed
= "Generates a mirrored public folder using symbolic links."
The console command description.
protected $destinationPath : string | null
Local cache of the mirror destination path
protected
$directories
:
array
= ["storage\/app\/uploads\/public","storage\/app\/media","storage\/app\/resized","storage\/temp\/public"]
Directories that should be mirrored
protected
$files
:
array
= [".htaccess","index.php","favicon.ico","robots.txt","humans.txt","sitemap.xml"]
Files that should be mirrored
protected
$name
:
mixed
= "winter:mirror"
The console command name.
protected
$wildcards
:
array
= ["modules\/*\/assets","modules\/*\/resources","modules\/*\/behaviors\/*\/assets","modules\/*\/behaviors\/*\/resources","modules\/*\/components\/*\/assets","modules\/*\/components\/*\/resources","modules\/*\/widgets\/*\/assets","modules\/*\/widgets\/*\/resources","modules\/*\/formwidgets\/*\/assets","modules\/*\/formwidgets\/*\/resources","modules\/*\/reportwidgets\/*\/assets","modules\/*\/reportwidgets\/*\/resources","plugins\/*\/*\/assets","plugins\/*\/*\/resources","plugins\/*\/*\/behaviors\/*\/assets","plugins\/*\/*\/behaviors\/*\/resources","plugins\/*\/*\/components\/*\/assets","plugins\/*\/*\/components\/*\/resources","plugins\/*\/*\/reportwidgets\/*\/assets","plugins\/*\/*\/reportwidgets\/*\/resources","plugins\/*\/*\/formwidgets\/*\/assets","plugins\/*\/*\/formwidgets\/*\/resources","plugins\/*\/*\/widgets\/*\/assets","plugins\/*\/*\/widgets\/*\/resources","themes\/*\/assets","themes\/*\/resources"]
Wildcard paths that should be mirrored
Methods
public __construct ()
Create a new command instance.
Returns
mixed
public handle ()
Execute the console command.
Returns
mixed
protected getArguments () : array
Get the console command arguments.
Returns
array
protected getDestinationPath ()
Returns
mixed
protected getOptions () : array
Get the console command options.
Returns
array
protected getRelativePath ($from, $to)
Parameters
Property | Type | Description |
---|---|---|
$from | mixed |
mixed
|
$to | mixed |
mixed
|
Returns
mixed
protected mirror ($src, $dest)
Parameters
Property | Type | Description |
---|---|---|
$src | mixed |
mixed
|
$dest | mixed |
mixed
|
Returns
mixed
protected mirrorDirectory ($directory)
Parameters
Property | Type | Description |
---|---|---|
$directory | mixed |
mixed
|
Returns
mixed
protected mirrorFile ($file)
Parameters
Property | Type | Description |
---|---|---|
$file | mixed |
mixed
|
Returns
mixed
protected mirrorWildcard ($wildcard)
Parameters
Property | Type | Description |
---|---|---|
$wildcard | mixed |
mixed
|
Returns
mixed
Copyright © 2024 Winter CMS