__call() public method

public __call ( $commandID, $arguments )
Example #1
0
 /**
  * @inheritdoc
  */
 public function wait($numberOfSlaves, $timeout)
 {
     return parent::__call(__FUNCTION__, func_get_args());
 }
Example #2
0
 /**
  * Deletes all items in the pool.
  *
  * @return PoolInterface
  */
 public function clear()
 {
     $this->init();
     $this->client->__call('flushdb', []);
     return $this;
 }
Example #3
0
 /**
  * Magic method for all calls to convert KeyDefinitions to strings and pass through to \Predis\Client
  *
  * @access public
  * @param string $method
  * @param array $arguments
  * @return mixed
  */
 public function __call($method, $arguments = array())
 {
     // If the first argument is a AbstractKeyDefinition instead of a string, cast to a string
     if (isset($arguments[0]) && $arguments[0] instanceof AbstractKeyDefinition) {
         $arguments[0] = (string) $arguments[0];
     }
     // Pass the call through to the Predis client
     return parent::__call($method, $arguments);
 }