MultiTenantShardChoser.php 454 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Doctrine\DBAL\Sharding\ShardChoser;
  3. use Doctrine\DBAL\Sharding\PoolingShardConnection;
  4. /**
  5. * The MultiTenant Shard choser assumes that the distribution value directly
  6. * maps to the shard id.
  7. *
  8. * @deprecated
  9. */
  10. class MultiTenantShardChoser implements ShardChoser
  11. {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public function pickShard($distributionValue, PoolingShardConnection $conn)
  16. {
  17. return $distributionValue;
  18. }
  19. }