LXX. Object Aggregation/Composition Functions

Varoitus

Varoitus ! Tämä laajennus on EKSPERIMENTAALINEN . Tämän laajennuksen ominaisuudet , käyttäytyminen ja funktioiden nimet ja parametrit voivat muuttua varoituksetta seuraavissa PHP versioissa .

Introduction

Esimerkki 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:

Esimerkki 2 .






Examples

Esimerkki 3 . storage_classes.inc






Esimerkki 4 . test_aggregation.php














Sisällys
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