protected function getTablegateway(StreamName $streamName)
    {
        if (!isset($this->tableGateways[$streamName->toString()])) {
            $this->tableGateways[$streamName->toString()] = new TableGateway($this->getTable($streamName), $this->dbAdapter);
        }

        return $this->tableGateways[$streamName->toString()];
    }