Пример #1
0
 /**
  * Set the IStream object to be read.
  *
  * @param \qtism\common\storage\IStream $stream An IStream object.
  * @throws \qtism\common\storage\StreamAccessException If the $stream is not open yet.
  */
 protected function setStream(IStream $stream)
 {
     if ($stream->isOpen() === false) {
         $msg = "A BinaryStreamAccess do not accept closed streams to be read.";
         throw new BinaryStreamAccessException($msg, $this, StreamAccessException::NOT_OPEN);
     }
     parent::setStream($stream);
 }
 /**
  * Creates a new PhpStreamAccess object.
  * 
  * @param IStream $stream The stream to write some PHP into.
  * @throws StreamAccessException If $stream is not open yet.
  */
 public function __construct(IStream $stream)
 {
     parent::__construct($stream);
 }