LXX. Object Aggregation/Composition Functions

Waarschuwing

Deze module is EXPERIMENTEEL . Dat betekent , dat het gedrag van deze functies , deze functienamen , in concreto ALLES dat hier gedocumenteerd is in een toekomstige uitgave van PHP ZONDER WAARSCHUWING kan veranderen . Wees gewaarschuwd , en gebruik deze module op eigen risico .

Introductie

Voorbeeld 1 .




We can also associate instances at runtime by passing a reference in a constructor (or any other method), which allow us to dynamically change the association relationship between objects. We will modify the example above to illustrate this point:

Voorbeeld 2 .






Voorbeelden

Voorbeeld 3 . storage_classes.inc






Voorbeeld 4 . test_aggregation.php














Inhoudsopgave
aggregate_info -- returns an associative array of the methods and properties from each class that has been aggregated to the object.
aggregate_methods_by_list -- selective dynamic class methods aggregation to an object
aggregate_methods_by_regexp -- selective class methods aggregation to an object using a regular expression
aggregate_methods -- dynamic class and object aggregation of methods
aggregate_properties_by_list -- selective dynamic class properties aggregation to an object
aggregate_properties_by_regexp -- selective class properties aggregation to an object using a regular expression
aggregate_properties -- dynamic aggregation of class properties to an object
aggregate -- dynamic class and object aggregation of methods and properties
aggregation_info -- Synonym for aggregate_info()
deaggregate -- removes the aggregated methods and properties from an object