note 59419 added to function.return
| From: | mike at uwmike dot com | Date: | Tue, 06 Dec 2005 17:25:57 +0000 |
| Subject: | note 59419 added to function.return | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99636@lists.php.net to get a copy of this message | ||
If you have a class file that's getting out of control, you can set it up like so:
<?php
class myClass {
function do_this($a, $b) { return require(myClass_do_this.php); }
function do_that($a, $b, $c) { return require(myClass_do_that.php); }
}
?>
Might not be for everyone, but it's workable, readable, and keeps the source files shorter.
----
Manual Page -- http://www.php.net/manual/en/function.return.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59419
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59419&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59419&report=yes
Search -- http://master.php.net/manage/user-notes.php