public function location() { if (!is_null($this->location)) { return $this->location; } // check for valid exif data if (!is_array($this->data)) { return null; } // initialize and return it return $this->location = new Exif\Location($this->data); }