CoreFiles by mySites.guru
CutArrayStub.php30 lines, 702 bytes, from Joomla_6.3.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 6.2.0-alpha3
md5
421ffeea8c792ec6435ffb55ec44437a
sha1
b272e909240591b745f68272f124b8b7bbb88b10
sha256
7f496cb725ab3ebc9beedeb39bad8a62b6319518f51b98e3c9b38578b7ed6ab4
<?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;

/**
 * Represents a cut array.
 *
 * @author Nicolas Grekas <[email protected]>
 */
class CutArrayStub extends CutStub
{
    public array $preservedSubset;

    public function __construct(array $value, array $preservedKeys)
    {
        parent::__construct($value);

        $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys));
        $this->cut -= \count($this->preservedSubset);
    }
}

The same content is in 49 releases, Joomla 6.0.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.