modifs.mineures sans commentaires
This commit is contained in:
parent
b97515782b
commit
fbc70cb834
|
@ -7,12 +7,8 @@ use nulib\cl;
|
|||
* Class content: gestionnaire de contenu (statique ou dynamique)
|
||||
*/
|
||||
class content {
|
||||
/**
|
||||
* quoter $vs si c'est un scalaire. sinon retourner le tableau tel quel
|
||||
*
|
||||
* NB: cette méthode est accessible via la fonction globale {@link q()}
|
||||
*/
|
||||
static final function q($contents): iterable {
|
||||
/** quoter $vs si c'est un scalaire. sinon retourner le tableau tel quel */
|
||||
static final function quote($contents): iterable {
|
||||
if ($contents === null || $contents === false) return [];
|
||||
elseif ($contents instanceof IContent) return [$contents];
|
||||
elseif ($contents instanceof IPrintable) return [$contents];
|
||||
|
|
|
@ -16,7 +16,7 @@ class ATag implements IStaticContent {
|
|||
function getContent(): iterable {
|
||||
return [
|
||||
"<$this->tag>",
|
||||
...content::q($this->contents),
|
||||
...content::quote($this->contents),
|
||||
"</$this->tag>",
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue