Ejemplo n.º 1
0
 /**
  * Get content, if type == 'SOA' the content will be returned as an Array
  * representing the SOA values.
  *
  * @param bool $raw
  * @return mixed
  */
 public function getContent($raw = false)
 {
     if ($raw === true) {
         return $this->content;
     }
     if ($this->type == 'SOA') {
         $transformer = new SoaTransformer();
         $this->content = $transformer->transform($this->content);
     }
     return $this->content;
 }
Ejemplo n.º 2
0
 /**
  * Retransforms the content to a soa object if applicable
  */
 public function postUpdate(Records $record, LifecycleEventArgs $event)
 {
     if ($record->getType() == 'SOA') {
         $transformer = new SoaTransformer();
         $record->setContent($transformer->transform($record->getContent()));
     }
 }