コード例 #1
0
ファイル: Yeast.php プロジェクト: georgeh/php-beerxml
 /**
  * @{inheritDoc}
  */
 protected function additionalFields()
 {
     $amountIsWeight = $this->record->getAmountIsWeight();
     if (!is_null($amountIsWeight)) {
         $this->xmlWriter->writeElement('AMOUNT_IS_WEIGHT', $this->boolToString($amountIsWeight));
     }
     $addToSecondary = $this->record->getAddToSecondary();
     if (!is_null($addToSecondary)) {
         $this->xmlWriter->writeElement('ADD_TO_SECONDARY', $this->boolToString($addToSecondary));
     }
     if ($this->record instanceof $this->displayInterface) {
         $cultureDate = $this->record->getCultureDate();
         if ($cultureDate instanceof \DateTime) {
             $this->xmlWriter->writeElement('CULTURE_DATE', $cultureDate->format('d M y'));
         }
     }
     parent::additionalFields();
 }