blob: 9893d280ef692b2470a9f174dd9a93ca1e3a6364 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Illuminate\Contracts\Database;
4
5class ModelIdentifier
6{
7 /**
8 * The class name of the model.
9 *
10 * @var string
11 */
12 public $class;
13
14 /**
15 * The unique identifier of the model.
16 *
17 * This may be either a single ID or an array of IDs.
18 *
19 * @var mixed
20 */
21 public $id;
22
23 /**
24 * The relationships loaded on the model.
25 *
26 * @var array
27 */
28 public $relations;
29
30 /**
31 * The connection name of the model.
32 *
33 * @var string|null
34 */
35 public $connection;
36
37 /**
38 * Create a new model identifier.
39 *
40 * @param string $class
41 * @param mixed $id
42 * @param array $relations
43 * @param mixed $connection
44 * @return void
45 */
46 public function __construct($class, $id, array $relations, $connection)
47 {
48 $this->id = $id;
49 $this->class = $class;
50 $this->relations = $relations;
51 $this->connection = $connection;
52 }
53}