```coffeescript
class Cable.SubscriberManager
  constructor: (@cable) ->
    @subscribers = {}

  add: (subscriber) ->
    {identifier} = subscriber
    @subscribers[identifier] = subscriber
    @notify(subscriber, "initialized")
    if @sendCommand("subscribe", identifier)
      @notify(subscriber, "connected")

  reload: ->
    for identifier, subscriber of @subscribers
      if @sendCommand("subscribe", identifier)
        @notify(subscriber, "connected")

  remove: (subscriber) ->
    {identifier} = subscriber
    @sendCommand("unsubscribe", identifier)
    delete @subscribers[identifier]

  notifyAll: (callbackName, args...) ->
    for identifier, subscriber of @subscribers
      @notify(subscriber, callbackName, args...)

  notify: (subscriber, callbackName, args...) ->
    if typeof subscriber is "string"
      subscriber = @subscribers[subscriber]

    if subscriber
      subscriber[callbackName]?(args...)

  sendCommand: (command, identifier) ->
    return true if identifier is Cable.PING_IDENTIFIER
    @cable.send({command, identifier})
```

Manage an array of subscribers since there may be more than one subscription to a channel
user
```coffeescript
class Cable.SubscriberManager
  constructor: (@cable) ->
    @subscribers = []

  add: (subscriber) ->
    @subscribers.push(subscriber)
    @notify(subscriber, "initialized")
    if @sendCommand(subscriber, "subscribe")
      @notify(subscriber, "connected")

  reload: ->
    for subscriber in @subscribers
      if @sendCommand(subscriber, "subscribe")
        @notify(subscriber, "connected")

  remove: (subscriber) ->
    @sendCommand(subscriber, "unsubscribe")
    @subscibers = (s for s in @subscribers when s isnt subscriber)

  notifyAll: (callbackName, args...) ->
    for subscriber in @subscribers
      @notify(subscriber, callbackName, args...)

  notify: (subscriber, callbackName, args...) ->
    if typeof subscriber is "string"
      subscribers = (s for s in @subscribers when s.identifier is subscriber)
    else
      subscribers = [subscriber]

    for subscriber in subscribers
      subscriber[callbackName]?(args...)

  sendCommand: (subscriber, command) ->
    {identifier} = subscriber
    return true if identifier is Cable.PING_IDENTIFIER
    @cable.send({command, identifier})
```
assistant