It is important to understand how the following are used to describe the creation cycle in OOE UML diagrams using the Webel recipe for UML-friendly PHP:
- The «!chosen» stereotype on a Property variable typed by an Interface indicates that a default concrete implementation Class is chosen for it by the managing Class (not via a factory), usually in a lazy creator method of the same name as the Property.
- A «!new» stereotype assigned to a Usage from a source Classifier (or a creation method) means an instance of the target Classifier is created directly (instead of fetching an Interface product via a factory) and assigned to a «!chosen» Interface var.
Please compare with products created via a factory:
- The «!new» stereotype on a Usage from a Factory class (or a method of a Factory class, or both) to a concrete implementation Class for an Interface product indicates that the Factory (by default) uses that implementation Class as the product.
© Copyright 2001 - 2016 Webel IT Australia (ABN: 67 677 268 579). All rights reserved (except as specified below).
PHP code examples from Webel IT Australia on this site are distributed under the GNU General Public License.
Excludes text and code snippets from Drupal.org quoted for educational purposes.
Drupal’s online documentation is © 2000-2014 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0.
PHP code from Drupal.org is distributed under the GNU General Public License.
Drupal® is a registered trademark of Dries Buytaert.
Text quoted from Wikipedia for educational purposes is made available under the Creative Commons Attribution-ShareAlike License.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Site developed by Webel IT Australia.