PHP 클래스 Symfony\Installer\DownloadCommand

저자: Christophe Coevoet ([email protected])
저자: Javier Eguiluz ([email protected])
상속: extends Symfony\Component\Console\Command\Command
파일 보기 프로젝트 열기: symfony/symfony-installer 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$composerManager Symfony\Installer\Manager\ComposerManager
$downloadedFilePath The path to the downloaded file
$fs To dump content to a file
$latestInstallerVersion The latest installer version
$localInstallerVersion The version of the local installer being executed
$output To output content
$projectDir The project dir
$projectName The project name
$requirementsErrors The requirement errors
$version The version to install

보호된 메소드들

메소드 설명
checkInstallerVersion ( ) Checks if the installed version is the latest one and displays some warning messages if not.
checkPermissions ( ) Checks if the installer has enough permissions to create the project.
checkProjectName ( ) Checks the project name.
checkSymfonyRequirements ( ) Checks if environment meets symfony requirements.
createGitIgnore ( ) Creates the appropriate .gitignore file for a Symfony project if it doesn't exist.
download ( ) Chooses the best compressed file format to download (ZIP or TGZ) depending upon the available operating system uncompressing commands and the enabled PHP extensions and it downloads the file.
extract ( ) Extracts the compressed Symfony file (ZIP or TGZ) using the native operating system commands if available or PHP code otherwise.
generateRandomSecret ( ) : string Generates a good random value for Symfony's 'secret' option.
getDownloadedApplicationType ( ) : string Returns the type of the downloaded application in a human readable format.
getErrorMessage ( Requirement $requirement, integer $lineSize = 70 ) : string Formats the error message contained in the given Requirement item using the optional line length provided.
getExecutedCommand ( ) : string Returns the executed command with all its arguments (e.g. "symfony new blog 2.8.1").
getGuzzleClient ( ) : Client Returns the Guzzle client configured according to the system environment (e.g. it takes into account whether it should use a proxy server or not).
getInstalledSymfonyVersion ( ) : string Returns the full Symfony version number of the project by getting it from the composer.lock file.
getRemoteFileUrl ( ) : string Returns the absolute URL of the remote file downloaded by the command.
getUrlContents ( string $url ) : string Returns the contents obtained by making a GET request to the given URL.
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
isEmptyDirectory ( string $dir ) : boolean Checks whether the given directory is empty or not.
isInstallerUpdated ( ) : boolean
isSymfony3 ( ) : boolean Checks that the asked version is in the 3.x branch.
updateComposerConfig ( ) Updates the composer.json file to provide better values for some of the default configuration values.

비공개 메소드들

메소드 설명
enableSignalHandler ( ) Enables the signal handler.
getSymfonyRequirementsFilePath ( )

메소드 상세

checkInstallerVersion() 보호된 메소드

Checks if the installed version is the latest one and displays some warning messages if not.
protected checkInstallerVersion ( )

checkPermissions() 보호된 메소드

Checks if the installer has enough permissions to create the project.
protected checkPermissions ( )

checkProjectName() 보호된 메소드

Checks the project name.
protected checkProjectName ( )

checkSymfonyRequirements() 보호된 메소드

Checks if environment meets symfony requirements.
protected checkSymfonyRequirements ( )

createGitIgnore() 보호된 메소드

Creates the appropriate .gitignore file for a Symfony project if it doesn't exist.
protected createGitIgnore ( )

download() 보호된 메소드

Chooses the best compressed file format to download (ZIP or TGZ) depending upon the available operating system uncompressing commands and the enabled PHP extensions and it downloads the file.
protected download ( )

extract() 보호된 메소드

Extracts the compressed Symfony file (ZIP or TGZ) using the native operating system commands if available or PHP code otherwise.
protected extract ( )

generateRandomSecret() 보호된 메소드

Generates a good random value for Symfony's 'secret' option.
protected generateRandomSecret ( ) : string
리턴 string The randomly generated secret

getDownloadedApplicationType() 추상적인 보호된 메소드

It's mainly used to display readable error messages.
abstract protected getDownloadedApplicationType ( ) : string
리턴 string The type of the downloaded application in a human readable format

getErrorMessage() 보호된 메소드

Formats the error message contained in the given Requirement item using the optional line length provided.
protected getErrorMessage ( Requirement $requirement, integer $lineSize = 70 ) : string
$requirement Requirement The Symfony requirements
$lineSize integer The maximum line length
리턴 string The formatted error message

getExecutedCommand() 보호된 메소드

Returns the executed command with all its arguments (e.g. "symfony new blog 2.8.1").
protected getExecutedCommand ( ) : string
리턴 string The executed command with all its arguments

getGuzzleClient() 보호된 메소드

Returns the Guzzle client configured according to the system environment (e.g. it takes into account whether it should use a proxy server or not).
protected getGuzzleClient ( ) : Client
리턴 GuzzleHttp\Client The configured Guzzle client

getInstalledSymfonyVersion() 보호된 메소드

Returns the full Symfony version number of the project by getting it from the composer.lock file.
protected getInstalledSymfonyVersion ( ) : string
리턴 string The installed Symfony version

getRemoteFileUrl() 추상적인 보호된 메소드

Returns the absolute URL of the remote file downloaded by the command.
abstract protected getRemoteFileUrl ( ) : string
리턴 string The absolute URL of the remote file downloaded by the command

getUrlContents() 보호된 메소드

Returns the contents obtained by making a GET request to the given URL.
protected getUrlContents ( string $url ) : string
$url string The URL to get the contents from
리턴 string The obtained contents of $url

initialize() 보호된 메소드

protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

isEmptyDirectory() 보호된 메소드

Checks whether the given directory is empty or not.
protected isEmptyDirectory ( string $dir ) : boolean
$dir string the path of the directory to check
리턴 boolean Whether the given directory is empty

isInstallerUpdated() 보호된 메소드

protected isInstallerUpdated ( ) : boolean
리턴 boolean Whether the installed version is the latest one

isSymfony3() 보호된 메소드

Checks that the asked version is in the 3.x branch.
protected isSymfony3 ( ) : boolean
리턴 boolean Whether is Symfony3

updateComposerConfig() 보호된 메소드

Updates the composer.json file to provide better values for some of the default configuration values.
protected updateComposerConfig ( )

프로퍼티 상세

$composerManager 보호되어 있는 프로퍼티

protected ComposerManager,Symfony\Installer\Manager $composerManager
리턴 Symfony\Installer\Manager\ComposerManager

$downloadedFilePath 보호되어 있는 프로퍼티

The path to the downloaded file
protected $downloadedFilePath

$fs 보호되어 있는 프로퍼티

To dump content to a file
protected $fs

$latestInstallerVersion 보호되어 있는 프로퍼티

The latest installer version
protected $latestInstallerVersion

$localInstallerVersion 보호되어 있는 프로퍼티

The version of the local installer being executed
protected $localInstallerVersion

$output 보호되어 있는 프로퍼티

To output content
protected $output

$projectDir 보호되어 있는 프로퍼티

The project dir
protected $projectDir

$projectName 보호되어 있는 프로퍼티

The project name
protected $projectName

$requirementsErrors 보호되어 있는 프로퍼티

The requirement errors
protected $requirementsErrors

$version 보호되어 있는 프로퍼티

The version to install
protected $version