X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=8e8938febc51be2e975ee26a794e3121db9a04a8;hb=15de709b89d48179caf67fe73d0626b83fa555fe;hp=a5b968397c7058c72b7c94d59664a90f2f73e3b8;hpb=2a431b580f2e8f6a596e84175932e793678cde63;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index a5b968397c..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); + } }