|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Created by Graham Owens ([email protected]) |
|
5
|
|
|
* Company: PartFire Ltd (www.partfire.co.uk) |
|
6
|
|
|
* Console: Discovery |
|
7
|
|
|
* |
|
8
|
|
|
* User: gra |
|
9
|
|
|
* Date: 13/01/17 |
|
10
|
|
|
* Time: 16:23 |
|
11
|
|
|
* Project: fruitful-property-investments |
|
12
|
|
|
* File: HookListCommand.php |
|
13
|
|
|
* |
|
14
|
|
|
**/ |
|
15
|
|
|
|
|
16
|
|
|
|
|
17
|
|
|
namespace PartFire\MangoPayBundle\Command; |
|
18
|
|
|
|
|
19
|
|
|
use Fruitful\IdentityCheckBundle\Entity\IdentityCheck; |
|
20
|
|
|
use Fruitful\IdentityCheckBundle\Entity\Repository\IdentityCheckFactoryRepository; |
|
21
|
|
|
use Fruitful\IdentityCheckBundle\Event\IdentityCheckUpdateEvent; |
|
22
|
|
|
use PartFire\CommonBundle\Services\Output\Cli\ConsoleOutput; |
|
23
|
|
|
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
|
24
|
|
|
use Symfony\Component\Console\Input\InputArgument; |
|
25
|
|
|
use Symfony\Component\Console\Input\InputDefinition; |
|
26
|
|
|
use Symfony\Component\Console\Input\InputInterface; |
|
27
|
|
|
use Symfony\Component\Console\Input\InputOption; |
|
28
|
|
|
use Symfony\Component\Console\Output\OutputInterface; |
|
29
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcher; |
|
30
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
31
|
|
|
|
|
32
|
|
|
class HookListCommand extends ContainerAwareCommand |
|
33
|
|
|
{ |
|
34
|
|
|
|
|
35
|
|
|
private $output; |
|
36
|
|
|
|
|
37
|
|
|
protected function configure() |
|
38
|
|
|
{ |
|
39
|
|
|
$this |
|
40
|
|
|
->setName('partfire:mangopay:hook-list') |
|
41
|
|
|
->setDescription('Shows all hooks registered in Mango') |
|
42
|
|
|
; |
|
43
|
|
|
|
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
protected function execute(InputInterface $input, OutputInterface $output) |
|
47
|
|
|
{ |
|
48
|
|
|
$this->output = $this->getConsoleOutPutter(); |
|
49
|
|
|
$this->output->setOutputer($output); |
|
50
|
|
|
|
|
51
|
|
|
$this->output->info("Listing all hooks with MangoPay"); |
|
52
|
|
|
|
|
53
|
|
|
|
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
private function showTitle($title) |
|
57
|
|
|
{ |
|
58
|
|
|
$this->output->info(str_pad(" " . $title . " ", 80, "-", STR_PAD_BOTH)); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
private function getConsoleOutPutter() : ConsoleOutput |
|
62
|
|
|
{ |
|
63
|
|
|
return $this->getContainer()->get('partfire_common.output_console'); |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
} |