<commit_before><?php

namespace Doctrine\ODM\CouchDB;

use Doctrine\ODM\CouchDB\Mapping\ClassMetadataFactory;
use Doctrine\ODM\CouchDB\HTTP\Client;

class DocumentManager
{
    /**
     * @var Configuration
     */
    private $config;

    /**
     * @var Mapping\ClassMetadataFactory
     */
    private $metadataFactory;

    /**
     * @var UnitOfWork
     */
    private $unitOfWork = null;

    private $proxyFactory = null;

    /**
     * @var array
     */
    private $repositories = array();

    public function __construct(Client $httpClient = null, Configuration $config = null)
    {
        $this->config = $config ? $config : new Configuration();
        if ($httpClient) {
            $this->config->setHttpClient($httpClient);
        }
        $this->metadataFactory = new ClassMetadataFactory($this);
        $this->unitOfWork = new UnitOfWork($this);
        // TODO: Add configuration!
        $this->proxyFactory = new Proxy\ProxyFactory($this, $this->config->getProxyDir(), 'MyProxies', true);
    }

    /**
     * Creates a new Document that operates on the given Mongo connection
     * and uses the given Configuration.
     *
     * @param Doctrine\ODM\CouchDB\HTTP\Client
     * @param Doctrine\ODM\CouchDB\Configuration $config
     */
    public static function create(Client $httpClient = null, Configuration $config = null)
    {
        return new DocumentManager($httpClient, $config);
    }

    /**
     * @return ClassMetadataFactory
     */
    public function getMetadataFactory()
    {
        return $this->metadataFactory;
    }
<commit_msg>get the proxy namespace from the config<commit_after><?php

namespace Doctrine\ODM\CouchDB;

use Doctrine\ODM\CouchDB\Mapping\ClassMetadataFactory;
use Doctrine\ODM\CouchDB\HTTP\Client;

class DocumentManager
{
    /**
     * @var Configuration
     */
    private $config;

    /**
     * @var Mapping\ClassMetadataFactory
     */
    private $metadataFactory;

    /**
     * @var UnitOfWork
     */
    private $unitOfWork = null;

    private $proxyFactory = null;

    /**
     * @var array
     */
    private $repositories = array();

    public function __construct(Client $httpClient = null, Configuration $config = null)
    {
        $this->config = $config ? $config : new Configuration();
        if ($httpClient) {
            $this->config->setHttpClient($httpClient);
        }
        $this->metadataFactory = new ClassMetadataFactory($this);
        $this->unitOfWork = new UnitOfWork($this);
        $this->proxyFactory = new Proxy\ProxyFactory($this, $this->config->getProxyDir(), $this->config->getProxyNamespace(), true);
    }

    /**
     * Creates a new Document that operates on the given Mongo connection
     * and uses the given Configuration.
     *
     * @param Doctrine\ODM\CouchDB\HTTP\Client
     * @param Doctrine\ODM\CouchDB\Configuration $config
     */
    public static function create(Client $httpClient = null, Configuration $config = null)
    {
        return new DocumentManager($httpClient, $config);
    }

    /**
     * @return ClassMetadataFactory
     */
    public function getMetadataFactory()
    {
        return $this->metadataFactory;
    }

{'fraction_non_alphanumeric': 0.11899529042386185, 'fraction_numerical': 0.0, 'mean_word_length': 2.608154020385051, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3303607', 'n_tokens_mistral': 910, 'n_tokens_neox': 893, 'n_words': 207}