File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -52,4 +52,9 @@ public function deployments()
5252 {
5353 return (new DeploymentClient ($ this ->httpClient ))->auth ($ this ->token );
5454 }
55+
56+ public function errorPages ()
57+ {
58+ return (new ErrorPageClient ($ this ->httpClient ))->auth ($ this ->token );
59+ }
5560}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace UKFast \SDK \Loadbalancers \Entities ;
4+
5+ use UKFast \SDK \Entity ;
6+
7+ /**
8+ * @property int $id
9+ * @property int $targetGroupId
10+ * @property string $statusCodes
11+ * @property string $content
12+ * @property \DateTime $createdAt
13+ * @property \DateTime $updatedAt
14+ */
15+ class ErrorPage extends Entity
16+ {
17+ protected $ dates = ['createdAt ' , 'updatedAt ' ];
18+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace UKFast \SDK \Loadbalancers ;
4+
5+ use UKFast \SDK \Entities \ClientEntityInterface ;
6+ use UKFast \SDK \Loadbalancers \Entities \ErrorPage ;
7+ use UKFast \SDK \Traits \PageItems ;
8+
9+ class ErrorPageClient extends Client implements ClientEntityInterface
10+ {
11+ use PageItems;
12+
13+ protected $ collectionPath = 'v2/error-pages ' ;
14+
15+ public function getEntityMap ()
16+ {
17+ return [
18+ 'id ' => 'id ' ,
19+ 'target_group_id ' => 'targetGroupId ' ,
20+ 'status_codes ' => 'statusCodes ' ,
21+ 'content ' => 'content ' ,
22+ 'created_at ' => 'createdAt ' ,
23+ 'updated_at ' => 'updatedAt ' ,
24+ ];
25+ }
26+
27+ public function loadEntity ($ data )
28+ {
29+ return new ErrorPage (
30+ $ this ->apiToFriendly ($ data , $ this ->getEntityMap ())
31+ );
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments