Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
878db8ca
Unverified
Commit
878db8ca
authored
Jul 01, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creating a command to download modules
parent
a8f1796d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
DownloadModuleCommand.php
Modules/Core/Console/DownloadModuleCommand.php
+59
-0
No files found.
Modules/Core/Console/DownloadModuleCommand.php
0 → 100644
View file @
878db8ca
<?php
namespace
Modules\Core\Console
;
use
Illuminate\Console\Command
;
use
Modules\Core\Downloader\Downloader
;
use
Symfony\Component\Console\Input\InputOption
;
use
Symfony\Component\Console\Input\InputArgument
;
class
DownloadModuleCommand
extends
Command
{
/**
* The console command name.
*
* @var string
*/
protected
$name
=
'asgard:download:module'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Download the given module'
;
/**
* Execute the console command.
*
* @return mixed
*/
public
function
fire
()
{
$downloader
=
new
Downloader
(
$this
->
getOutput
());
$downloader
->
download
(
$this
->
argument
(
'name'
));
}
/**
* Get the console command arguments.
*
* @return array
*/
protected
function
getArguments
()
{
return
[
[
'name'
,
InputArgument
::
REQUIRED
,
'The vendor/name of the module'
],
];
}
/**
* Get the console command options.
*
* @return array
*/
protected
function
getOptions
()
{
return
[
// ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
];
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment