X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=2ee22b1bb0da93056aa1b7d27e0a5a6f1fb20fb7;hb=903d829f4988592c102495eab82d523d7d093300;hp=66acab1bb0eb4d42d2a8872ba1f4dcdea34507d4;hpb=a6423031eba1236127160ced3028e36401f40536;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index 66acab1bb0..2ee22b1bb0 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); + } }