/** * generate output for one backend * * @param IEntity $entity * @return array */ protected function generate(IEntity $entity) { $data = []; $properties = Utility::getPublicProperties($entity); foreach ($properties as $key => $value) { $getter = 'get' . ucfirst($key); $value = $entity->{$getter}(); $this->setProperty($data, strtolower($key), $value); } return $data; }
/** * checks if current object contains null values * * @return boolean */ public function doesContainNullValues() { return in_array(null, Utility::getPublicProperties($this)); }