public function open(AccessMode $mode) { if ($mode->allowsRead()) { throw new \LogicException(sprintf('The stream "%s" is not readable.', 'php://output')); } return parent::open($mode); }
public function isReadable() { $this->assertOpen(); return $this->mode->allowsRead(); }