src/Profile/RedisProfile.php
public function defineCommand($commandID, $class)
    {
        $reflection = new \ReflectionClass($class);

        if (!$reflection->isSubclassOf('Predis\Command\CommandInterface')) {
            throw new \InvalidArgumentException("The class '$class' is not a valid command class.");
        }

        $this->commands[strtoupper($commandID)] = $class;
    }
public function defineCommand($commandID, $class)
    {
        $reflection = new \ReflectionClass($class);

        if (!$reflection->isSubclassOf('Predis\Command\CommandInterface')) {
            throw new \InvalidArgumentException("The class '$class' is not a valid command class.");
        }

        $this->commands[strtoupper($commandID)] = $class;
    }
public function defineCommand ( $ commandID , $ class ) { $ reflection = new \ ReflectionClass ( $ class ) ; if ( ! $ reflection -> isSubclassOf ( 'Predis\Command\CommandInterface' ) ) { throw new \ InvalidArgumentException ( "The class '$class' is not a valid command class." ) ; } $ this -> commands [ strtoupper ( $ commandID ) ] = $ class ; }
Defines a new command in the server profile.

@param string $commandID Command ID.
@param string $class     Fully-qualified name of a Predis\Command\CommandInterface.

@throws \InvalidArgumentException
Defines a new command in the server profile .