MultiTenantShardChoser.php 454 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
<?php

namespace Doctrine\DBAL\Sharding\ShardChoser;

use Doctrine\DBAL\Sharding\PoolingShardConnection;

/**
 * The MultiTenant Shard choser assumes that the distribution value directly
 * maps to the shard id.
10 11
 *
 * @deprecated
12 13 14
 */
class MultiTenantShardChoser implements ShardChoser
{
Benjamin Morel's avatar
Benjamin Morel committed
15 16 17
    /**
     * {@inheritdoc}
     */
18 19 20 21 22
    public function pickShard($distributionValue, PoolingShardConnection $conn)
    {
        return $distributionValue;
    }
}