/** * Creates a new LockHandler depending on the given arguments. * * @param string $host * @param string $port * @param string $scheme * @param string $type * @param mixed $lockable * * @return mixed */ public static function create() { $factory = new self(); $params = $factory->resolveArguments(func_get_args()); $client = new Client(array('host' => $params['host'], 'port' => $params['port'], 'scheme' => $params['scheme'])); $handler = new $params['type']($client); return $handler; }