for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Graze\CiffRenderer\Field\Parser;
class ParserFixedText extends AbstractParser
{
/**
* @return float
*/
public function getFontSize()
return (float) $this->xmlField->Text->Font->Pitch;
}
* @return string
public function getFontFace()
return (string) $this->xmlField->Text->Font->Face;
* @return int
public function getOrientation()
return (int) $this->xmlField->Orientation;
public function getText()
$text = '';
foreach ($this->xmlField->Data->Object as $object) {
// @codingStandardsIgnoreStart
if ($object->SrcField) {
// Field is a merge field, fetch text from source field
$sourceFieldName = (string) $object->SrcField->attributes()->SrcFieldName;
$sourceField = $this->getParserManager()->getParser($sourceFieldName);
$fieldText = $sourceField->getText();
} else {
$fieldText = (string) $object->Default;
// @codingStandardsIgnoreEnd
$text .= $fieldText;
return $text;