Simple class layout template.


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.