-
-
Notifications
You must be signed in to change notification settings - Fork 207
Expand file tree
/
Copy pathProjectResource.php
More file actions
43 lines (34 loc) · 1.01 KB
/
ProjectResource.php
File metadata and controls
43 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
/*
* This file is part of the DigitalOcean API library.
*
* (c) Antoine Kirk <contact@sbin.dk>
* (c) Graham Campbell <hello@gjcampbell.co.uk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DigitalOceanV2\Entity;
/**
* @author Graham Campbell <hello@gjcampbell.co.uk>
* @author Mohammad Salamat <godfather@mofia.org>
*/
final class ProjectResource extends AbstractEntity
{
public string $urn;
public string $assignedAt;
public array $links;
public string $status;
public function build(array $parameters): void
{
foreach ($parameters as $property => $value) {
$property = static::convertToCamelCase($property);
if ('links' === $property) {
$this->links = get_object_vars($value);
} elseif (\property_exists($this, $property)) {
$this->$property = $value;
}
}
}
}