note 56680 added to function.aggregate-methods

From: Date: Mon, 12 Sep 2005 10:27:18 +0000
Subject: note 56680 added to function.aggregate-methods
Groups: php.notes 
Request: Send a blank email to php-notes+get-95045@lists.php.net to get a copy of this message
Just a note: aggregate_methods doesn't aggregate those methods already defined in the class, including those methods inherited from a parent class. Here's an example: - If class B inherits from class A and aggregates methods from class C: <?php class A { function foo() { echo 'from class A'; } } class B extends A { function B() { aggregate_methods($this,'C'); } } class C { function foo() { echo 'from class C'; } } $myclass = new B(); $myclass->foo(); // This will print 'from class A' ?> ---- Manual Page -- http://www.php.net/manual/en/function.aggregate-methods.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56680 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56680&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56680&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56680&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56680&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56680&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56680&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56680&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95045) next »