Replace
class Replace extends AbstractOperation
Ersetzen des Inhaltes einer Node. Zum Inhalt gehört der Wert der node und alle Kinder der Node.
Das folgende Beispiel
$html = \Alvine\Markup\Html\Fragment::getInstanceFromString('<div>123<span data-replace="456">???</span>789</div>');
echo (string) $html;
ergibt
<div>123<span data-replace="456">456</span>789</div>
Das Beispiel
<div data-replace="static:myValue"></div>
ergibt
<div>myValue</div>
Properties
protected Dataset | $dataset | from AbstractOperation | |
protected Node | $element | from AbstractOperation | |
protected Engine | $engine | from AbstractOperation |
Methods
Werte vom Typ Collection bearbeiten
Werte vom Typ Map bearbeiten
handleNumberIntern
Werte vom Typ String verarbeiten
Werte vom Typ String verarbeiten
Werte vom Typ String verarbeiten
Werte vom Typ Null verarbeiten
Werte vom Typ String verarbeiten
Wert des Arguments für die Wertefunktion ermitteln
Attribute der Engine entfernen
Details
in AbstractOperation at line 61
__construct(Engine $engine, Node $element, Dataset $dataset = null)
Neue Instanz
in AbstractOperation at line 78
protected Collection
handleCollections(string $operation, Collection $workingValue)
Werte vom Typ Collection bearbeiten
in AbstractOperation at line 114
protected Map
handleMaps(string $operation, Map $workingValue)
Werte vom Typ Map bearbeiten
in AbstractOperation at line 138
protected mixed
handleNumberIntern(array $param, number $workingValue)
handleNumberIntern
in AbstractOperation at line 198
protected mixed
handleFloat(string $operation, float $value)
Werte vom Typ String verarbeiten
in AbstractOperation at line 239
protected mixed
handleInteger(string $operation, int $value)
Werte vom Typ String verarbeiten
in AbstractOperation at line 271
protected mixed
handleBoolean(string $operation, bool $value)
Werte vom Typ String verarbeiten
in AbstractOperation at line 312
protected mixed
handleNull(string $operation, null $value)
Werte vom Typ Null verarbeiten
in AbstractOperation at line 338
protected AbstractOperation
raiseError(string $error)
in AbstractOperation at line 383
protected mixed
handleStrings(string $operation, string $value)
Werte vom Typ String verarbeiten
in AbstractOperation at line 502
string
getValue(mixed $value)
Wert holen
in AbstractOperation at line 569
protected string
getArgumentValue(string $pipedArgument)
Wert des Arguments für die Wertefunktion ermitteln
in AbstractOperation at line 595
string
getValueString(mixed $value)
Wert aus Dataset als Zeichenkette
in AbstractOperation at line 604
AbstractOperation
removeElement()
Element aus Baum entfernen
in AbstractOperation at line 624
protected AbstractOperation
removeMarkup(array $attributes)
Attribute der Engine entfernen
at line 67
Node
process(string $value)
Alle Kinder der Node durch den Wert des Attributes data-replace ersetzen.