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);
}