Posted By

StrawMan on 08/25/09


Tagged

class php layout


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

joet3ch
umang_nine
gregorio
abbyabigale


Simple class layout template.


 / Published in: PHP
 

A simple class layout template that I always use to get me started. Nothing fancy. Just your basic structure.

  1. <?php
  2. ////////////////////////////////////
  3. //Class template.
  4. //Class description goes here.
  5. ////////////////////////////////////
  6. //Class name.
  7. class template {
  8. //Variables.
  9. public $variable;
  10. private $variable;
  11. protected $variable;
  12. ////////////////////////////
  13. //Constructor.
  14. ////////////////////////////
  15. public function __construct() {
  16. }
  17. ////////////////////////////
  18. //Public class functions.
  19. ////////////////////////////
  20. public function func_public() {
  21. }
  22. ////////////////////////////
  23. //Private class functions.
  24. ////////////////////////////
  25. private function func_private() {
  26. }
  27. ////////////////////////////
  28. //Protected class functions.
  29. ////////////////////////////
  30. protected function func_protected() {
  31. }
  32. ////////////////////////////
  33. //Destructor.
  34. ////////////////////////////
  35. public function __destruct() {
  36. }
  37. }
  38. ////////////////////////////////////
  39. ?>

Report this snippet  

You need to login to post a comment.