/** * Client constructor. * @param Config $config */ public function __construct(Config $config = null) { if (null === $config) { $config = Config::newDefaultConfig(); } else { $def = Config::newDefaultConfig(); if ('' === $config->getAddress()) { $config->setAddress($def->getAddress()); } if ('' === $config->getScheme()) { $config->setScheme($def->getScheme()); } } $this->KV = new KVClient($config); $this->Agent = new AgentClient($config); $this->Catalog = new CatalogClient($config); $this->Status = new StatusClient($config); $this->Event = new EventClient($config); $this->Health = new HealthClient($config); $this->Coordinate = new CoordinateClient($config); $this->Session = new SessionClient($config); $this->Operator = new OperatorClient($config); $this->ACL = new ACLClient($config); $this->PreparedQuery = new PreparedQueryClient($config); }