PHP Class Platformsh\Cli\Local\Toolstack\ToolstackBase

Inheritance: implements Platformsh\Cli\Local\Toolstack\ToolstackInterface
Exibir arquivo Open project: commerceguys/platform-cli Class Usage Examples

Protected Properties

Property Type Description
$app Platformsh\Cli\Local\LocalApplication
$appRoot string
$buildDir string
$config Platformsh\Cli\CliConfig
$copy boolean
$fsHelper Platformsh\Cli\Helper\FilesystemHelper
$gitHelper Platformsh\Cli\Helper\GitHelper
$ignoredFiles string[] Files from the app root to ignore during install.
$output Symfony\Component\Console\Output\OutputInterface
$settings array
$shellHelper Platformsh\Cli\Helper\ShellHelperInterface
$specialDestinations array Special destinations for installation.

Public Methods

Method Description
__construct ( object $fsHelper = null, Platformsh\Cli\Helper\ShellHelperInterface $shellHelper = null, object $gitHelper = null )
addIgnoredFiles ( array $ignoredFiles )
canArchive ( )
getAppDir ( ) : string
getKey ( )
getWebRoot ( )
install ( )
prepare ( $buildDir, LocalApplication $app, CliConfig $config, array $settings = [] )
setBuildDir ( $buildDir )
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )

Protected Methods

Method Description
copyGitIgnore ( string $source ) Create a default .gitignore file for the app.
copyToBuildDir ( ) : string Copy, or symlink, files from the app root to the build directory.
getSharedDir ( ) : string | false Get the directory containing files shared between builds.
installDrupalSettingsLocal ( ) Create a settings.local.php for a Drupal site.
processSharedFileMounts ( ) Process shared file mounts in the application.
processSpecialDestinations ( ) Process the defined special destinations.

Private Methods

Method Description
cloneToBuildDir ( string $buildDir ) Clone the app to the build directory via Git.

Method Details

__construct() public method

public __construct ( object $fsHelper = null, Platformsh\Cli\Helper\ShellHelperInterface $shellHelper = null, object $gitHelper = null )
$fsHelper object
$shellHelper Platformsh\Cli\Helper\ShellHelperInterface
$gitHelper object

addIgnoredFiles() public method

public addIgnoredFiles ( array $ignoredFiles )
$ignoredFiles array

canArchive() public method

public canArchive ( )

copyGitIgnore() protected method

Create a default .gitignore file for the app.
protected copyGitIgnore ( string $source )
$source string The path to a default .gitignore file, relative to the 'resources' directory.

copyToBuildDir() protected method

Copy, or symlink, files from the app root to the build directory.
protected copyToBuildDir ( ) : string
return string The absolute path to the build directory where files have been copied.

getAppDir() public method

public getAppDir ( ) : string
return string

getKey() public method

public getKey ( )

getSharedDir() protected method

This will be 'shared' for a single-application project, or 'shared/' when there are multiple applications.
protected getSharedDir ( ) : string | false
return string | false

getWebRoot() public method

public getWebRoot ( )

install() public method

public install ( )

installDrupalSettingsLocal() protected method

This helps with database setup, etc.

prepare() public method

public prepare ( $buildDir, LocalApplication $app, CliConfig $config, array $settings = [] )
$app Platformsh\Cli\Local\LocalApplication
$config Platformsh\Cli\CliConfig
$settings array

processSharedFileMounts() protected method

For each "mount", this creates a corresponding directory in the project's shared files directory, and symlinks it into the appropriate path in the build.
protected processSharedFileMounts ( )

processSpecialDestinations() protected method

Process the defined special destinations.

setBuildDir() public method

public setBuildDir ( $buildDir )

setOutput() public method

public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

Property Details

$app protected_oe property

protected LocalApplication,Platformsh\Cli\Local $app
return Platformsh\Cli\Local\LocalApplication

$appRoot protected_oe property

protected string $appRoot
return string

$buildDir protected_oe property

protected string $buildDir
return string

$config protected_oe property

protected CliConfig,Platformsh\Cli $config
return Platformsh\Cli\CliConfig

$copy protected_oe property

protected bool $copy
return boolean

$fsHelper protected_oe property

protected FilesystemHelper,Platformsh\Cli\Helper $fsHelper
return Platformsh\Cli\Helper\FilesystemHelper

$gitHelper protected_oe property

protected GitHelper,Platformsh\Cli\Helper $gitHelper
return Platformsh\Cli\Helper\GitHelper

$ignoredFiles protected_oe property

Files from the app root to ignore during install.
protected string[] $ignoredFiles
return string[]

$output protected_oe property

protected OutputInterface,Symfony\Component\Console\Output $output
return Symfony\Component\Console\Output\OutputInterface

$settings protected_oe property

protected array $settings
return array

$shellHelper protected_oe property

protected ShellHelperInterface,Platformsh\Cli\Helper $shellHelper
return Platformsh\Cli\Helper\ShellHelperInterface

$specialDestinations protected_oe property

Special destinations for installation.
protected array $specialDestinations
return array