Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Contracts\Database; |
| 4 | |
| 5 | class 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 | } |