name = $request->get('name'); $this->description = $request->get('description'); $this->generateAlias(); return $this; } public function generateAlias() { $this->url_alias = ucfirst(preg_replace('/[^a-z0-9\-]/', '-', strtolower($this->name))); } /** * @return IAlbumSource */ public function getAlbumSource() { // TODO allow albums to specify different storage locations - e.g. Amazon S3, SFTP/FTP, OpenStack return new LocalFilesystemSource(dirname(__DIR__) . '/storage/app'); } }