public function getCoverSource($size = ComPhotosDomainEntityPhoto::SIZE_SQUARE)
    {
        $cover = $this->photos->order('photoSets.ordering')->fetch();
        $filename = $cover->filename;

        //get file extension
        $extension = explode('.', $filename);
        $extension = array_pop($extension);

        //remove file extension
        $name = preg_replace('#\.[^.]*$#', '', $filename);
        $filename = $name.'_'.$size.'.'.$extension;

        return $this->owner->getPathURL('com_photos/'.$filename);
    }
public function getCoverSource($size = ComPhotosDomainEntityPhoto::SIZE_SQUARE)
    {
        $cover = $this->photos->order('photoSets.ordering')->fetch();
        $filename = $cover->filename;

        //get file extension
        $extension = explode('.', $filename);
        $extension = array_pop($extension);

        //remove file extension
        $name = preg_replace('#\.[^.]*$#', '', $filename);
        $filename = $name.'_'.$size.'.'.$extension;

        return $this->owner->getPathURL('com_photos/'.$filename);
    }
public function getCoverSource ( $ size = ComPhotosDomainEntityPhoto :: SIZE_SQUARE ) { $ cover = $ this -> photos -> order ( 'photoSets.ordering' ) -> fetch ( ) ; $ filename = $ cover -> filename ; //get file extension $ extension = explode ( '.' , $ filename ) ; $ extension = array_pop ( $ extension ) ; //remove file extension $ name = preg_replace ( '#\.[^.]*$#' , '' , $ filename ) ; $ filename = $ name . '_' . $ size . '.' . $ extension ; return $ this -> owner -> getPathURL ( 'com_photos/' . $ filename ) ; }
Obtains the image file source.

@return string path to image source

@param $size photo size. One of the constan sizes in the ComPhotosDomainEntityPhoto class
Obtains the image file source .