X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=8e8938febc51be2e975ee26a794e3121db9a04a8;hb=d32b9d5d95a750ab049257c3289959fe88f0984f;hp=66acab1bb0eb4d42d2a8872ba1f4dcdea34507d4;hpb=199f72ee3cd3c2ef7edfafa1d5a36a365bad93ad;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index 66acab1bb0..8e8938febc 100644 --- a/src/BaseEntity.php +++ b/src/BaseEntity.php @@ -1,6 +1,6 @@ $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); + } }