Property | Type | Description | |
---|---|---|---|
$archive | ZipArchive | File archive instance. | |
$config | array | Configuration options. | |
$description | string | The console command description. | |
$filesystem | Illuminate\Filesystem\Filesystem | Filesystem implementation. | |
$importer | Ipalaus\Geonames\Importer | Importer instance. | |
$name | string | The console command name. |
Method | Description | |
---|---|---|
__construct ( Ipalaus\Geonames\Importer $importer, Illuminate\Filesystem\Filesystem $filesystem, array $config ) : void | Create a new console command instance. | |
fire ( ) : void | Execute the console command. | |
getFiles ( ) : array | Get the files to download. | |
runProcess ( |
Run a given process. |
Method | Description | |
---|---|---|
downloadFile ( string $url, string $path, $filename ) : void | Download a file from a remote URL to a given path. | |
extractZip ( string $path, string $filename ) : string | Given a zip archive, extract a the file and remove the original. | |
fileExists ( string $path, string $filename ) : boolean | Checks if a file already exists on a path. If the file contains .zip in the name we will also check for matches with .txt. | |
getOptions ( ) : array | Get the console command options. | |
getPath ( ) : string | Return the working path. | |
makeProcess ( string $command ) : |
Create a process with the given command. | |
seedCommand ( string $class, $extra = '' ) : void | Run a seed coman in a separate process. | |
setCountry ( string $country ) : void | Sets the name file to a specific country. | |
setDevelopment ( ) : void | Sets the names file for a ligher version for development. We also ignore the alternate names. |
public __construct ( Ipalaus\Geonames\Importer $importer, Illuminate\Filesystem\Filesystem $filesystem, array $config ) : void | ||
$importer | Ipalaus\Geonames\Importer | |
$filesystem | Illuminate\Filesystem\Filesystem | |
$config | array | |
return | void |
protected getOptions ( ) : array | ||
return | array |
protected makeProcess ( string $command ) : |
||
$command | string | |
return |
public runProcess ( |
||
$process | ||
return |
protected seedCommand ( string $class, $extra = '' ) : void | ||
$class | string | |
return | void |
protected setCountry ( string $country ) : void | ||
$country | string | |
return | void |
protected setDevelopment ( ) : void | ||
return | void |
protected string $description | ||
return | string |
protected Filesystem,Illuminate\Filesystem $filesystem | ||
return | Illuminate\Filesystem\Filesystem |
protected Importer,Ipalaus\Geonames $importer | ||
return | Ipalaus\Geonames\Importer |