Ferreteria/v0.5/@cls/caTag: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{fmt/title|Ferreteria class <code>ferret\layout\html\caTag</code>}}
{{fmt/title|Ferreteria class <code>[[../|ferret]]\{{l/ver/class|layout}}\{{l/ver/class|layout/html|html}}\caTag</code>}}
{| style="border: solid 1px grey; background: #eef;"
{| style="border: solid 1px grey; background: #eef;"
|-
|-
| {{l/ver/class|caElement}}
| {{l/ver/class|cElement}}
| &rarr; {{l/ver/class|caTag}}
| &rarr; {{l/ver/class|caTag}}
| &rarr; {{l/ver/class|caClosable}}<br> &rarr; {{l/ver/class|caUnclosed}}
|
&rarr; * \ {{l/ver/class|layout/html/tag|tag}} \ {{l/ver/class|caClosable}}<br>
&rarr; * \ {{l/ver/class|layout/html/tag|tag}} \ {{l/ver/class|caUnclosed}}
|}
|}
* '''File''': {{l/ferreteria/code|layout/page/html/tag/1.php}}
* '''File''': {{l/ferreteria/code|layout/page/html/tag/1.php}}
* '''Namespace''': {{l/ver/class|layout/html}}
==Methods==
===dispatch===
No change from {{l/ver/class|tExecutableTwig}}.
===rendering===
Adds the following:
* {{l/ver/meth|layout/event|OnRender}} unstubbed: calls {{l/ver/meth|layout/event|RenderOutput}}
* two abstract methods for rendering pieces of an HTML tag (GetTagName(), GetTagTail())
* a method to assemble a tag-opener from those two (GetTagOpen())
<syntaxhighlight lang=php>
protected function GetTagOpen() : string { /* build output from GetTagName() and GetTagTail() */ }
abstract protected function GetTagName() : string; // what goes <here></here> or <here [...] />
abstract protected function GetTagTail() : string; // attributes
</syntaxhighlight>

Latest revision as of 00:38, 23 July 2022

Ferreteria class ferret\layout\html\caTag
cElement caTag

→ * \ tag \ caClosable
→ * \ tag \ caUnclosed

Methods

dispatch

No change from tExecutableTwig.

rendering

Adds the following:

  • OnRender() unstubbed: calls RenderOutput()
  • two abstract methods for rendering pieces of an HTML tag (GetTagName(), GetTagTail())
  • a method to assemble a tag-opener from those two (GetTagOpen())
protected function GetTagOpen() : string { /* build output from GetTagName() and GetTagTail() */ }
abstract protected function GetTagName() : string; // what goes <here></here> or <here [...] />
abstract protected function GetTagTail() : string; // attributes