PHP Class Platformsh\Cli\Local\LocalApplication

Afficher le fichier Open project: commerceguys/platform-cli Class Usage Examples

Protected Properties

Свойство Type Description
$appRoot
$cliConfig
$config
$sourceDir

Méthodes publiques

Méthode Description
__construct ( string $appRoot, CliConfig $cliConfig = null, string | null $sourceDir = null )
getApplication ( string | null $name, string $directory, CliConfig $config = null ) : LocalApplication Get a single application by name.
getApplications ( string $directory, CliConfig $config = null ) : LocalApplication[] Get a list of applications in a directory.
getConfig ( ) : array Get the application's configuration, parsed from its YAML definition.
getDocumentRoot ( ) : string Get the configured document root for the application, as a relative path.
getId ( ) : string Get a unique identifier for this app.
getName ( ) : string | null
getRoot ( ) : string
getSharedFileMounts ( ) : array Get a list of shared file mounts configured for the app.
getToolstack ( ) : Platformsh\Cli\Local\Toolstack\ToolstackInterface | false Get the toolstack for the application.
getToolstacks ( ) : Platformsh\Cli\Local\Toolstack\ToolstackInterface[]
setConfig ( array $config ) Override the application config.
shouldMoveToRoot ( ) : string Check whether the whole app should be moved into the document root.

Méthodes protégées

Méthode Description
getPath ( ) : string
normalizeConfig ( array $config ) : array Normalize an application's configuration.

Method Details

__construct() public méthode

public __construct ( string $appRoot, CliConfig $cliConfig = null, string | null $sourceDir = null )
$appRoot string
$cliConfig Platformsh\Cli\CliConfig
$sourceDir string | null

getApplication() public static méthode

Get a single application by name.
public static getApplication ( string | null $name, string $directory, CliConfig $config = null ) : LocalApplication
$name string | null The application name.
$directory string The absolute path to a directory.
$config Platformsh\Cli\CliConfig CLI configuration.
Résultat LocalApplication

getApplications() public static méthode

Get a list of applications in a directory.
public static getApplications ( string $directory, CliConfig $config = null ) : LocalApplication[]
$directory string The absolute path to a directory.
$config Platformsh\Cli\CliConfig CLI configuration.
Résultat LocalApplication[]

getConfig() public méthode

Get the application's configuration, parsed from its YAML definition.
public getConfig ( ) : array
Résultat array

getDocumentRoot() public méthode

Get the configured document root for the application, as a relative path.
public getDocumentRoot ( ) : string
Résultat string

getId() public méthode

Get a unique identifier for this app.
public getId ( ) : string
Résultat string

getName() public méthode

public getName ( ) : string | null
Résultat string | null

getPath() protected méthode

protected getPath ( ) : string
Résultat string

getRoot() public méthode

public getRoot ( ) : string
Résultat string

getSharedFileMounts() public méthode

Get a list of shared file mounts configured for the app.
public getSharedFileMounts ( ) : array
Résultat array An array of shared file mount paths, keyed by the path in the app. Leading and trailing slashes are stripped.

getToolstack() public méthode

Get the toolstack for the application.
public getToolstack ( ) : Platformsh\Cli\Local\Toolstack\ToolstackInterface | false
Résultat Platformsh\Cli\Local\Toolstack\ToolstackInterface | false

getToolstacks() public méthode

public getToolstacks ( ) : Platformsh\Cli\Local\Toolstack\ToolstackInterface[]
Résultat Platformsh\Cli\Local\Toolstack\ToolstackInterface[]

normalizeConfig() protected méthode

Normalize an application's configuration.
protected normalizeConfig ( array $config ) : array
$config array
Résultat array

setConfig() public méthode

Override the application config.
public setConfig ( array $config )
$config array

shouldMoveToRoot() public méthode

Check whether the whole app should be moved into the document root.
public shouldMoveToRoot ( ) : string
Résultat string

Property Details

$appRoot protected_oe property

protected $appRoot

$cliConfig protected_oe property

protected $cliConfig

$config protected_oe property

protected $config

$sourceDir protected_oe property

protected $sourceDir