ConnectionEvent.php 613B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Illuminate\Database\Events;
  3. abstract class ConnectionEvent
  4. {
  5. /**
  6. * The name of the connection.
  7. *
  8. * @var string
  9. */
  10. public $connectionName;
  11. /**
  12. * The database connection instance.
  13. *
  14. * @var \Illuminate\Database\Connection
  15. */
  16. public $connection;
  17. /**
  18. * Create a new event instance.
  19. *
  20. * @param \Illuminate\Database\Connection $connection
  21. * @return void
  22. */
  23. public function __construct($connection)
  24. {
  25. $this->connection = $connection;
  26. $this->connectionName = $connection->getName();
  27. }
  28. }