protected function createDocumentManager()
    {
        AnnotationDriver::registerAnnotationClasses();

        $configuration = new Configuration();
        $configuration->setProxyDir($this->configuration['doctrine']['proxyDir']);
        $configuration->setProxyNamespace($this->configuration['doctrine']['proxyNamespace']);
        $configuration->setHydratorDir($this->configuration['doctrine']['hydratorDir']);
        $configuration->setHydratorNamespace($this->configuration['doctrine']['hydratorNamespace']);
        $configuration->setMetadataDriverImpl(AnnotationDriver::create());

        return DocumentManager::create(new Connection($this->configuration['doctrine']['connection']['server']), $configuration);
    }