Ferreteria/v2/class/fcPage

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Ferreteria‎ | v2‎ | class
Jump to: navigation, search

Calls

Code

// NOTE: This is already a sort of vaguely-HTMLish page because it (optionally) does DOCTYPE.
abstract class fcPage extends fcPageElement {
    use ftRenderableTree, ftExecutableTree;
    
    // ++ EXECUTION ++ //
    
    public function DoBuilding() {
	$this->DoEvent(KI_NODE_EVENT_DO_BUILDING);
    }
    public function DoFiguring() {
	$this->DoEvent(KI_NODE_EVENT_DO_FIGURING);
    }
    public function DoOutput() {
	echo $this->Render();
    }

    // -- EXECUTION -- //
    // ++ CLASSES ++ //
    
    protected function DocTypeClass() {
	return 'fcpeDocType';
    }
    
    // -- CLASSES -- //
    // ++ NODES ++ //
    
    protected function DocTypeNode() {
	return $this->Spawn($this->DocTypeClass());
    }

    // -- NODES -- //
    // ++ I/O ++ //
    
    abstract public function AddContentString($s);
    abstract public function DoStashedRedirect($url);
    /*----
      CEMENT
      NOTE: All of a Page's contents are subnodes; it has none aside from that.
    */
    public function Render() {
	return $this->RenderNodes();
    }

    // -- I/O -- //

}