Completed
Push — master ( dae18f...dc2daf )
by José
01:20
created

Manifest::getArchitecture()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Josepostiga\DockerRegistry\Objects;
4
5
final class Manifest
6
{
7
    /**
8
     * Schema version.
9
     *
10
     * @var int
11
     */
12
    private $schema;
13
14
    /**
15
     * Image name.
16
     *
17
     * @var string
18
     */
19
    private $name;
20
21
    /**
22
     * Tag name.
23
     *
24
     * @var string
25
     */
26
    private $tag;
27
28
    /**
29
     * Architecture used.
30
     *
31
     * @var string
32
     */
33
    private $architecture;
34
35
    /**
36
     * Layers that make the tagged image.
37
     *
38
     * @var array
39
     */
40
    private $layers;
41
42
    /**
43
     * List of changes made.
44
     *
45
     * @var array
46
     */
47
    private $history;
48
49
    /**
50
     * List of signatures.
51
     *
52
     * @var array
53
     */
54
    private $signatures;
55
56
    /**
57
     * Manifest constructor.
58
     *
59
     * @param int $schema
60
     * @param string $name
61
     * @param string $tag
62
     * @param string $architecture
63
     * @param array $layers
64
     * @param array $history
65
     * @param array $signatures
66
     */
67
    public function __construct(int $schema, string $name, string $tag, string $architecture, array $layers, array $history, array $signatures)
68
    {
69
        $this->schema = $schema;
70
        $this->name = $name;
71
        $this->tag = $tag;
72
        $this->architecture = $architecture;
73
        $this->layers = $layers;
74
        $this->history = $history;
75
        $this->signatures = $signatures;
76
    }
77
78
    /**
79
     * Gets the schema.
80
     *
81
     * @return int
82
     */
83
    public function getSchema(): int
84
    {
85
        return $this->schema;
86
    }
87
88
    /**
89
     * Gets the image name.
90
     *
91
     * @return string
92
     */
93
    public function getName(): string
94
    {
95
        return $this->name;
96
    }
97
98
    /**
99
     * Gets the tag.
100
     *
101
     * @return string
102
     */
103
    public function getTag(): string
104
    {
105
        return $this->tag;
106
    }
107
108
    /**
109
     * Gets the architecture.
110
     *
111
     * @return string
112
     */
113
    public function getArchitecture(): string
114
    {
115
        return $this->architecture;
116
    }
117
118
    /**
119
     * Gets the layers.
120
     *
121
     * @return array
122
     */
123
    public function getLayers(): array
124
    {
125
        return $this->layers;
126
    }
127
128
    /**
129
     * Gets the history of changes.
130
     *
131
     * @return array
132
     */
133
    public function getHistory(): array
134
    {
135
        return $this->history;
136
    }
137
138
    /**
139
     * Gets the signatures.
140
     *
141
     * @return array
142
     */
143
    public function getSignatures(): array
144
    {
145
        return $this->signatures;
146
    }
147
}
148