Abstract PHP Class Starter


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



Copy this code and paste it in your HTML
  1. <?php
  2. abstract class myAbstractClass {
  3.  
  4. //Properties must be protected
  5. protected $foo;
  6.  
  7. abstract public function __construct();
  8.  
  9. //Private methods can't be abstract; they must be either public or protected.
  10. abstract public function myfunction();
  11. }
  12. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.