prepare 0.2.0
[awesomized/ext-ion] / docs / tutorial / : Tutorial / :5. Symbols, Tables and Catalogs.md
index 637a098d8ad869e6f2ddfb015f4fe913ab4d1afd..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);
     
@@ -224,13 +224,12 @@ When unserializing with known symbols, the symbol IDs will be resolved when usin
 
 ```php
 <?php
-  
-var_dump(ion\unserialize($writer->getBuffer(), [
-  "multiSequence" => true,
-  "readerOptions" => [
-    "catalog" => $catalog
-  ]
-]));
+
+$reader = new \ion\Reader\Buffer\Reader($writer->getBuffer(),
+       catalog: $catalog
+);
+$unser = new ion\Unserializer\Unserializer(multiSequence: true);
+var_dump($unser->unserialize($reader));
 
 /*
   array(3) {