vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Configuration.php line 732

Open in your IDE?
  1. <?php
  2. /*
  3.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  5.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  6.  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  7.  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  8.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  9.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  10.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  11.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  13.  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14.  *
  15.  * This software consists of voluntary contributions made by many individuals
  16.  * and is licensed under the MIT license. For more information, see
  17.  * <http://www.doctrine-project.org>.
  18.  */
  19. namespace Doctrine\ODM\MongoDB;
  20. use Doctrine\Common\Annotations\AnnotationReader;
  21. use Doctrine\Common\Cache\Cache;
  22. use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver;
  23. use Doctrine\Common\Persistence\ObjectRepository;
  24. use Doctrine\Common\Proxy\AbstractProxyFactory;
  25. use Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory;
  26. use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
  27. use Doctrine\ODM\MongoDB\PersistentCollection\DefaultPersistentCollectionFactory;
  28. use Doctrine\ODM\MongoDB\PersistentCollection\DefaultPersistentCollectionGenerator;
  29. use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionFactory;
  30. use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionGenerator;
  31. use Doctrine\ODM\MongoDB\Repository\DefaultRepositoryFactory;
  32. use Doctrine\ODM\MongoDB\Repository\DocumentRepository as NewDocumentRepository;
  33. use Doctrine\ODM\MongoDB\Repository\RepositoryFactory;
  34. /**
  35.  * Configuration class for the DocumentManager. When setting up your DocumentManager
  36.  * you can optionally specify an instance of this class as the second argument.
  37.  * If you do not pass a configuration object, a blank one will be created for you.
  38.  *
  39.  *     <?php
  40.  *
  41.  *     $config = new Configuration();
  42.  *     $dm = DocumentManager::create(new Connection(), $config);
  43.  *
  44.  * @since       1.0
  45.  */
  46. class Configuration extends \Doctrine\MongoDB\Configuration
  47. {
  48.     /**
  49.      * Never autogenerate a proxy/hydrator/persistent collection and rely that
  50.      * it was generated by some process before deployment. Copied from
  51.      * \Doctrine\Common\Proxy\AbstractProxyFactory.
  52.      *
  53.      * @var integer
  54.      */
  55.     const AUTOGENERATE_NEVER 0;
  56.     /**
  57.      * Always generates a new proxy/hydrator/persistent collection in every request.
  58.      *
  59.      * This is only sane during development.
  60.      * Copied from \Doctrine\Common\Proxy\AbstractProxyFactory.
  61.      *
  62.      * @var integer
  63.      */
  64.     const AUTOGENERATE_ALWAYS 1;
  65.     /**
  66.      * Autogenerate the proxy/hydrator/persistent collection class when the file does not exist.
  67.      *
  68.      * This strategy causes a file exists call whenever any proxy/hydrator is used the
  69.      * first time in a request. Copied from \Doctrine\Common\Proxy\AbstractProxyFactory.
  70.      *
  71.      * @var integer
  72.      */
  73.     const AUTOGENERATE_FILE_NOT_EXISTS 2;
  74.     /**
  75.      * Generate the proxy/hydrator/persistent collection classes using eval().
  76.      *
  77.      * This strategy is only sane for development.
  78.      * Copied from \Doctrine\Common\Proxy\AbstractProxyFactory.
  79.      *
  80.      * @var integer
  81.      */
  82.     const AUTOGENERATE_EVAL 3;
  83.     /**
  84.      * Array of attributes for this configuration instance.
  85.      *
  86.      * @var array
  87.      * @deprecated This property will be private in MongoDB ODM 2.0.
  88.      */
  89.     protected $attributes = [
  90.         'mongoCmd' => '$',
  91.         'retryConnect' => 0,
  92.         'retryQuery' => 0,
  93.     ];
  94.     /**
  95.      * Adds a namespace under a certain alias.
  96.      *
  97.      * @param string $alias
  98.      * @param string $namespace
  99.      */
  100.     public function addDocumentNamespace($alias$namespace)
  101.     {
  102.         $this->attributes['documentNamespaces'][$alias] = $namespace;
  103.     }
  104.     /**
  105.      * Resolves a registered namespace alias to the full namespace.
  106.      *
  107.      * @param string $documentNamespaceAlias
  108.      * @return string
  109.      * @throws MongoDBException
  110.      */
  111.     public function getDocumentNamespace($documentNamespaceAlias)
  112.     {
  113.         if ( ! isset($this->attributes['documentNamespaces'][$documentNamespaceAlias])) {
  114.             throw MongoDBException::unknownDocumentNamespace($documentNamespaceAlias);
  115.         }
  116.         return trim($this->attributes['documentNamespaces'][$documentNamespaceAlias], '\\');
  117.     }
  118.     /**
  119.      * Retrieves the list of registered document namespace aliases.
  120.      *
  121.      * @return array
  122.      */
  123.     public function getDocumentNamespaces()
  124.     {
  125.         return $this->attributes['documentNamespaces'];
  126.     }
  127.     /**
  128.      * Set the document alias map
  129.      *
  130.      * @param array $documentNamespaces
  131.      * @return void
  132.      */
  133.     public function setDocumentNamespaces(array $documentNamespaces)
  134.     {
  135.         $this->attributes['documentNamespaces'] = $documentNamespaces;
  136.     }
  137.     /**
  138.      * Sets the cache driver implementation that is used for metadata caching.
  139.      *
  140.      * @param MappingDriver $driverImpl
  141.      * @todo Force parameter to be a Closure to ensure lazy evaluation
  142.      *       (as soon as a metadata cache is in effect, the driver never needs to initialize).
  143.      */
  144.     public function setMetadataDriverImpl(MappingDriver $driverImpl)
  145.     {
  146.         $this->attributes['metadataDriverImpl'] = $driverImpl;
  147.     }
  148.     /**
  149.      * Add a new default annotation driver with a correctly configured annotation reader.
  150.      *
  151.      * @param array $paths
  152.      * @return Mapping\Driver\AnnotationDriver
  153.      */
  154.     public function newDefaultAnnotationDriver($paths = array())
  155.     {
  156.         $reader = new AnnotationReader();
  157.         return new AnnotationDriver($reader, (array)$paths);
  158.     }
  159.     /**
  160.      * Gets the cache driver implementation that is used for the mapping metadata.
  161.      *
  162.      * @return MappingDriver
  163.      */
  164.     public function getMetadataDriverImpl()
  165.     {
  166.         return isset($this->attributes['metadataDriverImpl']) ?
  167.             $this->attributes['metadataDriverImpl'] : null;
  168.     }
  169.     /**
  170.      * Gets the cache driver implementation that is used for metadata caching.
  171.      *
  172.      * @return \Doctrine\Common\Cache\Cache
  173.      */
  174.     public function getMetadataCacheImpl()
  175.     {
  176.         return isset($this->attributes['metadataCacheImpl']) ?
  177.             $this->attributes['metadataCacheImpl'] : null;
  178.     }
  179.     /**
  180.      * Sets the cache driver implementation that is used for metadata caching.
  181.      *
  182.      * @param \Doctrine\Common\Cache\Cache $cacheImpl
  183.      */
  184.     public function setMetadataCacheImpl(Cache $cacheImpl)
  185.     {
  186.         $this->attributes['metadataCacheImpl'] = $cacheImpl;
  187.     }
  188.     /**
  189.      * Sets the directory where Doctrine generates any necessary proxy class files.
  190.      *
  191.      * @param string $dir
  192.      */
  193.     public function setProxyDir($dir)
  194.     {
  195.         $this->attributes['proxyDir'] = $dir;
  196.     }
  197.     /**
  198.      * Gets the directory where Doctrine generates any necessary proxy class files.
  199.      *
  200.      * @return string
  201.      */
  202.     public function getProxyDir()
  203.     {
  204.         return isset($this->attributes['proxyDir']) ?
  205.             $this->attributes['proxyDir'] : null;
  206.     }
  207.     /**
  208.      * Gets a boolean flag that indicates whether proxy classes should always be regenerated
  209.      * during each script execution.
  210.      *
  211.      * @return boolean|integer
  212.      */
  213.     public function getAutoGenerateProxyClasses()
  214.     {
  215.         return isset($this->attributes['autoGenerateProxyClasses']) ?
  216.             $this->attributes['autoGenerateProxyClasses'] : true;
  217.     }
  218.     /**
  219.      * Sets a boolean flag that indicates whether proxy classes should always be regenerated
  220.      * during each script execution.
  221.      *
  222.      * @param boolean|int $autoGenerateProxyClasses Possible values are constants of Doctrine\Common\Proxy\AbstractProxyFactory
  223.      */
  224.     public function setAutoGenerateProxyClasses($autoGenerateProxyClasses)
  225.     {
  226.         if (is_bool($autoGenerateProxyClasses)) {
  227.             @trigger_error(
  228.                 sprintf('Passing boolean value to "%s" is deprecated, please use constants of "%s" instead.'__METHOD__AbstractProxyFactory::class),
  229.                 E_USER_DEPRECATED
  230.             );
  231.         }
  232.         if ($autoGenerateProxyClasses === AbstractProxyFactory::AUTOGENERATE_ALWAYS || $autoGenerateProxyClasses === AbstractProxyFactory::AUTOGENERATE_NEVER) {
  233.             @trigger_error(
  234.                 sprintf('The "AUTOGENERATE_ALWAYS" and "AUTOGENERATE_NEVER" strategies for proxy generation are deprecated and will be dropped in doctrine/mongodb-odm 2.0. Please use "AUTOGENERATE_FILE_NOT_EXISTS" and "AUTOGENERATE_EVAL".'),
  235.                 E_USER_DEPRECATED
  236.             );
  237.         }
  238.         $this->attributes['autoGenerateProxyClasses'] = $autoGenerateProxyClasses;
  239.     }
  240.     /**
  241.      * Gets the namespace where proxy classes reside.
  242.      *
  243.      * @return string
  244.      */
  245.     public function getProxyNamespace()
  246.     {
  247.         return isset($this->attributes['proxyNamespace']) ?
  248.             $this->attributes['proxyNamespace'] : null;
  249.     }
  250.     /**
  251.      * Sets the namespace where proxy classes reside.
  252.      *
  253.      * @param string $ns
  254.      */
  255.     public function setProxyNamespace($ns)
  256.     {
  257.         $this->attributes['proxyNamespace'] = $ns;
  258.     }
  259.     /**
  260.      * Sets the directory where Doctrine generates hydrator class files.
  261.      *
  262.      * @param string $dir
  263.      */
  264.     public function setHydratorDir($dir)
  265.     {
  266.         $this->attributes['hydratorDir'] = $dir;
  267.     }
  268.     /**
  269.      * Gets the directory where Doctrine generates hydrator class files.
  270.      *
  271.      * @return string
  272.      */
  273.     public function getHydratorDir()
  274.     {
  275.         return isset($this->attributes['hydratorDir']) ?
  276.             $this->attributes['hydratorDir'] : null;
  277.     }
  278.     /**
  279.      * Gets a boolean flag that indicates whether hydrator classes should always be regenerated
  280.      * during each script execution.
  281.      *
  282.      * @return boolean|integer Possible values are defined constants
  283.      */
  284.     public function getAutoGenerateHydratorClasses()
  285.     {
  286.         return isset($this->attributes['autoGenerateHydratorClasses']) ?
  287.             $this->attributes['autoGenerateHydratorClasses'] : true;
  288.     }
  289.     /**
  290.      * Sets a boolean flag that indicates whether hydrator classes should always be regenerated
  291.      * during each script execution.
  292.      *
  293.      * @param boolean|integer $bool
  294.      */
  295.     public function setAutoGenerateHydratorClasses($bool)
  296.     {
  297.         if (is_bool($bool)) {
  298.             @trigger_error(
  299.                 sprintf('Passing boolean value to "%s" is deprecated, please use "AUTOGENERATE_*" constants of "%s" instead.'__METHOD__self::class),
  300.                 E_USER_DEPRECATED
  301.             );
  302.         }
  303.         $this->attributes['autoGenerateHydratorClasses'] = $bool;
  304.     }
  305.     /**
  306.      * Gets the namespace where hydrator classes reside.
  307.      *
  308.      * @return string
  309.      */
  310.     public function getHydratorNamespace()
  311.     {
  312.         return isset($this->attributes['hydratorNamespace']) ?
  313.             $this->attributes['hydratorNamespace'] : null;
  314.     }
  315.     /**
  316.      * Sets the namespace where hydrator classes reside.
  317.      *
  318.      * @param string $ns
  319.      */
  320.     public function setHydratorNamespace($ns)
  321.     {
  322.         $this->attributes['hydratorNamespace'] = $ns;
  323.     }
  324.     /**
  325.      * Sets the directory where Doctrine generates persistent collection class files.
  326.      *
  327.      * @param string $dir
  328.      */
  329.     public function setPersistentCollectionDir($dir)
  330.     {
  331.         $this->attributes['persistentCollectionDir'] = $dir;
  332.     }
  333.     /**
  334.      * Gets the directory where Doctrine generates persistent collection class files.
  335.      *
  336.      * @return string
  337.      */
  338.     public function getPersistentCollectionDir()
  339.     {
  340.         return isset($this->attributes['persistentCollectionDir']) ?
  341.             $this->attributes['persistentCollectionDir'] : null;
  342.     }
  343.     /**
  344.      * Gets a integer flag that indicates how and when persistent collection
  345.      * classes should be generated.
  346.      *
  347.      * @return integer Possible values are defined constants
  348.      */
  349.     public function getAutoGeneratePersistentCollectionClasses()
  350.     {
  351.         return isset($this->attributes['autoGeneratePersistentCollectionClasses']) ?
  352.             $this->attributes['autoGeneratePersistentCollectionClasses'] : self::AUTOGENERATE_ALWAYS;
  353.     }
  354.     /**
  355.      * Sets a integer flag that indicates how and when persistent collection
  356.      * classes should be generated.
  357.      *
  358.      * @param integer $mode Possible values are defined constants
  359.      */
  360.     public function setAutoGeneratePersistentCollectionClasses($mode)
  361.     {
  362.         $this->attributes['autoGeneratePersistentCollectionClasses'] = $mode;
  363.     }
  364.     /**
  365.      * Gets the namespace where persistent collection classes reside.
  366.      *
  367.      * @return string
  368.      */
  369.     public function getPersistentCollectionNamespace()
  370.     {
  371.         return isset($this->attributes['persistentCollectionNamespace']) ?
  372.             $this->attributes['persistentCollectionNamespace'] : null;
  373.     }
  374.     /**
  375.      * Sets the namespace where persistent collection classes reside.
  376.      *
  377.      * @param string $ns
  378.      */
  379.     public function setPersistentCollectionNamespace($ns)
  380.     {
  381.         $this->attributes['persistentCollectionNamespace'] = $ns;
  382.     }
  383.     /**
  384.      * Sets the default DB to use for all Documents that do not specify
  385.      * a database.
  386.      *
  387.      * @param string $defaultDB
  388.      */
  389.     public function setDefaultDB($defaultDB)
  390.     {
  391.         $this->attributes['defaultDB'] = $defaultDB;
  392.     }
  393.     /**
  394.      * Gets the default DB to use for all Documents that do not specify a database.
  395.      *
  396.      * @return string $defaultDB
  397.      */
  398.     public function getDefaultDB()
  399.     {
  400.         return isset($this->attributes['defaultDB']) ?
  401.             $this->attributes['defaultDB'] : null;
  402.     }
  403.     /**
  404.      * Set the class metadata factory class name.
  405.      *
  406.      * @param string $cmfName
  407.      */
  408.     public function setClassMetadataFactoryName($cmfName)
  409.     {
  410.         $this->attributes['classMetadataFactoryName'] = $cmfName;
  411.     }
  412.     /**
  413.      * Gets the class metadata factory class name.
  414.      *
  415.      * @return string
  416.      */
  417.     public function getClassMetadataFactoryName()
  418.     {
  419.         if ( ! isset($this->attributes['classMetadataFactoryName'])) {
  420.             $this->attributes['classMetadataFactoryName'] = ClassMetadataFactory::class;
  421.         }
  422.         return $this->attributes['classMetadataFactoryName'];
  423.     }
  424.     /**
  425.      * Gets array of default commit options.
  426.      *
  427.      * @return array
  428.      */
  429.     public function getDefaultCommitOptions()
  430.     {
  431.         if (isset($this->attributes['defaultCommitOptions'])) {
  432.             return $this->attributes['defaultCommitOptions'];
  433.         }
  434.         return array('w' => 1);
  435.     }
  436.     /**
  437.      * Sets array of default commit options.
  438.      *
  439.      * @param array $defaultCommitOptions
  440.      */
  441.     public function setDefaultCommitOptions($defaultCommitOptions)
  442.     {
  443.         $this->attributes['defaultCommitOptions'] = $defaultCommitOptions;
  444.     }
  445.     /**
  446.      * Add a filter to the list of possible filters.
  447.      *
  448.      * @param string $name       The name of the filter.
  449.      * @param string $className  The class name of the filter.
  450.      * @param array  $parameters The parameters for the filter.
  451.      */
  452.     public function addFilter($name$className, array $parameters = array())
  453.     {
  454.         $this->attributes['filters'][$name] = array(
  455.             'class' => $className,
  456.             'parameters' => $parameters
  457.         );
  458.     }
  459.     /**
  460.      * Gets the class name for a given filter name.
  461.      *
  462.      * @param string $name The name of the filter.
  463.      *
  464.      * @return string|null The filter class name, or null if it is undefined
  465.      */
  466.     public function getFilterClassName($name)
  467.     {
  468.         return isset($this->attributes['filters'][$name])
  469.             ? $this->attributes['filters'][$name]['class']
  470.             : null;
  471.     }
  472.     /**
  473.      * Gets the parameters for a given filter name.
  474.      *
  475.      * @param string $name The name of the filter.
  476.      *
  477.      * @return array|null The filter parameters, or null if it is undefined
  478.      */
  479.     public function getFilterParameters($name)
  480.     {
  481.         return isset($this->attributes['filters'][$name])
  482.             ? $this->attributes['filters'][$name]['parameters']
  483.             : null;
  484.     }
  485.     /**
  486.      * Sets default repository class.
  487.      *
  488.      * @param string $className
  489.      *
  490.      * @return void
  491.      *
  492.      * @throws MongoDBException If not is a ObjectRepository
  493.      *
  494.      * @deprecated in version 1.2 and will be removed in 2.0. Please use setDefaultDocumentRepositoryClassName instead.
  495.      */
  496.     public function setDefaultRepositoryClassName($className)
  497.     {
  498.         @trigger_error(
  499.             sprintf('"%s" was deprecated in doctrine/mongodb-odm 1.2 and will be removed in 2.0. Please use "%s::setDefaultDocumentRepositoryClassName" instead.'__METHOD____CLASS__),
  500.             E_USER_DEPRECATED
  501.         );
  502.         $this->setDefaultDocumentRepositoryClassName($className);
  503.     }
  504.     /**
  505.      * Get default repository class.
  506.      *
  507.      * @return string
  508.      *
  509.      * @deprecated in version 1.2 and will be removed in 2.0. Please use getDefaultDocumentRepositoryClassName instead.
  510.      */
  511.     public function getDefaultRepositoryClassName()
  512.     {
  513.         @trigger_error(
  514.             sprintf('"%s" was deprecated in doctrine/mongodb-odm 1.2 and will be removed in 2.0. Please use "%s::getDefaultDocumentRepositoryClassName" instead.'__METHOD____CLASS__),
  515.             E_USER_DEPRECATED
  516.         );
  517.         return $this->getDefaultDocumentRepositoryClassName();
  518.     }
  519.     /**
  520.      * @throws MongoDBException If not is a ObjectRepository.
  521.      */
  522.     public function setDefaultDocumentRepositoryClassName($className)
  523.     {
  524.         $reflectionClass = new \ReflectionClass($className);
  525.         if (! $reflectionClass->implementsInterface(ObjectRepository::class)) {
  526.             throw MongoDBException::invalidDocumentRepository($className);
  527.         }
  528.         $this->attributes['defaultDocumentRepositoryClassName'] = $className;
  529.     }
  530.     /**
  531.      * Get default repository class.
  532.      *
  533.      * @return string
  534.      */
  535.     public function getDefaultDocumentRepositoryClassName()
  536.     {
  537.         return isset($this->attributes['defaultDocumentRepositoryClassName'])
  538.             ? $this->attributes['defaultDocumentRepositoryClassName']
  539.             : NewDocumentRepository::class;
  540.     }
  541.     /**
  542.      * Set the document repository factory.
  543.      *
  544.      * @param RepositoryFactory $repositoryFactory
  545.      */
  546.     public function setRepositoryFactory(RepositoryFactory $repositoryFactory)
  547.     {
  548.         $this->attributes['repositoryFactory'] = $repositoryFactory;
  549.     }
  550.     /**
  551.      * Get the document repository factory.
  552.      *
  553.      * @return RepositoryFactory
  554.      */
  555.     public function getRepositoryFactory()
  556.     {
  557.         return isset($this->attributes['repositoryFactory'])
  558.             ? $this->attributes['repositoryFactory']
  559.             : new DefaultRepositoryFactory();
  560.     }
  561.     /**
  562.      * Set the persistent collection factory.
  563.      *
  564.      * @param PersistentCollectionFactory $persistentCollectionFactory
  565.      */
  566.     public function setPersistentCollectionFactory(PersistentCollectionFactory $persistentCollectionFactory)
  567.     {
  568.         $this->attributes['persistentCollectionFactory'] = $persistentCollectionFactory;
  569.     }
  570.     /**
  571.      * Get the persistent collection factory.
  572.      *
  573.      * @return DefaultPersistentCollectionFactory
  574.      */
  575.     public function getPersistentCollectionFactory()
  576.     {
  577.         if ( ! isset($this->attributes['persistentCollectionFactory'])) {
  578.             $this->attributes['persistentCollectionFactory'] = new DefaultPersistentCollectionFactory();
  579.         }
  580.         return $this->attributes['persistentCollectionFactory'];
  581.     }
  582.     /**
  583.      * Set the persistent collection generator.
  584.      *
  585.      * @param PersistentCollectionGenerator $persistentCollectionGenerator
  586.      */
  587.     public function setPersistentCollectionGenerator(PersistentCollectionGenerator $persistentCollectionGenerator)
  588.     {
  589.         $this->attributes['persistentCollectionGenerator'] = $persistentCollectionGenerator;
  590.     }
  591.     /**
  592.      * Get the persistent collection generator.
  593.      *
  594.      * @return DefaultPersistentCollectionGenerator
  595.      */
  596.     public function getPersistentCollectionGenerator()
  597.     {
  598.         if ( ! isset($this->attributes['persistentCollectionGenerator'])) {
  599.             $this->attributes['persistentCollectionGenerator'] = new DefaultPersistentCollectionGenerator(
  600.                 $this->getPersistentCollectionDir(),
  601.                 $this->getPersistentCollectionNamespace()
  602.             );
  603.         }
  604.         return $this->attributes['persistentCollectionGenerator'];
  605.     }
  606.     /**
  607.      * {@inheritdoc}
  608.      *
  609.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  610.      */
  611.     public function getLoggerCallable()
  612.     {
  613.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  614.         return parent::getLoggerCallable();
  615.     }
  616.     /**
  617.      * {@inheritdoc}
  618.      *
  619.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  620.      */
  621.     public function setLoggerCallable($loggerCallable)
  622.     {
  623.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  624.         parent::setLoggerCallable($loggerCallable);
  625.     }
  626.     /**
  627.      * {@inheritdoc}
  628.      *
  629.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  630.      */
  631.     public function getMongoCmd()
  632.     {
  633.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  634.         return parent::getMongoCmd();
  635.     }
  636.     /**
  637.      * {@inheritdoc}
  638.      *
  639.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  640.      */
  641.     public function setMongoCmd($cmd)
  642.     {
  643.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  644.         parent::setMongoCmd($cmd);
  645.     }
  646.     /**
  647.      * {@inheritdoc}
  648.      *
  649.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  650.      */
  651.     public function getRetryConnect()
  652.     {
  653.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  654.         return parent::getRetryConnect();
  655.     }
  656.     /**
  657.      * {@inheritdoc}
  658.      *
  659.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  660.      */
  661.     public function setRetryConnect($retryConnect)
  662.     {
  663.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  664.         parent::setRetryConnect($retryConnect);
  665.     }
  666.     /**
  667.      * {@inheritdoc}
  668.      *
  669.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  670.      */
  671.     public function getRetryQuery()
  672.     {
  673.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  674.         return parent::getRetryQuery();
  675.     }
  676.     /**
  677.      * {@inheritdoc}
  678.      *
  679.      * @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
  680.      */
  681.     public function setRetryQuery($retryQuery)
  682.     {
  683.         @trigger_error(sprintf('The "%s" method is deprecated and will be removed in doctrine/mongodb-odm 2.0.'__METHOD__), E_USER_DEPRECATED);
  684.         parent::setRetryQuery($retryQuery);
  685.     }
  686. }