published); parent::ConvertToDateTime($this->edited); //$this->image = new stdClass(); //$this->image->url = ""; //$this->image->title = $this->title; } public function detailsUrl() { return "/{$this->id}/" . urlencode($this->title); } public function excerpt() { $hasImages = count($this->images) > 0; $maxLength = $hasImages ? 200 : 500; return '

' . substr($this->content, 0, $maxLength) . (strlen($this->content) > $maxLength ? '...' : '') . '

'; } }