photo = $photo;
}
public function setPreviousPhotoUrl($url)
{
$this->previous_photo_url = $url;
}
public function setNextPhotoUrl($url)
{
$this->next_photo_url = $url;
}
public function setIsAssetOwner($flag)
{
$this->is_asset_owner = $flag;
}
public function html_main()
{
$this->photoNav();
$this->photo();
echo '
', $this->photo->getTitle(), '
';
$this->taggedPeople();
$this->linkNewTags();
echo '
';
$this->photoMeta();
if ($this->is_asset_owner)
$this->addUserActions();
echo '
';
}
protected function photo()
{
echo '
';
}
private function photoNav()
{
if ($this->previous_photo_url)
echo '
';
else
echo '
';
if ($this->next_photo_url)
echo '
';
else
echo '
';
}
private function photoMeta()
{
echo '
EXIF
';
if (!empty($this->exif->created_timestamp))
echo '
- Date Taken
- ', date("j M Y, H:i:s", $this->exif->created_timestamp), '
';
echo '
- Uploaded by
- ', $this->photo->getAuthor()->getfullName(), '
';
if (!empty($this->exif->camera))
echo '
- Camera Model
- ', $this->exif->camera, '
';
if (!empty($this->exif->shutter_speed))
echo '
- Shutter Speed
- ', $this->exif->shutterSpeedFraction(), '
';
if (!empty($this->exif->aperture))
echo '
- Aperture
- f/', number_format($this->exif->aperture, 1), '
';
if (!empty($this->exif->focal_length))
echo '
- Focal Length
- ', $this->exif->focal_length, ' mm
';
if (!empty($this->exif->iso))
echo '
- ISO Speed
- ', $this->exif->iso, '
';
if (!empty($this->exif->software))
echo '
- Software
- ', $this->exif->software, '
';
echo '
';
}
private function taggedPeople()
{
echo '
Tags
';
foreach ($this->photo->getTags() as $tag)
{
echo '
-
', $tag->tag, '';
if ($tag->kind === 'Person')
echo '
❌';
echo '
';
}
echo '
';
}
private function linkNewTags()
{
echo '
';
}
public function setExif(EXIF $exif)
{
$this->exif = $exif;
}
public function addUserActions()
{
echo '
';
}
}