<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
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);
+ }
}