ModelIdentifier.php 991 B

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