Ejemplo n.º 1
0
 public function __get($property)
 {
     switch ($property) {
         case 'contentInfo':
             return $this->content->contentInfo;
         case 'id':
             return $this->content->id;
         case 'versionInfo':
             return $this->getVersionInfo();
         case 'fields':
             return $this->getFields();
     }
     return parent::__get($property);
 }
Ejemplo n.º 2
0
 /**
  * Magic getter for retrieving convenience properties.
  *
  * @param string $property The name of the property to retrieve
  *
  * @return mixed
  */
 public function __get($property)
 {
     switch ($property) {
         case 'contentInfo':
             return $this->getVersionInfo()->getContentInfo();
         case 'id':
             $versionInfo = $this->getVersionInfo();
             if (empty($versionInfo)) {
                 return null;
             }
             return $versionInfo->getContentInfo()->id;
         case 'versionInfo':
             return $this->getVersionInfo();
         case 'fields':
             return $this->getFields();
     }
     return parent::__get($property);
 }