/** * {@inheritdoc} */ public function open(string $path, string $mode = 'r', bool $useIncludePath = null, $context = null) { if (isset($this->resource)) { throw new ResourceAlreadySetException(); } $this->filePath = $path; return parent::open($path, $mode, $useIncludePath, $context); }
/** * {@inheritdoc} */ public function open(string $path, string $mode = 'r', bool $useIncludePath = null, $context = null) { if (isset($this->resource)) { throw new ResourceAlreadySetException(); } $base64Source = base64_encode($path); $path = 'data://plain/text;base64,' . $base64Source; return parent::open($path, $mode, $useIncludePath, $context); }