photo = $photo; } public function html_main() { $this->photoNav(); $this->photo(); echo '

', $this->photo->getTitle(), '

'; $this->taggedPeople(); $this->linkNewTags(); echo '
'; $this->photoMeta(); $this->userActions(); echo '
'; } protected function photo() { echo '
'; if ($this->photo->isPortrait()) { echo '
', $this->photo->getInlineImage(null, 960, 'normal-photo'), $this->photo->getInlineImage(null, 960, 'blur-photo'), '
'; } else { $className = $this->photo->isPanorama() ? 'panorama-figure' : 'landscape-figure'; echo '
', $this->photo->getInlineImage(1280, null, 'normal-photo'), $this->photo->getInlineImage(1280, null, 'blur-photo'), '
'; } echo '
'; } public function setTag(Tag $tag) { $this->tag = $tag; } private function photoNav() { if ($previousUrl = $this->photo->getUrlForPreviousInSet($this->tag)) echo ' '; else echo ' '; if ($nextUrl = $this->photo->getUrlForNextInSet($this->tag)) 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

'; } private function linkNewTags() { echo '

Link tags

'; } public function setExif(EXIF $exif) { $this->exif = $exif; } public function userActions() { if (!$this->photo->isOwnedBy(Registry::get('user'))) return; echo '

Actions

Edit photo Delete photo
'; } }