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:----3tEIa5NZJejjemFHvHObNNCClQJcg4Bqw3KZrAnEpNvLVyYfmpQJ1GNdTTTudePHLW4GNGwSf3jrgvWxuO7fI9OOp/VMNFSFA2I8ZDWGn6GIVmheUpgbGszw/ErUX168Gxin0qLYzSN2QX3zOpjDdx7+jZacv0SVivv6+C9Ez9PSBBCNlKvPRN5FRIUKhPwL31QFSm8nxGHfm7CuAFkg+8B6pixO2kw8P+0mp+97BW57KKBqsLsq7PnxhZ7r6hRTpPc8c+4E2Bubv3LrtVDmfKWxdiIS2Eic8OSV9XyXWbcSR3NhRqpxVoLeMzKVfCB/3bMezQsO+kp/1fpDJ2eJx6zeDE4rAq6tfrVW4mfzxUg2LVUF0nZuh3vIeautkwesfAswpF+JzHyteIS9kuAT63I6MEDPFpRuDciU+ZMXt82pNevxygxiURVOuKciMa1M5w8vYDN7tEgjXJpwpF5I+li63GIu7X56g6y7zApNYrFWGC5yhml5/XTzVa4M8fJ9CVUQc/xKXXv1R3ZoJIw0GP/3uD3jQT+9/5G4GlRtHjabVPLT7BKAKxDUvvZTiyXOS7UMAhse6M3vFDPOMUMHUsz5gCj8m4nrGsegYI6MhprD+x5yNyCohgnPsARKQU4dHgqbA/4Bd4gykSmJCLFfLVqMP1dG1i3XqLZCN3jM2f4=----ATTACHMENT:----Nzg0MTEzMDU2Njg5NTY1MSAyNTAyNDAyOTYxNjc5NjI3IDk5NjU5NDkzODc1MDc2MDY=