]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseEntity.php
ET translation updated THX Rain Hawk
[friendica.git] / src / BaseEntity.php
index a5b968397c7058c72b7c94d59664a90f2f73e3b8..2ee22b1bb0da93056aa1b7d27e0a5a6f1fb20fb7 100644 (file)
@@ -53,4 +53,18 @@ abstract class BaseEntity extends BaseDataTransferObject
 
                return $this->$name;
        }
+
+       /**
+        * @param $name
+        * @return bool
+        * @throws HTTPException\InternalServerErrorException
+        */
+       public function __isset($name)
+       {
+               if (!property_exists($this, $name)) {
+                       throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' in Entity ' . static::class);
+               }
+
+               return !empty($this->$name);
+       }
 }