|
| $input = null |
|
| $output = null |
|
| $composer = "" |
|
| $app = null |
|
| $client = null |
|
| $error = "" |
|
| $baseUrl = "" |
|
| $logger = null |
|
| $providersMap |
|
| $metaData = [] |
|
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::addProviders |
( |
array |
$config, |
|
|
array |
$providers |
|
) |
| |
|
protected |
Add providers to config
Add providers to provided config file, and the provided configuration key name.
- Parameters
-
array | $config | Configuration for provider including the file name and configuration key name |
array | $providers | List of providers to be added to configuration |
- Returns
- void
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::checkComposer |
( |
| ) |
|
|
protected |
Check Composer Command
Set the composer command. Returns bool(false) if no composer found.
- Returns
- bool
- Todo:
- : Install composer locally if not found
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::componentExists |
( |
string |
$component | ) |
|
|
protected |
Check Component Exists
Try to find the component on packagist.
- Parameters
-
string | $component | Component name to check for existance. |
- Returns
- bool
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::configComponent |
( |
string |
$name | ) |
|
|
protected |
Configure installed component
Add providers, hooks, configuration files, and install sub-components if user requests it.
- Parameters
-
string | $name | Component name |
- Returns
- bool
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::getComponent |
( |
array |
$component | ) |
|
|
protected |
Get component info
Obtain component info from configuration if it exists, and was not passed in as command line arguments.
- Parameters
-
array | $component | Component data |
- Returns
- array
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::init |
( |
Application |
$app, |
|
|
\GuzzleHttp\Client |
$client |
|
) |
| |
Init Command
Store the GuzzleHTTP Client object to the class property.
- Parameters
-
\SlaxWeb\Bootstrap\Application | $app | Framework instance |
\GuzzleHttp\Client | $client | Guzzle Client |
- Returns
- void
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::installComposer |
( |
| ) |
|
|
protected |
Install composer
Download and install composer and set the $composer property to the newly installed composer executable. Returns a bool status.
- Returns
- bool
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::isInstalled |
( |
string |
$component | ) |
|
|
protected |
Check component installed
Check if component directory exists. If it does not, consider it removed.
- Parameters
-
string | $component | Name of the component |
- Returns
- bool
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::parseMetaData |
( |
string |
$name | ) |
|
|
protected |
Parse component meta data
Load the meta data of the component and parse it. If the meta data file is not found, an error is set, and bool(false) is returned.
- Parameters
-
string | $name | Name of the component |
- Returns
- bool
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::remove |
( |
string |
$name | ) |
|
|
protected |
Remove component
Removes the component, its config files, and set providers with the help of composer.
- Parameters
-
string | $name | Name of the component |
- Returns
- bool
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::removeProviders |
( |
array |
$config, |
|
|
array |
$providers |
|
) |
| |
|
protected |
Remove providers from config
Remove providers from the provided config file, and the provided configuration key name.
- Parameters
-
array | $config | Configuration for provider including the file name and configuration key name |
array | $providers | List of providers to be added to configuration |
- Returns
- void
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::$providersMap |
|
protected |
Initial value:= [
"app" => [
"file" => "provider.php"
SlaxWeb\Bootstrap\Commands\Component\BaseCommand::key |
Initial value:=> "providerList"
],
"commands" => [
"file" => "provider.php",
"key" => "commandsList"
],
"hooks" => [
"file" => "provider.php",
"key" => "hooksList"
]
]
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/bootstrap/src/Commands/Component/BaseCommand.php