|
These examples were generated with the PHP language generator. The UML2PHP products approach is more sophisticated than this. These examples are for showing some simple transformations from UML constructs to PHP code.
Class with Superclass and inherited association:test/classPerson.php
<?php /* Copyright (C) 1999-2004 BITPlan GmbH Meerbuscher Str. 58-60 40670 Meerbusch-Osterath
Tel. +49-(0)2159/5236-0 Fax. +49-(0)2159/5236-100
generated: 22.07.2004 um 11:14
$Header$ $Id$ // // >>>{RCS-Log section}{test/classPerson.php}{S40F267160385} $Log$ Revision 1.1 2012/04/13 09:23:28 msf fixed
Revision 1.1 2004/07/22 09:30:49 wf new files
// // <<<{RCS-Log section}{test/classPerson.php}{S40F267160385} */ /** * * @package Person * DocBlock */ /** * * @package Person * DocBlock */
class Person {
// >>>{User defined global section}{::test::Person}{S40F267160385} // no implementation yet !!! // <<<{User defined global section}{::test::Person}{S40F267160385}
/** * Roles for Person */ /** * ; * @access public */ /** * check validity of myAddresses * */ public function checkValidmyAddresses($pAddress,$msg) { // >>>{check valid }{myAddresses}{S40F27375020D} // no implementation yet !!! // <<<{check valid }{myAddresses}{S40F27375020D} if ($pAddress==null) throw new Exception($msg."myAddresses(Address pAddress) called with null parameter"); if (!$pAddress instanceof Address ) throw new Exception($msg."myAddresses(Address pAddress) called with invalid parameter"); } // checkValidmyAddresses
protected $ref_myAddresses = array(); protected $ref_myAddresses_initialized = false;
/** * multi get Access function for myAddresses */ public function myAddresses() { // >>>{Multi Role Access}{myAddresses}{S40F27375020F} // no implementation yet !!! // <<<{Multi Role Access}{myAddresses}{S40F27375020F} return $this->ref_myAddresses; } // myAddresses()
/** * Add Association Access function for role */ public function addTomyAddresses($_key, $_value) { // >>>{addTo Multi Role Access}{myAddresses}{S40F27375020F} // no implementation yet !!! // <<<{addTo Multi Role Access}{myAddresses}{S40F27375020F} $this->ref_myAddresses[$_key] = $_value; } // addTomyAddresses
/** * Remove Association Access function for role */ public function removeFrommyAddresses($_key) { // >>>{removeFrom Multi Role Access}{myAddresses}{S40F27375020F} // no implementation yet !!! // <<<{removeFrom Multi Role Access}{myAddresses}{S40F27375020F} unset($this->ref_myAddresses[$_key]); } // removeFrommyAddresses
/** * Default Constructor for Person */ /** * */ function Person() { // >>>{DefaultConstructor }{Person}{S40F267160385} // no implementation yet !!! // <<<{DefaultConstructor }{Person}{S40F267160385} } // Person } // Person ?>
|
|