-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadmeCommand.php
More file actions
38 lines (34 loc) · 954 Bytes
/
ReadmeCommand.php
File metadata and controls
38 lines (34 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace Webdevvie\Pakket;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Class ReadmeCommand
* @package Webdevvie\Pakket
*/
class ReadmeCommand extends Command
{
/**
* @return void
*/
protected function configure()
{
$this
->setName('readme')
->setDescription('displays the README.MD file');
}
/**
* @param InputInterface $input
* @param OutputInterface $output
* @return integer
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$content = file_get_contents(__DIR__ . '/README.md');
//todo replace md markup to console markup at some point
$output->writeln("<info>" . $content . "</info>");
return self::SUCCESS;
}
}