File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494 <listitem ><simpara ><xref linkend =" book.opcache" /></simpara ></listitem >
9595 <listitem ><simpara ><xref linkend =" book.openal" /></simpara ></listitem >
9696 <listitem ><simpara ><xref linkend =" book.openssl" /></simpara ></listitem >
97+ <listitem ><simpara ><xref linkend =" book.operator" /></simpara ></listitem >
9798 <listitem ><simpara ><xref linkend =" book.outcontrol" /></simpara ></listitem >
9899 <listitem ><simpara ><xref linkend =" book.parallel" /></simpara ></listitem >
99100 <listitem ><simpara ><xref linkend =" book.parle" /></simpara ></listitem >
350351 <listitem ><para ><xref linkend =" book.oauth" /></para ></listitem >
351352 <listitem ><para ><xref linkend =" book.oci8" /></para ></listitem >
352353 <listitem ><para ><xref linkend =" book.openal" /></para ></listitem >
354+ <listitem ><para ><xref linkend =" book.operator" /></para ></listitem >
353355 <listitem ><para ><xref linkend =" book.parallel" /></para ></listitem >
354356 <listitem ><para ><xref linkend =" book.parle" /></para ></listitem >
355357 <listitem ><para ><xref linkend =" ref.pdo-cubrid" /></para ></listitem >
Original file line number Diff line number Diff line change 2929 exactly how expressions containing several different operators are
3030 evaluated.
3131 </para >
32+ <para >
33+ There is a PECL extension that allows for overloading of some operators for
34+ objects. For more information, see the <link linkend =" book.operator" >Operator
35+ Overloading for Objects</link > section.
36+ </para >
3237
3338 &language.operators.precedence;
3439 &language.operators.arithmetic;
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!-- $Revision$ -->
3+ <book xml : id =" book.operator" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
4+ <?phpdoc extension-membership =" pecl" ?>
5+ <title >Operator Overloading for Objects</title >
6+ <titleabbrev >Operator Overloading</titleabbrev >
7+
8+ <!-- {{{ preface -->
9+ <preface xml : id =" intro.operator" >
10+ &reftitle.intro;
11+ <para >
12+ This extension allows you to define and implement operator overloading for objects.
13+ It is possible to define how an object reacts when an operator is used on it.
14+ </para >
15+ <para >
16+ One example of this is creating a collection type object that has the addition
17+ operator overloaded to allow adding elements to the collection or adding two
18+ collections together.
19+ </para >
20+ <para >
21+ Another example is creating an enhanced string class that has the multiplication
22+ operator overloaded to allow repeating the string a certain number of times.
23+ </para >
24+
25+ <section >
26+ &reftitle.seealso;
27+
28+ </section >
29+ </preface >
30+ <!-- }}} -->
31+ &reference.operator.setup;
32+ &reference.operator.overloading;
33+ </book >
You can’t perform that action at this time.
0 commit comments