Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\VarDumper\Caster; Chris@0: Chris@0: use Symfony\Component\VarDumper\Cloner\Stub; Chris@0: Chris@12: @trigger_error('The '.__NAMESPACE__.'\MongoCaster class is deprecated since Symfony 3.4 and will be removed in 4.0.', E_USER_DEPRECATED); Chris@12: Chris@0: /** Chris@0: * Casts classes from the MongoDb extension to array representation. Chris@0: * Chris@0: * @author Nicolas Grekas Chris@12: * Chris@12: * @deprecated since version 3.4, to be removed in 4.0. Chris@0: */ Chris@0: class MongoCaster Chris@0: { Chris@0: public static function castCursor(\MongoCursorInterface $cursor, array $a, Stub $stub, $isNested) Chris@0: { Chris@0: if ($info = $cursor->info()) { Chris@0: foreach ($info as $k => $v) { Chris@0: $a[Caster::PREFIX_VIRTUAL.$k] = $v; Chris@0: } Chris@0: } Chris@0: $a[Caster::PREFIX_VIRTUAL.'dead'] = $cursor->dead(); Chris@0: Chris@0: return $a; Chris@0: } Chris@0: }