/** * {@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); }
protected function setMode(string $mode) { $return = parent::setMode($mode); if ($this->isAppendOnly()) { $this->seek(0, SEEK_END); } return $return; }