Guest User

Untitled

a guest
May 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?
  2.  
  3. class Editables {
  4.  
  5. public $title;
  6. public $subtitle;
  7. public $content;
  8. public $friendlyName;
  9.  
  10. public function __construct ($title, $subtitle, $content, $friendlyName) {
  11. $this->title = $title;
  12. $this->subtitle = $subtitle;
  13. $this->content = $content;
  14. $this->friendlyName = $friendlyName;
  15. }
  16.  
  17. public function write() {
  18. $str .= "<h1>{$this->title}</h1>";
  19. $str .= "<h2>{$this->subtitle}</h2>";
  20. $str .= "<p>{$this->content}</p>";
  21. $str .= "Friendly name: ";
  22. $str .= "{$this->friendlyName}";
  23. echo "$str";
  24. }
  25. }
  26.  
  27. $editable1 = new Editables ("My First Editables", "Let's give this a try.", "This is my first editable. It is awesome and long. I can do whatever I want inside of it. Look at it go.", "FirstEditables.php");
  28.  
  29. $editable1->write();
  30.  
  31. ?>
Add Comment
Please, Sign In to add comment