note 51648 deleted from language.oop5.autoload by felipe

From: Date: Mon, 24 Mar 2008 22:31:50 +0000
Subject: note 51648 deleted from language.oop5.autoload by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137486@lists.php.net to get a copy of this message
Note Submitter: erikzoltan NOSPAM at comcast dot net ---- When using __autoload you'll have one class in each file. I have developed the habit of placing a UML class diagram at the top of each file. It's extremely helpful when you start to work with a large number of classes, especially if you're part of a team. And it's easy to do. <?php /* |--------------------------------| | MyExample : SomethingElse | |--------------------------------| | +$FirstProperty | | +$SecondProperty: array | | -$ThirdProperty | |--------------------------------| | +new MyExample() | | #ClassMethod($a,$b,$c): number | | +DoSomething() | | -SomethingElse() | |--------------------------------| */ class MyExample extends SomethingElse { public $FirstProperty; public $SecondProperty = array(); private $ThirdProperty; public __constructor() { } public static function ClassMethod($a, $b, $c) { return $a+$b+$c; } public function DoSomething() { } private function SomethingElse() { } } ?> Of course you have to maintain the UML comments along with your classes. (I'm planning to use reflection to automate this process in the future so that issue will soon disappear.)

« previous php.notes (#137486) next »