src/StreamCollection.php
protected function setResource($i, $data) {
    $this->resources[$i] = new static::$resourceClass($this->client, $this->parent, $data);
  }
protected function setResource($i, $data) {
    $this->resources[$i] = new static::$resourceClass($this->client, $this->parent, $data);
  }
protected function setResource ( $ i , $ data ) { $ this -> resources [ $ i ] = new static :: $ resourceClass ( $ this -> client , $ this -> parent , $ data ) ; }
Initialize and add a resource to the collection

@param integer $i
@param array $data
Initialize and add a resource to the collection