Ferreteria/v0.6/clade/Config/Style/@removed/List
< Ferreteria | v0.6 | clade | Config | Style | @removed(Redirected from Ferreteria/v0.6/clade/IO/O/Style/List)
Jump to navigation
Jump to search
|
The item documented here has been removed and is no longer in use.
|
Code
Entire contents, as deleted on 2026-01-26:
<?php namespace Woozalia\Ferret\IO\O\Style;
/**
* PURPOSE: common iface for list styles - any medium
* HISTORY:
* 2025-02-05 started
* 2025-07-02 rethinking how list-styles work
* 2026-01-25 belatedly adding missing ClsSlug() static function to make this actually work
*/
/* Base* [ca,i] */ use Woozalia\Ferret\Config\{ caStyle as BaseClass, iStyle as BaseIface };
interface iList extends BaseIface {
function ListPrefix() : string;
function ListSuffix() : string;
function ItemPrefix() : string;
function ItemSuffix() : string;
function IndentText() : string;
function EmptyList() : string;
}
abstract class caList extends BaseClass implements iList {
static public function ClsSlug() : string { return 'block.list'; }
/* 2025-07-02 might use this in the Viewer
public function RenderAsLines(array $ar) : string {
if (count($ar) === 0) {
$sOut = $this->EmptyList();
} else {
$s = '';
foreach ($ar as $sVal) {
if ($s !== '') {
$s .= $this->AsLineSep();
}
$s .= $this->RenderItem($sVal);
}
$sOut = ($s === '') ? '' : ($this->AsLinePfx() . $s . $this->AsLineSfx());
}
return $sOut;
}
public function RenderInLine(array $ar) : string {
if (count($ar) === 0) {
$sOut = $this->EmptyList();
} else {
$s = '';
foreach ($ar as $sVal) {
if ($s !== '') {
$s .= $this->InLineSep();
}
$s .= $this->RenderItem($sVal);
}
$sOut = ($s === '') ? '' : ($this->InLinePfx() . $s . $this->InLineSfx());
}
return $sOut;
}
*/
}