PHP Класс Platformsh\Cli\Local\LocalApplication

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$appRoot
$cliConfig
$config
$sourceDir

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

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

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

Метод Описание
getPath ( ) : string
normalizeConfig ( array $config ) : array Normalize an application's configuration.

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

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

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

getApplication() публичный статический метод

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.
Результат LocalApplication

getApplications() публичный статический метод

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.
Результат LocalApplication[]

getConfig() публичный метод

Get the application's configuration, parsed from its YAML definition.
public getConfig ( ) : array
Результат array

getDocumentRoot() публичный метод

Get the configured document root for the application, as a relative path.
public getDocumentRoot ( ) : string
Результат string

getId() публичный метод

Get a unique identifier for this app.
public getId ( ) : string
Результат string

getName() публичный метод

public getName ( ) : string | null
Результат string | null

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

protected getPath ( ) : string
Результат string

getRoot() публичный метод

public getRoot ( ) : string
Результат string

getSharedFileMounts() публичный метод

Get a list of shared file mounts configured for the app.
public getSharedFileMounts ( ) : array
Результат array An array of shared file mount paths, keyed by the path in the app. Leading and trailing slashes are stripped.

getToolstack() публичный метод

Get the toolstack for the application.
public getToolstack ( ) : Platformsh\Cli\Local\Toolstack\ToolstackInterface | false
Результат Platformsh\Cli\Local\Toolstack\ToolstackInterface | false

getToolstacks() публичный метод

public getToolstacks ( ) : Platformsh\Cli\Local\Toolstack\ToolstackInterface[]
Результат Platformsh\Cli\Local\Toolstack\ToolstackInterface[]

normalizeConfig() защищенный метод

Normalize an application's configuration.
protected normalizeConfig ( array $config ) : array
$config array
Результат array

setConfig() публичный метод

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

shouldMoveToRoot() публичный метод

Check whether the whole app should be moved into the document root.
public shouldMoveToRoot ( ) : string
Результат string

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

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

protected $appRoot

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

protected $cliConfig

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

protected $config

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

protected $sourceDir