created); $this->key = sha1($this->id . ':' . session_id() . ':' . $this->soundfilename); $this->url = $this->id . '/' . parent::url_slug($this->title) . '?auth=' . $this->key; if($this->program != 0) { $this->program = new \Model\Program(['id' => $this->program, 'name' => $data->program_name, 'description' => $data->program_description]); } } public function isValidAuth($key) { return ($key == $this->key); } public function getSoundfile() { return '/tmp/podcast.mp3'; } public function excerpt() { $hasImages = count($this->images) > 0; $maxLength = $hasImages ? 200 : 500; return '

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

'; } }