/** * Construct a new writable data handle. * * @param stream|null $stream The native stream handle, or null to create lazily from the filesystem path. * @param string|null $path The filesystem path, or null if the path is unknown. * @param Inline|null $renderer The YAML renderer to use. * @param Isolator|null $isolator The isolator to use. */ public function __construct($stream = null, $path = null, Inline $renderer = null, Isolator $isolator = null) { parent::__construct($stream, $path, $isolator); if (null === $renderer) { $renderer = new Inline(); } $this->renderer = $renderer; }
/** * Construct a new readable data handle. * * @param stream|null $stream The native stream handle, or null to create lazily from the filesystem path. * @param string|null $path The filesystem path, or null if the path is unknown. * @param Parser|null $parser The YAML parser to use. * @param Isolator|null $isolator The isolator to use. */ public function __construct($stream = null, $path = null, Parser $parser = null, Isolator $isolator = null) { parent::__construct($stream, $path, $isolator); if (null === $parser) { $parser = new Parser(); } $this->parser = $parser; $this->rewindOffset = 0; $this->isExhausted = false; $this->isExpanded = false; }
/** * Construct a new switching compact writable data handle. * * @param stream|null $stream The native stream handle, or null to create lazily from the filesystem path. * @param string|null $path The filesystem path, or null if the path is unknown. * @param Inline|null $renderer The YAML renderer to use. * @param Isolator|null $isolator The isolator to use. */ public function __construct($stream = null, $path = null, Inline $renderer = null, Isolator $isolator = null) { parent::__construct($stream, $path, $isolator); if (null === $renderer) { $renderer = new Inline(); } $this->renderer = $renderer; $this->bufferSize = 10485760; $this->dataSize = 0; $this->rows = array(); $this->dataWritten = false; }