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: /** Chris@0: * Represents a cut array. Chris@0: * Chris@0: * @author Nicolas Grekas
Chris@0: */ Chris@0: class CutArrayStub extends CutStub Chris@0: { Chris@0: public $preservedSubset; Chris@0: Chris@0: public function __construct(array $value, array $preservedKeys) Chris@0: { Chris@0: parent::__construct($value); Chris@0: Chris@0: $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); Chris@17: $this->cut -= \count($this->preservedSubset); Chris@0: } Chris@0: }