for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Mapper for mapping data between raw input and an Aperture VO
*
* @category PHPExif
* @copyright Copyright (c) 2016 Tom Van Herreweghe <[email protected]>
* @license http://github.com/PHPExif/php-exif-exiftool/blob/master/LICENSE MIT License
* @link http://github.com/PHPExif/php-exif-exiftool for the canonical source repository
* @package Exiftool
*/
namespace PHPExif\Adapter\Exiftool\Reader\Mapper\Exif;
use PHPExif\Common\Data\ExifInterface;
use PHPExif\Common\Data\ValueObject\Aperture;
use PHPExif\Common\Mapper\FieldMapper;
use PHPExif\Common\Mapper\GuardInvalidArgumentsForExifTrait;
* Mapper
* @package Common
class ApertureFieldMapper implements FieldMapper
{
use GuardInvalidArgumentsForExifTrait;
* {@inheritDoc}
public function getSupportedFields()
return array(
Aperture::class,
);
}
public function mapField($field, array $input, &$output)
$this->guardInvalidArguments($field, $input, $output);
if (!array_key_exists('composite:aperture', $input)) {
return;
$aperture = new Aperture(
$input['composite:aperture']
$output = $output->withAperture($aperture);