diff --git a/freebox/api/v3/Model.php b/freebox/api/v3/Model.php new file mode 100644 index 0000000..bd2fb24 --- /dev/null +++ b/freebox/api/v3/Model.php @@ -0,0 +1,22 @@ + $value){ + if( property_exists( static::class, $property)){ + $this->$property = $value; + } + } + } + +} \ No newline at end of file diff --git a/freebox/api/v3/config/DHCP.php b/freebox/api/v3/config/DHCP.php index 7cbcce5..461284b 100644 --- a/freebox/api/v3/config/DHCP.php +++ b/freebox/api/v3/config/DHCP.php @@ -1,5 +1,6 @@ getAuthService( self::API_DHCP_CONFIG); $rest->GET(); - return $rest->getCurlResponse(); + return new DhcpConfig( $rest->getCurlResponse()['result']); } /** diff --git a/freebox/api/v3/models/DhcpConfig.php b/freebox/api/v3/models/DhcpConfig.php new file mode 100644 index 0000000..fcffbdc --- /dev/null +++ b/freebox/api/v3/models/DhcpConfig.php @@ -0,0 +1,35 @@ +