return true;
} public function replaceRepresentation(Representation
$rep, ?int
$pos = null
): void
{ if (null ===
$pos) { $this->representations
[$rep->
getName()] =
$rep;
} else { $this->
removeRepresentation($rep);
$this->
addRepresentation($rep,
$pos);
} } /**
* @param Representation|string $rep
*/
public function removeRepresentation($rep): void
{ if ($rep instanceof Representation
) { unset($this->representations
[$rep->
getName()]);
} else { // String