CoreFiles by mySites.guru
MongoCaster.php38 lines, 1,025 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
a36138f621614aebe1714a486f2574b0
sha1
ef7c0ea0e945c6a799b8dcfb8bdcac8c93c0a082
sha256
94b14736ab92dd44f94c1e3cd07b0ce723ccded916de77162ab909cbb22c1d29
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\VarDumper\Caster;

use Symfony\Component\VarDumper\Cloner\Stub;

@trigger_error('The '.__NAMESPACE__.'\MongoCaster class is deprecated since Symfony 3.4 and will be removed in 4.0.', E_USER_DEPRECATED);

/**
 * Casts classes from the MongoDb extension to array representation.
 *
 * @author Nicolas Grekas <[email protected]>
 *
 * @deprecated since version 3.4, to be removed in 4.0.
 */
class MongoCaster
{
    public static function castCursor(\MongoCursorInterface $cursor, array $a, Stub $stub, $isNested)
    {
        if ($info = $cursor->info()) {
            foreach ($info as $k => $v) {
                $a[Caster::PREFIX_VIRTUAL.$k] = $v;
            }
        }
        $a[Caster::PREFIX_VIRTUAL.'dead'] = $cursor->dead();

        return $a;
    }
}

The same content is in 5 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha9. See them all, or every version of this file.