AmqpCaster.php
2 years ago
ArgsStub.php
1 year ago
Caster.php
1 year ago
ClassStub.php
1 year ago
ConstStub.php
2 years ago
CutArrayStub.php
2 years ago
CutStub.php
1 year ago
DOMCaster.php
1 year ago
DateCaster.php
2 years ago
DoctrineCaster.php
2 years ago
DsCaster.php
2 years ago
DsPairStub.php
2 years ago
EnumStub.php
1 year ago
ExceptionCaster.php
1 year ago
FiberCaster.php
2 years ago
FrameStub.php
1 year ago
GmpCaster.php
2 years ago
ImagineCaster.php
2 years ago
ImgStub.php
2 years ago
IntlCaster.php
2 years ago
LinkStub.php
1 year ago
MemcachedCaster.php
2 years ago
MysqliCaster.php
2 years ago
PdoCaster.php
2 years ago
PgSqlCaster.php
1 year ago
ProxyManagerCaster.php
2 years ago
RdKafkaCaster.php
1 year ago
RedisCaster.php
2 years ago
ReflectionCaster.php
1 year ago
ResourceCaster.php
1 year ago
SplCaster.php
1 year ago
StubCaster.php
2 years ago
SymfonyCaster.php
2 years ago
TraceStub.php
1 year ago
UuidCaster.php
2 years ago
XmlReaderCaster.php
1 year ago
XmlResourceCaster.php
2 years ago
CutArrayStub.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace Matomo\Dependencies\Symfony\Component\VarDumper\Caster; |
| 12 | |
| 13 | /** |
| 14 | * Represents a cut array. |
| 15 | * |
| 16 | * @author Nicolas Grekas <p@tchwork.com> |
| 17 | */ |
| 18 | class CutArrayStub extends CutStub |
| 19 | { |
| 20 | public $preservedSubset; |
| 21 | public function __construct(array $value, array $preservedKeys) |
| 22 | { |
| 23 | parent::__construct($value); |
| 24 | $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); |
| 25 | $this->cut -= \count($this->preservedSubset); |
| 26 | } |
| 27 | } |
| 28 |