Predis\Command\CommandInterface::getSlot PHP Method

getSlot() public method

Returns the assigned slot of the command for clustering distribution.
public getSlot ( ) : integer | null
return integer | null
    public function getSlot();

Usage Example

コード例 #1
0
ファイル: predis.php プロジェクト: sohel4r/wordpress_4_1_1
 /**
  * {@inheritdoc}
  */
 public function getSlot(CommandInterface $command)
 {
     $slot = $command->getSlot();
     if (!isset($slot) && isset($this->commands[$cmdID = $command->getId()])) {
         $key = call_user_func($this->commands[$cmdID], $command);
         if (isset($key)) {
             $slot = $this->getSlotByKey($key);
             $command->setSlot($slot);
         }
     }
     return $slot;
 }