public function getTextBasedOn($input)
 {
     if (is_null($this->actualGenerator)) {
         throw new UnableToGetText("trying to use an empty simple proxy");
     }
     return $this->actualGenerator->getTextBasedOn($input);
 }
 public function getTextBasedOn($input)
 {
     try {
         return $this->decoratedGenerator->getTextBasedOn($input);
     } catch (UnableToGetText $e) {
         return $this->defaultText;
     }
 }
 protected function convertToScalarImpl(Aggregator $aggregator)
 {
     try {
         /* @var $aggregator PropertyList */
         return array_map(function (ComparableProperty $p) {
             return $this->propertyAsText->getTextBasedOn($p);
         }, $aggregator->getProperties());
     } catch (UnableToGetText $e) {
         throw new UnableToPresent('unable to convert a property to text');
     }
 }
 protected function putDataHeldByAggregator(Aggregator $a, DOMElement $destination)
 {
     /* @var $a PropertyList */
     $this->setLabelAttribute($destination, $a);
     try {
         foreach ($a->getProperties() as $property) {
             $destination->appendChild($destination->ownerDocument->createElement("value", $this->propertyAsText->getTextBasedOn($property)));
         }
     } catch (UnableToGetText $e) {
         throw new UnableToCreateXml("unable to convert a property to text");
     }
 }
 protected function getTextBasedOnObject($object)
 {
     /* @var $object ProjectionAggregator */
     return $this->projectorToText->getTextBasedOn($object->getUsedProjector());
 }
 protected function getTextBasedOnObject($object)
 {
     /* @var $object Percentage */
     return sprintf("(%s)/(%s)", $this->requirementAsText->getTextBasedOn($object->getNumeratorRequirement()), $this->requirementAsText->getTextBasedOn($object->getDenominatorRequirement()));
 }
 protected function getTextBasedOnObject($object)
 {
     /* @var $object PropertyList */
     return $this->propertyReaderToTextConverter->getTextBasedOn($object->getPropertyReader());
 }