Doctrine\Tests\OxmTestCase::_getMarshaller PHP Method

_getMarshaller() protected method

protected _getMarshaller ( $paths ) : Doctrine\OXM\Marshaller\Marshaller
$paths
return Doctrine\OXM\Marshaller\Marshaller
    protected function _getMarshaller($paths)
    {
        $config = new \Doctrine\OXM\Configuration();
        if (empty($paths)) {
            $paths = "tests/Doctrine/Tests/OXM/Entities";
        }
        if (!is_array($paths)) {
            $paths = array($paths);
        }
        $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver($paths));
        $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
        $metadataFactory = new \Doctrine\OXM\Mapping\ClassMetadataFactory($config);
        return new \Doctrine\OXM\Marshaller\XmlMarshaller($metadataFactory);
    }