/** * add * * Add a new client or replace existing one. * * @access public * @param ClientInterface $client * @return ClientHolder $this */ public function add(ClientInterface $client) { $this->clients[$client->getClientType()][$client->getClientIdentifier()] = $client; return $this; }
/** * registerClient * * Initialize a connection client with context and register it in the * client holder. * * @access public * @param ClientInterface $client * @return Session $this */ public function registerClient(ClientInterface $client) { $client->initialize($this); $this->client_holder->add($client); $this->hasLogger() && $this->getLogger()->debug("Pomm: Registering new client", ['type' => $client->getClientType(), 'identifier' => $client->getClientIdentifier()]); return $this; }