ShardChoser.php 537 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Doctrine\DBAL\Sharding\ShardChoser;
  3. use Doctrine\DBAL\Sharding\PoolingShardConnection;
  4. /**
  5. * Given a distribution value this shard-choser strategy will pick the shard to
  6. * connect to for retrieving rows with the distribution value.
  7. *
  8. * @deprecated
  9. */
  10. interface ShardChoser
  11. {
  12. /**
  13. * Picks a shard for the given distribution value.
  14. *
  15. * @param string|int $distributionValue
  16. *
  17. * @return string|int
  18. */
  19. public function pickShard($distributionValue, PoolingShardConnection $conn);
  20. }