File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace UKFast \SDK \eCloud \Entities ;
4
+
5
+ use UKFast \SDK \Entity ;
6
+
7
+ /**
8
+ * @property int $id
9
+ * @property string $name
10
+ * @property string $scope
11
+ */
12
+ class Tag extends Entity
13
+ {
14
+ protected $ dates = ['createdAt ' , 'updatedAt ' ];
15
+
16
+ public static $ entityMap = [
17
+ 'id ' => 'id ' ,
18
+ 'name ' => 'name ' ,
19
+ 'scope ' => 'scope '
20
+ ];
21
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace UKFast \SDK \eCloud ;
4
+
5
+ use UKFast \SDK \eCloud \Entities \Tag ;
6
+ use UKFast \SDK \Entities \ClientEntityInterface ;
7
+ use UKFast \SDK \Traits \PageItems ;
8
+
9
+ class TagClient extends Client implements ClientEntityInterface
10
+ {
11
+ use PageItems;
12
+
13
+ protected $ collectionPath = 'v2/tags ' ;
14
+
15
+ public function loadEntity ($ data )
16
+ {
17
+ return new Tag (
18
+ $ this ->apiToFriendly ($ data , $ this ->getEntityMap ())
19
+ );
20
+ }
21
+
22
+ public function getEntityMap ()
23
+ {
24
+ return Tag::$ entityMap ;
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments