| @@ 51-61 (lines=11) @@ | ||
| 48 | * |
|
| 49 | * @return self |
|
| 50 | */ |
|
| 51 | public static function create(array $data) |
|
| 52 | { |
|
| 53 | return new self( |
|
| 54 | isset($data['name']) ? $data['name'] : null, |
|
| 55 | isset($data['address']) ? $data['address'] : null, |
|
| 56 | isset($data['access_level']) ? $data['access_level'] : null, |
|
| 57 | isset($data['description']) ? $data['description'] : null, |
|
| 58 | isset($data['members_count']) ? $data['members_count'] : null, |
|
| 59 | isset($data['created_at']) ? new \DateTime($data['created_at']) : null |
|
| 60 | ); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * MailingList constructor. |
|
| @@ 54-64 (lines=11) @@ | ||
| 51 | * |
|
| 52 | * @return Route |
|
| 53 | */ |
|
| 54 | public static function create(array $data) |
|
| 55 | { |
|
| 56 | return new self( |
|
| 57 | isset($data['id']) ? $data['id'] : null, |
|
| 58 | isset($data['priority']) ? $data['priority'] : null, |
|
| 59 | isset($data['expression']) ? $data['expression'] : null, |
|
| 60 | isset($data['actions']) ? $data['actions'] : [], |
|
| 61 | isset($data['description']) ? $data['description'] : null, |
|
| 62 | isset($data['created_at']) ? new \DateTime($data['created_at']) : null |
|
| 63 | ); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Route Private Constructor. |
|