Re: arrangement of class functions

From: Date: Thu, 24 Apr 2003 07:08:20 +0000
Subject: Re: arrangement of class functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145121@lists.php.net to get a copy of this message
"Prince" <friendly@kaltelnet.net> a écrit dans le message news: 009501c30a0e$0d5378e0$2904a40c@andy... > hi... > was just wondering if there was any particular way functions should be > arranged in a class or doesnt it really matter? i came up with some ideas > but dont really know what way is any better than the other... i could do > alphebetic a-z or z-a, by type of function, by what the function does and > all sorts of things i can come up with... just what one is the better one of > them... For example, a convention is to name the private functions with a '_' at the beginning class myclass { // public function function set_something() { ... $this->_internal_check(); ... } // private function function _internal_check() { } } Regards, Philippe

« previous php.general (#145121) next »