PHP 클래스 AppserverIo\Appserver\Meta\Composer\Script\Setup

파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$defaultProperties array The available properties we used for parsing the template.
$logo string appserver.io written in ASCI art.
$mergedProperties array The array with the merged and os specific template variables.
$osProperties array The OS specific configuration properties.

공개 메소드들

메소드 설명
changeFilePermissions ( string $filename, integer $mode = 420 ) : void Sets the passed mode for the file if NOT on Windows.
copyOsSpecificResource ( string $os, string $resource, boolean $override = false, integer $mode = 420 ) : void Copies the passed OS specific resource file to the target directory.
getLinuxDistro ( ) : string Returns the Linux distribution we're running on.
getValue ( string $key ) : mixed | null Returns the configuration value with the passed key.
postInstall ( Composer\Script\Event $event ) : void This method will be invoked by composer after a successful installation and creates the application server configuration file under etc/appserver/appserver.xml.
postUpdate ( Composer\Script\Event $event ) : void This method will be invoked by composer after a successful update and creates the application server configuration file under etc/appserver/appserver.xml.
prepareContext ( null | string $installDir = null, null | Composer\Script\Event $event = null ) : void Prepares the context by given event or without event for other usage
prepareDirectory ( string $directory, integer $mode = 509 ) : void Prepares the passed directory if necessary.
prepareOsSpecificPath ( string $path ) : string Prepares the passed path to work on the actual OS.
prepareProperties ( string $os, array $contextProperties ) : void Merge the properties based on the passed OS.
processOsSpecificTemplate ( string $os, string $template, boolean $override = false, integer $mode = 420 ) : void Processes the OS specific template and replace the properties with the OS specific values.
processTemplate ( string $template, boolean $override = false, integer $mode = 420 ) : void Processes the template and replace the properties with the OS specific values.

메소드 상세

changeFilePermissions() 공개 정적인 메소드

Sets the passed mode for the file if NOT on Windows.
public static changeFilePermissions ( string $filename, integer $mode = 420 ) : void
$filename string The filename to set the mode for
$mode integer The mode to set
리턴 void

copyOsSpecificResource() 공개 정적인 메소드

Copies the passed OS specific resource file to the target directory.
public static copyOsSpecificResource ( string $os, string $resource, boolean $override = false, integer $mode = 420 ) : void
$os string The OS we want to copy the files for
$resource string The resource file we want to copy
$override boolean TRUE if the file should be overwritten if exists, else FALSE
$mode integer The mode of the target file
리턴 void

getLinuxDistro() 공개 정적인 메소드

Returns the Linux distribution we're running on.
public static getLinuxDistro ( ) : string
리턴 string The Linux distribution we're running on

getValue() 공개 정적인 메소드

Returns the configuration value with the passed key.
public static getValue ( string $key ) : mixed | null
$key string The key to get value for
리턴 mixed | null The configuration value

postInstall() 공개 정적인 메소드

This method will be invoked by composer after a successful installation and creates the application server configuration file under etc/appserver/appserver.xml.
public static postInstall ( Composer\Script\Event $event ) : void
$event Composer\Script\Event The event that invokes this method
리턴 void

postUpdate() 공개 정적인 메소드

This method will be invoked by composer after a successful update and creates the application server configuration file under etc/appserver/appserver.xml.
public static postUpdate ( Composer\Script\Event $event ) : void
$event Composer\Script\Event The event that invokes this method
리턴 void

prepareContext() 공개 정적인 메소드

Prepares the context by given event or without event for other usage
public static prepareContext ( null | string $installDir = null, null | Composer\Script\Event $event = null ) : void
$installDir null | string The install dir to check for info files
$event null | Composer\Script\Event The event instance or null
리턴 void

prepareDirectory() 공개 정적인 메소드

Prepares the passed directory if necessary.
public static prepareDirectory ( string $directory, integer $mode = 509 ) : void
$directory string The directory to prepare
$mode integer The mode of the directory
리턴 void

prepareOsSpecificPath() 공개 정적인 메소드

Prepares the passed path to work on the actual OS.
public static prepareOsSpecificPath ( string $path ) : string
$path string The path we want to perpare
리턴 string The prepared path

prepareProperties() 공개 정적인 메소드

Merge the properties based on the passed OS.
public static prepareProperties ( string $os, array $contextProperties ) : void
$os string The OS we want to merge the properties for
$contextProperties array The properties to merge
리턴 void

processOsSpecificTemplate() 공개 정적인 메소드

Processes the OS specific template and replace the properties with the OS specific values.
public static processOsSpecificTemplate ( string $os, string $template, boolean $override = false, integer $mode = 420 ) : void
$os string The OS we want to process the template for
$template string The path to the template
$override boolean TRUE if the file should be overwritten if exists, else FALSE
$mode integer The mode of the target file
리턴 void

processTemplate() 공개 정적인 메소드

Processes the template and replace the properties with the OS specific values.
public static processTemplate ( string $template, boolean $override = false, integer $mode = 420 ) : void
$template string The path to the template
$override boolean TRUE if the file should be overwritten if exists, else FALSE
$mode integer The mode of the target file
리턴 void

프로퍼티 상세

$defaultProperties 보호되어 있는 정적으로 프로퍼티

The available properties we used for parsing the template.
protected static array $defaultProperties
리턴 array

$mergedProperties 보호되어 있는 정적으로 프로퍼티

The array with the merged and os specific template variables.
protected static array $mergedProperties
리턴 array

$osProperties 보호되어 있는 정적으로 프로퍼티

The OS specific configuration properties.
protected static array $osProperties
리턴 array