Skip to content

Commit c1f37a6

Browse files
committed
Mark oop5 and xml* categories as 'interactive' (with exceptions) and use 'examples/' dir for XML example files so they (will) work with WASM
1 parent d6f5401 commit c1f37a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+89
-85
lines changed

language/oop5.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<chapter xml:id="language.oop5" xmlns="http://docbook.org/ns/docbook">
3+
<chapter xml:id="language.oop5" xmlns="http://docbook.org/ns/docbook" annotations="interactive">
44
<title>Classes and Objects</title>
55

66
<sect1 xml:id="oop5.intro">

language/oop5/abstract.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ class C extends A
194194
but must have either <literal>get</literal> or <literal>set</literal> declared but not defined (as in the example above).
195195
</simpara>
196196
<example>
197-
<title>Abstract property example</title>
198-
<programlisting role="php">
197+
<title>Abstract property with hooks example</title>
198+
<programlisting role="php" annotations="non-interactive">
199199
<![CDATA[
200200
<?php
201201

language/oop5/autoload.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
and <literal>MyClass2</literal> from the files <filename>MyClass1.php</filename>
4545
and <filename>MyClass2.php</filename> respectively.
4646
</para>
47-
<programlisting role="php">
47+
<programlisting role="php" annotations="interactive">
4848
<![CDATA[
4949
<?php
5050
spl_autoload_register(function ($class_name) {
@@ -90,7 +90,7 @@ Fatal error: Interface 'ITest' not found in ...
9090
by Composer. By including this file, those packages can be used without
9191
any additional work.
9292
</simpara>
93-
<programlisting role="php">
93+
<programlisting role="php" annotations="interactive">
9494
<![CDATA[
9595
<?php
9696
require __DIR__ . '/vendor/autoload.php';

language/oop5/basic.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ NS\ClassName
807807
<para>
808808
<example>
809809
<title>Nullsafe Operator</title>
810-
<programlisting role="php">
810+
<programlisting role="php" annotations="non-interactive">
811811
<![CDATA[
812812
<?php
813813

language/oop5/decon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class Point {
193193
</note>
194194
<example>
195195
<title>Using new in initializers</title>
196-
<programlisting role="php">
196+
<programlisting role="php" annotations="non-interactive">
197197
<![CDATA[
198198
<?php
199199

language/oop5/properties.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<para>
4646
<example>
4747
<title>Property declarations</title>
48-
<programlisting role="php">
48+
<programlisting role="php" annotations="non-interactive">
4949
<![CDATA[
5050
<?php
5151
class SimpleClass
@@ -201,7 +201,7 @@ Fatal error: Uncaught Error: Typed property Shape::$numberOfSides must not be ac
201201
explicitly if desired.
202202
<example>
203203
<title>Example of readonly properties</title>
204-
<programlisting role="php">
204+
<programlisting role="php" annotations="non-interactive">
205205
<![CDATA[
206206
<?php
207207
@@ -241,7 +241,7 @@ $test->prop = "foobar";
241241
A readonly property can only be initialized once, and only from the scope where it has been declared. Any other assignment or modification of the property will result in an <classname>Error</classname> exception.
242242
<example>
243243
<title>Illegal initialization of readonly properties</title>
244-
<programlisting role="php">
244+
<programlisting role="php" annotations="non-interactive">
245245
<![CDATA[
246246
<?php
247247
class Test1 {
@@ -261,7 +261,7 @@ $test1->prop = "foobar";
261261
<para>
262262
Specifying an explicit default value on readonly properties is not allowed, because a readonly property with a default value is essentially the same as a constant, and thus not particularly useful.
263263
<informalexample>
264-
<programlisting role="php">
264+
<programlisting role="php" annotations="non-interactive">
265265
<![CDATA[
266266
<?php
267267
@@ -283,7 +283,7 @@ class Test {
283283
<para>
284284
Modifications are not necessarily plain assignments, all of the following will also result in an <classname>Error</classname> exception:
285285
<informalexample>
286-
<programlisting role="php">
286+
<programlisting role="php" annotations="non-interactive">
287287
<![CDATA[
288288
<?php
289289
@@ -312,7 +312,7 @@ foreach ($test as &$prop);
312312
<para>
313313
However, readonly properties do not preclude interior mutability. Objects (or resources) stored in readonly properties may still be modified internally:
314314
<informalexample>
315-
<programlisting role="php">
315+
<programlisting role="php" annotations="non-interactive">
316316
<![CDATA[
317317
<?php
318318

language/oop5/traits.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Hello World!
220220
to be able to use B's bigTalk implementation under an additional alias
221221
<literal>talk</literal>.
222222
</para>
223-
<programlisting role="php">
223+
<programlisting role="php" annotations="non-interactive">
224224
<![CDATA[
225225
<?php
226226
trait A {
@@ -269,7 +269,7 @@ class Aliased_Talker {
269269
</para>
270270
<example xml:id="language.oop5.traits.visibility.ex1">
271271
<title>Changing Method Visibility</title>
272-
<programlisting role="php">
272+
<programlisting role="php" annotations="non-interactive">
273273
<![CDATA[
274274
<?php
275275
trait HelloWorld {

language/oop5/visibility.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</para>
2323
<example>
2424
<title>Property declaration</title>
25-
<programlisting role="php">
25+
<programlisting role="php" annotations="non-interactive">
2626
<![CDATA[
2727
<?php
2828
/**
@@ -88,7 +88,7 @@ $obj2->printHello(); // Shows Public2, Protected2, Undefined
8888
</simpara>
8989
<example>
9090
<title>Asymmetric Property visibility</title>
91-
<programlisting role="php">
91+
<programlisting role="php" annotations="non-interactive">
9292
<![CDATA[
9393
<?php
9494
class Book
@@ -182,7 +182,7 @@ $b->pubYear = 2023; // Fatal Error
182182
</simpara>
183183
<example>
184184
<title>Asymmetric Property inheritance</title>
185-
<programlisting role="php">
185+
<programlisting role="php" annotations="non-interactive">
186186
<![CDATA[
187187
<?php
188188
class Book
@@ -214,7 +214,7 @@ class SpecialBook extends Book
214214
</para>
215215
<example>
216216
<title>Method Declaration</title>
217-
<programlisting role="php">
217+
<programlisting role="php" annotations="non-interactive">
218218
<![CDATA[
219219
<?php
220220
/**
@@ -313,7 +313,7 @@ $myFoo->test(); // Bar::testPrivate
313313
</para>
314314
<example>
315315
<title>Constant Declaration as of PHP 7.1.0</title>
316-
<programlisting role="php">
316+
<programlisting role="php" annotations="non-interactive">
317317
<![CDATA[
318318
<?php
319319
/**
@@ -378,7 +378,7 @@ $myclass2->foo2(); // Public and Protected work, not Private
378378
</para>
379379
<example>
380380
<title>Accessing private members of the same object type</title>
381-
<programlisting role="php">
381+
<programlisting role="php" annotations="non-interactive">
382382
<![CDATA[
383383
<?php
384384
class Test

reference/dom/book.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
33

4-
<book xml:id="book.dom" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4+
<book xml:id="book.dom" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="interactive">
55
<?phpdoc extension-membership="bundledexternal" ?>
66
<title>Document Object Model</title>
77
<titleabbrev>DOM</titleabbrev>

reference/dom/dom/attr/isid.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<?php
4141
4242
// We need to validate our document before referring to the id
43-
$doc = Dom\XMLDocument::createFromFile('book.xml', LIBXML_DTDVALID);
43+
$doc = Dom\XMLDocument::createFromFile('examples/book-docbook.xml', LIBXML_DTDVALID);
4444
4545
// We retrieve the attribute named id of the chapter element
4646
$attr = $doc->getElementsByTagName('chapter')->item(0)->getAttributeNode('id');

0 commit comments

Comments
 (0)