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