6 ★
4. Symbols, Tables and Catalogs -
9 <meta property=
"og:title" content=
"ion/: Tutorial/:4. Symbols, Tables and Catalogs">
10 <meta name=
"viewport" content=
"width=1200, initial-scale=0.5">
11 <base href=
"/ext-ion/v0.1/">
12 <meta http-equiv=
"Content-Location" content=
"/ext-ion/v0.1/ion/: Tutorial/:4. Symbols, Tables and Catalogs">
13 <link rel=
"stylesheet" href=
"index.css">
15 <link rel=
"shortcut icon" href=
"/ext-ion/v0.1/favicon.ico">
23 <a href=
"https://github.com/awesomized/ext-ion/edit/master/ion.stub.php">Edit
</a>
28 <li>↰ <a href=
"./">Home
</a>
33 ↑ <a href=
"./ion">
39 ↑ <a href=
"./ion/: Tutorial">
45 ↻ <strong><a href=
"./ion/: Tutorial/:4. Symbols, Tables and Catalogs">★
4. Symbols, Tables and Catalogs
</a></strong>
51 <li>↲ <a href=
"./ion/: Tutorial/:1. Getting started">★
1. Getting started
</a></li>
53 <li>↲ <a href=
"./ion/: Tutorial/:2. What is ion">★
2. What is ion
</a></li>
55 <li>↲ <a href=
"./ion/: Tutorial/:3. Standard Datatypes">★
3. Standard Datatypes
</a></li>
57 <li>↲ <a href=
"./ion/: Tutorial/:4. Special Datatypes">★
4. Special Datatypes
</a></li>
59 <li>↲ <a href=
"./ion/: Tutorial/:5. Symbols, Tables and Catalogs">★
5. Symbols, Tables and Catalogs
</a></li>
61 <li>↲ <a href=
"./ion/: Tutorial/Untitled">Untitled
</a></li>
71 <meta charset=
"utf-8"><h1>
72 <a class=
"permalink" href=
"ion/:%20Tutorial/:4.%20Symbols,%20Tables%20and%20Catalogs#">#
</a>Symbols, Tables and Catalogs
</h1><h2 id=
"Catalog">Catalog
<a class=
"permalink" href=
"ion/:%20Tutorial/:4.%20Symbols,%20Tables%20and%20Catalogs#Catalog">#
</a>
73 </h2><p>The Catalog holds a collection of
<a href=
"ion/Symbol/Table">ion\Symbol\Table
</a> instances queried from
<a href=
"ion/Reader">ion\Reader
</a> and
<a href=
"ion/Writer">ion\Writer
</a> instances.
</p><p>See also
<a href=
"https://amzn.github.io/ion-docs/docs/symbols.html#the-catalog">the ION spec's symbol guide chapter on catalog
</a>.
</p><pre><code><span style=
"color: inherit" class=
"html">
74 <span style=
"color: inherit" class=
"default"><?php
<br>$catalog
</span><span style=
"color: inherit" class=
"keyword">= new
</span><span style=
"color: inherit" class=
"default">ion\Catalog
</span><span style=
"color: inherit" class=
"keyword">;
<br></span><span style=
"color: inherit" class=
"default">$symtab
</span><span style=
"color: inherit" class=
"keyword">=
</span><span style=
"color: inherit" class=
"default">ion\Symbol\PHP
</span><span style=
"color: inherit" class=
"keyword">::
</span><span style=
"color: inherit" class=
"default">asTable
</span><span style=
"color: inherit" class=
"keyword">();
<br></span><span style=
"color: inherit" class=
"default">$catalog
</span><span style=
"color: inherit" class=
"keyword">-
></span><span style=
"color: inherit" class=
"default">add
</span><span style=
"color: inherit" class=
"keyword">(
</span><span style=
"color: inherit" class=
"default">$symtab
</span><span style=
"color: inherit" class=
"keyword">);
<br></span><span style=
"color: inherit" class=
"default">?
><br></span>
77 <div class=
"comments">
78 <style>.giscus-frame {min-height:
16em;}
</style>
80 function giscus_load(button) {
81 let script = document.createElement(
"script");
82 script.setAttribute(
"data-repo", 'awesomized/ext-ion');
83 script.setAttribute(
"data-category", 'Comments on Docs');
84 script.setAttribute(
"data-repo-id", 'R_kgDOGfXEXw');
85 script.setAttribute(
"data-category-id", 'DIC_kwDOGfXEX84CBHuf');
86 script.setAttribute(
"data-mapping", 'og:title');
87 script.setAttribute(
"data-input-position", 'bottom');
88 script.setAttribute(
"data-reactions-enabled", false);
89 script.setAttribute(
"data-theme", 'light');
90 script.setAttribute(
"data-lang", 'en');
92 script.src =
"//giscus.app/client.js";
93 button.parentNode.replaceChild(script, button);
96 <button class=
"activator" onclick=
"giscus_load(this)">Show Comments from Github Discussions
</button>
103 <li><a href=
"https://github.com/m6w6/mdref">mdref-v3.0
105 <li><a href=
"LICENSE">© 2013-
2022 All rights reserved.
</a></li>
112 <script src=
"index.js" defer
></script>