PHP Класс Ipalaus\Geonames\Commands\ImportCommand

Наследование: extends Illuminate\Console\Command
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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 ( Process $process ) : Process Run a given process.

Защищенные методы

Метод Описание
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 ) : Process 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.

Описание методов

__construct() публичный Метод

Create a new console command instance.
public __construct ( Ipalaus\Geonames\Importer $importer, Illuminate\Filesystem\Filesystem $filesystem, array $config ) : void
$importer Ipalaus\Geonames\Importer
$filesystem Illuminate\Filesystem\Filesystem
$config array
Результат void

downloadFile() защищенный Метод

Download a file from a remote URL to a given path.
protected downloadFile ( string $url, string $path, $filename ) : void
$url string
$path string
Результат void

extractZip() защищенный Метод

Given a zip archive, extract a the file and remove the original.
protected extractZip ( string $path, string $filename ) : string
$path string
$filename string
Результат string

fileExists() защищенный Метод

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.
protected fileExists ( string $path, string $filename ) : boolean
$path string
$filename string
Результат boolean

fire() публичный Метод

Execute the console command.
public fire ( ) : void
Результат void

getFiles() публичный Метод

Get the files to download.
public getFiles ( ) : array
Результат array

getOptions() защищенный Метод

Get the console command options.
protected getOptions ( ) : array
Результат array

getPath() защищенный Метод

Return the working path.
protected getPath ( ) : string
Результат string

makeProcess() защищенный Метод

Create a process with the given command.
protected makeProcess ( string $command ) : Process
$command string
Результат Symfony\Component\Process\Process

runProcess() публичный Метод

Run a given process.
public runProcess ( Process $process ) : Process
$process Symfony\Component\Process\Process
Результат Symfony\Component\Process\Process

seedCommand() защищенный Метод

Run a seed coman in a separate process.
protected seedCommand ( string $class, $extra = '' ) : void
$class string
Результат void

setCountry() защищенный Метод

Sets the name file to a specific country.
protected setCountry ( string $country ) : void
$country string
Результат void

setDevelopment() защищенный Метод

Sets the names file for a ligher version for development. We also ignore the alternate names.
protected setDevelopment ( ) : void
Результат void

Описание свойств

$archive защищенное свойство

File archive instance.
protected ZipArchive $archive
Результат ZipArchive

$config защищенное свойство

Configuration options.
protected array $config
Результат array

$description защищенное свойство

The console command description.
protected string $description
Результат string

$filesystem защищенное свойство

Filesystem implementation.
protected Filesystem,Illuminate\Filesystem $filesystem
Результат Illuminate\Filesystem\Filesystem

$importer защищенное свойство

Importer instance.
protected Importer,Ipalaus\Geonames $importer
Результат Ipalaus\Geonames\Importer

$name защищенное свойство

The console command name.
protected string $name
Результат string