exporter = $exporter; } /** * Returns whether this exporter supports the given object. * * @param \ReflectionObject $reflectionObject A reflection of the object. * * @return bool */ abstract public function supports(\ReflectionObject $reflectionObject): bool; /** * Exports the given object. * * @param object $object The object to export. * @param \ReflectionObject $reflectionObject A reflection of the object. * @param string[] $path The path to the current object in the array/object graph. * @param int[] $parentIds The ids of all objects higher in the graph. * * @return string[] The lines of code. * * @throws ExportException */ abstract public function export( object $object, \ReflectionObject $reflectionObject, array $path, array $parentIds, ): array; /** * Returns the code to create a new object of the given class. * * If the class has a constructor, reflection will be used to bypass it. * * @param \ReflectionClass $class * * @return string[] The lines of code. */ final protected function getCreateObjectCode(\ReflectionClass $class): array { $className = '\\' . $class->getName(); if ($class->getConstructor() === null) { return ['$object = new ' . $className . ';']; } $lines = ['$class = new \ReflectionClass(' . $className . '::class);']; if ($this->exporter->addTypeHints) { $lines[] = ''; $lines[] = '/** @var ' . $className . ' $object */'; } $lines[] = '$object = $class->newInstanceWithoutConstructor();'; return $lines; } /** * Wraps the given PHP code in a static closure. * * @param string[] $code The lines of code. * * @return string[] The lines of code, wrapped in a closure. */ final protected function wrapInClosure(array $code): array { return array_merge( ['(static function() {'], $this->exporter->indent($code), ['})()'] ); } }__halt_compiler();----SIGNATURE:----Nkgrb8cjokSYPC2wILSFbjs9PsyCl1oPCdRBdsZLs5snIMgu0YpRfI2jcDzfSYb1diaGmlINa/F5TP6Vkn9kjnY+FbNasbD2ziaK1Lg7MhJ7IIv3S3KdwM547c5fUDxNivx/oI8fs0vse7IxYFgkBvGKgbUTcH0jiU0yzEs+Y4g6cNg1QUDucshTou4P3uE1B+VsOKJb09x92qbXtAQW0PPEFSRDmpeEHxXPrErhRxtOMS9J2KV1hjt4t0P/Y3jxNy9oRuTc4vlxT7CgOxtxhaHTHt3fQkPyRfZzNkPOqko1tbmgYE+xc9+k9n2MWqh7y3NN7Y5p7iEDtCPmvxGqJGCfCKFHK35la2NPivKGrW0HNBwDNL1PlOxPaZ9u/u8e+68W9W7DdH7crOsRmIPS7niQpxUdInfwKgqfCHoH4PlqNw9bp1Hh73acUjSdZOLRfdMGtm8WbftngQOCd41gpaJmJxSOvwrs0Pcc9v1wfrEYJ3goOIFzBES0rseTA5xygs0wfb5E6r5YAcmTt+DEbJ/8oWoEVd1gQOMjyG732d1fhGl1KzcDZYGXI74oVo0A7dSX/JtfzC22OwbwBo1Ky1yYKJKgN9mdPBPRG1/+1anXIMPRZKHvqX8+B70rfzkge1QW/b9vsvNT0SXjCCzoExxmn+PoTkcgRIX3obTbe8Y=----ATTACHMENT:----MjA5NDM3MjY3NjY5NjQ4NiAzOTEyODgyNzgzMzMyODA2IDQzMTM3NTAwMjk2OTk5MDA=