| 1 | <?php |
||
| 18 | class Device extends AbstractObject |
||
| 19 | { |
||
| 20 | /** Suppress list of logs sub-object */ |
||
| 21 | const SUPPRESS_LOGS = false; |
||
| 22 | |||
| 23 | const SUPPRESS_URLS = false; |
||
| 24 | |||
| 25 | /** Canonical field name for references to devices in the database */ |
||
| 26 | const ID = 'device_id'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Construct a device from a database record |
||
| 30 | * |
||
| 31 | * @param array $databaseRecord Associative array of fields |
||
| 32 | * @param Log[]|false $logs (Optional) List of logs sub-object (or `Device::SUPPRESS_LOGS`). Elements that are not |
||
| 33 | * instances of Log will be ignored. |
||
| 34 | * |
||
| 35 | * @throws ObjectException If `$databaseRecord` contains no fields |
||
| 36 | */ |
||
| 37 | 5 | public function __construct($databaseRecord, $logs = self::SUPPRESS_LOGS, $urls = self::SUPPRESS_URLS) |
|
| 53 | } |
||
| 54 |