prepare 0.2.0
[awesomized/ext-ion] / docs / tutorial / : Tutorial / :5. Symbols, Tables and Catalogs.md
index ded06cc0cdde6dcb55743d9a9f9841d5e1ce58ea..a67cdcdd04bee4ecafa944f0db7bb36abe49c0e4 100644 (file)
@@ -118,10 +118,10 @@ $catalog = new ion\Catalog;
 $catalog->add($symtab);
 
 /* Use the catalog when writing the data */
-$writer = new class(options: new ion\Writer\Options(
+$writer = new class(
   catalog: $catalog,
   outputBinary: true
-)) extends ion\Writer\Buffer\Writer {
+) extends ion\Writer\Buffer\Writer {
   public function writeRow(Row $row) : void {
     $this->startContainer(ion\Type::Struct);
     
@@ -225,9 +225,9 @@ When unserializing with known symbols, the symbol IDs will be resolved when usin
 ```php
 <?php
 
-$reader = new \ion\Reader\Buffer\Reader($writer->getBuffer(), [
-       "catalog" => $catalog
-]);
+$reader = new \ion\Reader\Buffer\Reader($writer->getBuffer(),
+       catalog: $catalog
+);
 $unser = new ion\Unserializer\Unserializer(multiSequence: true);
 var_dump($unser->unserialize($reader));