diff --git a/reference/objaggregation/functions.xml b/reference/objaggregation/functions.xml index 3210ecc487..6564b1447f 100644 --- a/reference/objaggregation/functions.xml +++ b/reference/objaggregation/functions.xml @@ -1,9 +1,9 @@ -&reference.objaggregation.functions.aggregate; &reference.objaggregation.functions.aggregate-methods-by-list; &reference.objaggregation.functions.aggregate-methods-by-regexp; &reference.objaggregation.functions.aggregate-methods; &reference.objaggregation.functions.aggregate-properties-by-list; &reference.objaggregation.functions.aggregate-properties-by-regexp; &reference.objaggregation.functions.aggregate-properties; -&reference.objaggregation.functions.deaggregate; +&reference.objaggregation.functions.aggregate; &reference.objaggregation.functions.aggregation-info; +&reference.objaggregation.functions.deaggregate; diff --git a/reference/objaggregation/reference.xml b/reference/objaggregation/reference.xml index 255824300f..8c191e3936 100644 --- a/reference/objaggregation/reference.xml +++ b/reference/objaggregation/reference.xml @@ -1,5 +1,5 @@ - + Object Aggregation/Composition Functions Object Aggregation @@ -10,11 +10,11 @@ &reftitle.intro; In Object Oriented Programming, it is common to see the composition of - simple classes (and/or instances) into a more complex one. This is + simple classes (and/or instances) into a more complex one. This is a flexible strategy for building complicated objects and object - hierachies, and can function as a dynamic alternative to multiple + hierachies and can function as a dynamic alternative to multiple inheritance. There are two ways to perform class (and/or object) - composition, depending on the relationship between the composed + composition depending on the relationship between the composed elements: Association and Aggregation. @@ -124,7 +124,7 @@ $output = $rep->generateReport(); Aggregation, on the other hand, implies encapsulation (hidding) of the parts of the composition. We can aggregate classes by using a (static) - inner class (PHP does not support inner classes), in this case the + inner class (PHP does not yet support inner classes), in this case the aggregated class definition is not accessible, except through the class that contains it. The aggregation of instances (object aggregation) involves the dynamic creation of subobjects inside an object, in the @@ -403,9 +403,11 @@ method: save One point that we have not mention above, is that the process of aggregation will not override existing properties or methods in the - objects. For example, the FileStorage defines a - $data property, and - WDDXStorage + objects. For example, the class FileStorage defines a + $data property, and the class + WDDXStorage also defines a similar property + which will not override the one in the object acquired during + instantiation from the class FileStorage.