public function getScalarRepresentationOf(TableElement $table) { try { return $this->renderersByClasses->fetchValueByObjects([$table])->getScalarRepresentationOf($table); } catch (ValueNotFound $e) { throw new UnableToGetScalarRepresentation(); } }
public function getTextBasedOn($input) { if (!is_object($input)) { throw new UnableToGetText("only objects are supported"); } try { return $this->textualRepresentationOfClasses->fetchValueByObjects([$input]); } catch (ValueNotFound $e) { throw new UnableToGetText(sprintf("%s is not supported", get_class($input))); } }