@@ 15-159 (lines=145) @@ | ||
12 | * ) |
|
13 | * @EmptyResource("Contents\EmptyDirectory") |
|
14 | */ |
|
15 | abstract class Directory extends AbstractResource implements DirectoryInterface |
|
16 | { |
|
17 | /** |
|
18 | * @var string |
|
19 | */ |
|
20 | protected $type; |
|
21 | ||
22 | /** |
|
23 | * @var string |
|
24 | */ |
|
25 | protected $encoding; |
|
26 | ||
27 | /** |
|
28 | * @var int |
|
29 | */ |
|
30 | protected $size; |
|
31 | ||
32 | /** |
|
33 | * @var string |
|
34 | */ |
|
35 | protected $name; |
|
36 | ||
37 | /** |
|
38 | * @var string |
|
39 | */ |
|
40 | protected $path; |
|
41 | ||
42 | /** |
|
43 | * @var string |
|
44 | */ |
|
45 | protected $sha; |
|
46 | ||
47 | /** |
|
48 | * @var string |
|
49 | */ |
|
50 | protected $url; |
|
51 | ||
52 | /** |
|
53 | * @var string |
|
54 | */ |
|
55 | protected $git_url; |
|
56 | ||
57 | /** |
|
58 | * @var string |
|
59 | */ |
|
60 | protected $html_url; |
|
61 | ||
62 | /** |
|
63 | * @var string |
|
64 | */ |
|
65 | protected $download_url; |
|
66 | ||
67 | /** |
|
68 | * @var Contents\Links |
|
69 | */ |
|
70 | protected $_links; |
|
71 | ||
72 | /** |
|
73 | * @return string |
|
74 | */ |
|
75 | public function type() : string |
|
76 | { |
|
77 | return $this->type; |
|
78 | } |
|
79 | ||
80 | /** |
|
81 | * @return string |
|
82 | */ |
|
83 | public function encoding() : string |
|
84 | { |
|
85 | return $this->encoding; |
|
86 | } |
|
87 | ||
88 | /** |
|
89 | * @return int |
|
90 | */ |
|
91 | public function size() : int |
|
92 | { |
|
93 | return $this->size; |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * @return string |
|
98 | */ |
|
99 | public function name() : string |
|
100 | { |
|
101 | return $this->name; |
|
102 | } |
|
103 | ||
104 | /** |
|
105 | * @return string |
|
106 | */ |
|
107 | public function path() : string |
|
108 | { |
|
109 | return $this->path; |
|
110 | } |
|
111 | ||
112 | /** |
|
113 | * @return string |
|
114 | */ |
|
115 | public function sha() : string |
|
116 | { |
|
117 | return $this->sha; |
|
118 | } |
|
119 | ||
120 | /** |
|
121 | * @return string |
|
122 | */ |
|
123 | public function url() : string |
|
124 | { |
|
125 | return $this->url; |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * @return string |
|
130 | */ |
|
131 | public function gitUrl() : string |
|
132 | { |
|
133 | return $this->git_url; |
|
134 | } |
|
135 | ||
136 | /** |
|
137 | * @return string |
|
138 | */ |
|
139 | public function htmlUrl() : string |
|
140 | { |
|
141 | return $this->html_url; |
|
142 | } |
|
143 | ||
144 | /** |
|
145 | * @return string |
|
146 | */ |
|
147 | public function downloadUrl() : string |
|
148 | { |
|
149 | return $this->download_url; |
|
150 | } |
|
151 | ||
152 | /** |
|
153 | * @return Contents\Links |
|
154 | */ |
|
155 | public function links() : Contents\Links |
|
156 | { |
|
157 | return $this->_links; |
|
158 | } |
|
159 | } |
|
160 |
@@ 15-172 (lines=158) @@ | ||
12 | * ) |
|
13 | * @EmptyResource("Contents\EmptyFile") |
|
14 | */ |
|
15 | abstract class File extends AbstractResource implements FileInterface |
|
16 | { |
|
17 | /** |
|
18 | * @var string |
|
19 | */ |
|
20 | protected $type; |
|
21 | ||
22 | /** |
|
23 | * @var string |
|
24 | */ |
|
25 | protected $encoding; |
|
26 | ||
27 | /** |
|
28 | * @var int |
|
29 | */ |
|
30 | protected $size; |
|
31 | ||
32 | /** |
|
33 | * @var string |
|
34 | */ |
|
35 | protected $name; |
|
36 | ||
37 | /** |
|
38 | * @var string |
|
39 | */ |
|
40 | protected $path; |
|
41 | ||
42 | /** |
|
43 | * @var string |
|
44 | */ |
|
45 | protected $content; |
|
46 | ||
47 | /** |
|
48 | * @var string |
|
49 | */ |
|
50 | protected $sha; |
|
51 | ||
52 | /** |
|
53 | * @var string |
|
54 | */ |
|
55 | protected $url; |
|
56 | ||
57 | /** |
|
58 | * @var string |
|
59 | */ |
|
60 | protected $git_url; |
|
61 | ||
62 | /** |
|
63 | * @var string |
|
64 | */ |
|
65 | protected $html_url; |
|
66 | ||
67 | /** |
|
68 | * @var string |
|
69 | */ |
|
70 | protected $download_url; |
|
71 | ||
72 | /** |
|
73 | * @var Contents\Links |
|
74 | */ |
|
75 | protected $_links; |
|
76 | ||
77 | /** |
|
78 | * @return string |
|
79 | */ |
|
80 | public function type() : string |
|
81 | { |
|
82 | return $this->type; |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * @return string |
|
87 | */ |
|
88 | public function encoding() : string |
|
89 | { |
|
90 | return $this->encoding; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * @return int |
|
95 | */ |
|
96 | public function size() : int |
|
97 | { |
|
98 | return $this->size; |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * @return string |
|
103 | */ |
|
104 | public function name() : string |
|
105 | { |
|
106 | return $this->name; |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * @return string |
|
111 | */ |
|
112 | public function path() : string |
|
113 | { |
|
114 | return $this->path; |
|
115 | } |
|
116 | ||
117 | /** |
|
118 | * @return string |
|
119 | */ |
|
120 | public function content() : string |
|
121 | { |
|
122 | return $this->content; |
|
123 | } |
|
124 | ||
125 | /** |
|
126 | * @return string |
|
127 | */ |
|
128 | public function sha() : string |
|
129 | { |
|
130 | return $this->sha; |
|
131 | } |
|
132 | ||
133 | /** |
|
134 | * @return string |
|
135 | */ |
|
136 | public function url() : string |
|
137 | { |
|
138 | return $this->url; |
|
139 | } |
|
140 | ||
141 | /** |
|
142 | * @return string |
|
143 | */ |
|
144 | public function gitUrl() : string |
|
145 | { |
|
146 | return $this->git_url; |
|
147 | } |
|
148 | ||
149 | /** |
|
150 | * @return string |
|
151 | */ |
|
152 | public function htmlUrl() : string |
|
153 | { |
|
154 | return $this->html_url; |
|
155 | } |
|
156 | ||
157 | /** |
|
158 | * @return string |
|
159 | */ |
|
160 | public function downloadUrl() : string |
|
161 | { |
|
162 | return $this->download_url; |
|
163 | } |
|
164 | ||
165 | /** |
|
166 | * @return Contents\Links |
|
167 | */ |
|
168 | public function links() : Contents\Links |
|
169 | { |
|
170 | return $this->_links; |
|
171 | } |
|
172 | } |
|
173 |