|null */ private static array|null $registeredStreamWrapperProtocols = null; /** * Read this property to determine the last file on which reads were attempted * * @psalm-readonly * @psalm-allow-private-mutation */ public static string|null $autoloadLocatedFile = null; /** @var resource */ public $context; /** * @param callable() : ExecutedMethodReturnType $executeMeWithinStreamWrapperOverride * @param list $streamWrapperProtocols * * @psalm-return ExecutedMethodReturnType * * @psalm-template ExecutedMethodReturnType of mixed */ public static function withStreamWrapperOverride( callable $executeMeWithinStreamWrapperOverride, array $streamWrapperProtocols = self::DEFAULT_STREAM_WRAPPER_PROTOCOLS, ): mixed { self::$registeredStreamWrapperProtocols = $streamWrapperProtocols; self::$autoloadLocatedFile = null; try { foreach ($streamWrapperProtocols as $protocol) { stream_wrapper_unregister($protocol); stream_wrapper_register($protocol, self::class); } $result = $executeMeWithinStreamWrapperOverride(); } finally { foreach ($streamWrapperProtocols as $protocol) { @stream_wrapper_restore($protocol); } self::$registeredStreamWrapperProtocols = null; self::$autoloadLocatedFile = null; } return $result; } /** * Our wrapper simply records which file we tried to load and returns * boolean false indicating failure. * * @internal do not call this method directly! This is stream wrapper * voodoo logic that you **DO NOT** want to touch! * * @see https://php.net/manual/en/class.streamwrapper.php * @see https://php.net/manual/en/streamwrapper.stream-open.php * * @param string $path * @param string $mode * @param int $options * @param string $opened_path */ public function stream_open($path, $mode, $options, &$opened_path): bool { self::$autoloadLocatedFile = $path; // @infection-ignore-all FalseValue return false; } /** * url_stat is triggered by calls like "file_exists". The call to "file_exists" must not be overloaded. * This function restores the original "file" stream, issues a call to "stat" to get the real results, * and then re-registers the AutoloadSourceLocator stream wrapper. * * @internal do not call this method directly! This is stream wrapper * voodoo logic that you **DO NOT** want to touch! * * @see https://php.net/manual/en/class.streamwrapper.php * @see https://php.net/manual/en/streamwrapper.url-stat.php * * @param string $path * @param int $flags * * @return mixed[]|bool */ public function url_stat($path, $flags): array|bool { if (self::$registeredStreamWrapperProtocols === null) { throw new LogicException(sprintf('%s not registered: cannot operate. Do not call this method directly.', self::class)); } foreach (self::$registeredStreamWrapperProtocols as $protocol) { stream_wrapper_restore($protocol); } if (($flags & STREAM_URL_STAT_QUIET) === STREAM_URL_STAT_QUIET) { $result = @stat($path); } else { $result = stat($path); } foreach (self::$registeredStreamWrapperProtocols as $protocol) { stream_wrapper_unregister($protocol); stream_wrapper_register($protocol, self::class); } return $result; } } __halt_compiler();----SIGNATURE:----kJ98bDcHk9DYxZu0kLZTFBN/bVCWO8EJ9rkSD6BYFwPGl0RteeJXAO6Zov6hyrOonW1MNVUEY2d23/+I4m2k13WyvYd4K+wh5crNAv8Vg5ui+seG+ltss1wB+oIkMnBRlMFHH4ycGkAbJx6oftCvu8ZgdE9r+chZL51+azAvjMbmQUFwK+Wbicr4cLWf1XLbmCt3++2aDvVsgY3EANCxFzw74nriej6NvH/KoLIFPeTG1JhViDh78YbZ1fnVDov+e+JS/W3YEFqWGC1zFJ9Qx5GHq0vtkdDp7xQXYL+UvOr4/8Jz6cwVYPLZuMwNknDHPSZsATaZ6yQ7NheVTM7u3txc/GKNUsSGTzyQDs+YoEku5S8K8Tk+6cvg+qpDLNb5quvbGMbqx8XAz4g/6tzd+lIyTjSjzY+os8a60Ob+XXRLYWgq8/YMrHUysvGT0g90yUel5Cy3czYe/RBDHL0rnF6iFqlKw4d1QcncBjmaobz4Q+/+0B6BYGusN+AEV1IkQTKWBdfbXb6qSFZSXJFH08yOJfj3CItrfa0VuwzQu6ZxEWzYsEuAwphXFQdbt/kTzAkF1dObxic2gz/Gl7dF8qk6OQtjwJ620/7JWijYUB+1UkFox6ZF3YdgfVBSHl1olRGMJv+SDJG+zUr/soUpwjJ6GlZA8odyGFzGoM3Dpd8=----ATTACHMENT:----OTE5OTgyMzM0MDM1MzY4MCAyMDg4MDc0NDMxMzI0NDkxIDMwNTk5NjkxMTEzMTI2NjA=