Edit via SFTP
  1. <?php
  2. // NOTE: This is already a sort of vaguely-HTMLish page because it (optionally) does DOCTYPE.
  3. abstract class fcPage extends fcPageElement {
  4. #use ftRenderableTree, ftExecutableTree; // 2020-12-11 should be redundant now
  5.  
  6. // ++ EXECUTION ++ //
  7.  
  8. public function DoBuilding() { $this->DoEvent(KI_NODE_EVENT_DO_BUILDING); }
  9. public function DoFiguring() { $this->DoEvent(KI_NODE_EVENT_DO_FIGURING); }
  10. public function DoOutput() : void { echo $this->Render(); }
  11.  
  12. // -- EXECUTION -- //
  13. // ++ CLASSES ++ //
  14.  
  15. protected function DocTypeClass() : string { return 'fcpeDocType'; }
  16.  
  17. // -- CLASSES -- //
  18. // ++ NODES ++ //
  19.  
  20. protected function DocTypeNode() { return $this->Spawn($this->DocTypeClass()); }
  21.  
  22. // -- NODES -- //
  23. // ++ I/O ++ //
  24.  
  25. abstract public function AddContentString(string $s);
  26. abstract public function DoStashedRedirect(string $url);
  27. /*----
  28.   CEMENT
  29.   NOTE: All of a Page's contents are subnodes; it has none aside from that.
  30.   */
  31. public function Render() : string { return $this->RenderNodes(); }
  32.  
  33. // -- I/O -- //
  34.  
  35. }
  36.