public function getTitle() { $checkOrder = array($this->title, $this->providerName, $this->description, $this->authorName); foreach ($checkOrder as $property) { if (!empty($property)) { return $property; } } return $this->url; }