This repository has been archived by the owner on Apr 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommand.php
84 lines (73 loc) · 1.48 KB
/
Command.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\Transaction\Component;
use Ulrack\Transaction\Common\CommandInterface;
class Command implements CommandInterface
{
/** @var string */
private $command;
/** @var array */
private $parameters;
/** @var array */
private $options;
/** @var array */
private $flags;
/**
* Constructor
*
* @param string $command
* @param array $parameters
* @param array $options
* @param array $flags
*/
public function __construct(
string $command,
array $parameters = [],
array $options = [],
array $flags = []
) {
$this->command = $command;
$this->parameters = $parameters;
$this->options = $options;
$this->flags = $flags;
}
/**
* Returns the command.
*
* @return string
*/
public function getCommand(): string
{
return $this->command;
}
/**
* Returns the parameters.
*
* @return array
*/
public function getParameters(): array
{
return $this->parameters;
}
/**
* Returns the options.
*
* @return array
*/
public function getOptions(): array
{
return $this->options;
}
/**
* Returns the flags.
*
* @return array
*/
public function getFlags(): array
{
return $this->flags;
}
}