Beispiel #1
0
 /**
  * Universal getter
  *
  * @param string $property
  *
  * @return mixed|null Returns NULL if it is impossible to get the property
  */
 public function getterProperty($property)
 {
     $result = parent::getterProperty($property);
     if (!isset($result)) {
         $addressField = static::getAddressFieldByServiceName($property);
         if ($addressField) {
             $addressFieldValue = $this->getFieldValue($property);
             $result = $addressFieldValue ? $addressFieldValue->getValue() : static::getDefaultFieldPlainValue($property);
         } else {
             // Log wrong access to property
             $this->logWrongAddressPropertyAccess($property);
         }
     }
     return $result;
 }