Skip to content

Instantly share code, notes, and snippets.

View surferxo3's full-sized avatar

Mohammad Sharaf Ali surferxo3

View GitHub Profile
<?php
/**
* Existence of Composition class requires that an external object of
* class B is passed in on construction
*
* UML Explanation - The object at this role contains the object at the opposite role.
*
* Alternatively stated, an object of class Composition cannot be created without
* an object of class B (in this case through dependency injection)