Skip to content

Commit 0423373

Browse files
authored
Merge pull request #455 from edjfletcher/main
added method to find license type easily from ImageData.php
2 parents ff048ee + 627dcc3 commit 0423373

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/eCloud/Entities/ImageData.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,21 @@
1010
*/
1111
class ImageData extends Entity
1212
{
13+
const
14+
KEY_LICENSE_TYPE = 'ukfast.license.type'
15+
;
16+
17+
/**
18+
* @return string
19+
*/
20+
public function getLicenseType()
21+
{
22+
foreach ($this->attributes as $imageData) {
23+
if ($imageData->key == self::KEY_LICENSE_TYPE) {
24+
return $imageData->value;
25+
}
26+
}
27+
28+
return '';
29+
}
1330
}

0 commit comments

Comments
 (0)