class TaskDriver extends AbstractDriver (View source)

Installer driver to process tasks

This class will parse every "tasks" extra field. It expects the field syntax to be like the following:

"extra": { "tasks": [ "mytask": { "description": "My first task!", "class": "\My\Namespace\MyTask" } ] }

Properties

protected Composer $composer from AbstractDriver
protected IOInterface $io from AbstractDriver
protected Configuration $configuration from AbstractDriver
protected InstallerParameters $parameters from AbstractDriver
protected InstallerPersistenceInterface $persistence from AbstractDriver
protected $base_task

Methods

__construct(Composer $composer, IOInterface $io, Configuration $configuration, InstallerParameters $parameters, InstallerPersistenceInterface $persistence)

Driver constructor, just to ensure all pieces are in the right place

Composer
getComposer()

No description

IOInterface
getIo()

No description

Configuration
getConfiguration()

No description

void
install(string $package_name, string $package_path, array $package_extra)

Install a package, processing all extra fields that it contains.

void
update(string $package_name, string $package_path, array $initial_extra, array $target_extra)

Update a package checking differences from it's initial and target extra fields.

void
uninstall(string $package_name, string $package_path, array $package_extra)

Uninstall package, removing all related extra fields.

installTasks($config, $package_name, array $package_extra)

No description

uninstallTasks($config, $package_name, array $package_extra)

No description

static 
buildTask($name, $raw_task, $package_name)

No description

static 
validate(array $extra)

No description

Details

__construct(Composer $composer, IOInterface $io, Configuration $configuration, InstallerParameters $parameters, InstallerPersistenceInterface $persistence)

Driver constructor, just to ensure all pieces are in the right place

Parameters

Composer $composer
IOInterface $io
Configuration $configuration
InstallerParameters $parameters
InstallerPersistenceInterface $persistence

Composer getComposer()

Return Value

Composer

IOInterface getIo()

Return Value

IOInterface

Configuration getConfiguration()

Return Value

Configuration

InstallerParameters getParameters()

Return Value

InstallerParameters

void install(string $package_name, string $package_path, array $package_extra)

Install a package, processing all extra fields that it contains.

Parameters

string $package_name
string $package_path
array $package_extra

Return Value

void

void update(string $package_name, string $package_path, array $initial_extra, array $target_extra)

Update a package checking differences from it's initial and target extra fields.

Parameters

string $package_name
string $package_path
array $initial_extra
array $target_extra

Return Value

void

void uninstall(string $package_name, string $package_path, array $package_extra)

Uninstall package, removing all related extra fields.

Parameters

string $package_name
string $package_path
array $package_extra

Return Value

void

protected installTasks($config, $package_name, array $package_extra)

Parameters

$config
$package_name
array $package_extra

protected uninstallTasks($config, $package_name, array $package_extra)

Parameters

$config
$package_name
array $package_extra

static protected buildTask($name, $raw_task, $package_name)

Parameters

$name
$raw_task
$package_name

static protected validate(array $extra)

Parameters

array $extra