X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=8e8938febc51be2e975ee26a794e3121db9a04a8;hb=22952f88ca6aec54240038fb5484dd35b9369841;hp=a5b968397c7058c72b7c94d59664a90f2f73e3b8;hpb=befc2af5043a3afde251721c0d27df695db1bb7e;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); + } }