PHP 클래스 PHPExiftool\Writer

Example usage : $Writer = new Writer(); $metadatas = new MetadataBag(); $metadata->add(new Metadata(new IPTC\ObjectName(), Value\Mono('Super title !'))); writes the metadatas to the file $Writer->writes('image.jpg', $metadatas); writes the metadatas to image_copied.jpg $Writer->writes('image.jpg', $metadatas, 'image_copied.jpg');
파일 보기 프로젝트 열기: romainneutron/PHPExiftool 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$erase
$mode
$modules

공개 메소드들

메소드 설명
__construct ( Exiftool $exiftool )
create ( Psr\Log\LoggerInterface $logger ) : Writer Factory for standard Writer
erase ( boolean $boolean, boolean $maintainICCProfile = false ) If set to true, erase all metadatas before write
hasModule ( integer $module ) : boolean Return true if the module is enabled
isMode ( integer $mode ) : boolean Return true if the mode is enabled
reset ( )
setMode ( integer $mode, boolean $active ) : Writer Enable / Disable modes
setModule ( integer $module, boolean $active ) : Writer Enable / disable module.
write ( string $file, MetadataBag $metadatas, string $destination = null ) : integer Writes metadatas to the file. If a destination is provided, original file is not modified.

보호된 메소드들

메소드 설명
addMetadatasArg ( MetadataBag $metadatas ) : string Computes modes, modules and metadatas to a single commandline
getSyncCommand ( )

메소드 상세

__construct() 공개 메소드

public __construct ( Exiftool $exiftool )
$exiftool Exiftool

addMetadatasArg() 보호된 메소드

Computes modes, modules and metadatas to a single commandline
protected addMetadatasArg ( MetadataBag $metadatas ) : string
$metadatas PHPExiftool\Driver\Metadata\MetadataBag A Bag of metadatas
리턴 string A part of the command

create() 공개 정적인 메소드

Factory for standard Writer
public static create ( Psr\Log\LoggerInterface $logger ) : Writer
$logger Psr\Log\LoggerInterface
리턴 Writer

erase() 공개 메소드

If set to true, erase all metadatas before write
public erase ( boolean $boolean, boolean $maintainICCProfile = false )
$boolean boolean Whether to erase metadata or not before writing.
$maintainICCProfile boolean Whether to maintain or not ICC Profile in case of erasing metadata.

getSyncCommand() 보호된 메소드

protected getSyncCommand ( )

hasModule() 공개 메소드

Return true if the module is enabled
public hasModule ( integer $module ) : boolean
$module integer
리턴 boolean

isMode() 공개 메소드

Return true if the mode is enabled
public isMode ( integer $mode ) : boolean
$mode integer One of the self::MODE_*
리턴 boolean True if the mode is enabled

reset() 공개 메소드

public reset ( )

setMode() 공개 메소드

Enable / Disable modes
public setMode ( integer $mode, boolean $active ) : Writer
$mode integer One of the self::MODE_*
$active boolean Enable or disable the mode
리턴 Writer

setModule() 공개 메소드

There's currently only one module self::MODULE_MWG
public setModule ( integer $module, boolean $active ) : Writer
$module integer One of the self::MODULE_*
$active boolean Enable or disable the module
리턴 Writer

write() 공개 메소드

Writes metadatas to the file. If a destination is provided, original file is not modified.
public write ( string $file, MetadataBag $metadatas, string $destination = null ) : integer
$file string The input file
$metadatas PHPExiftool\Driver\Metadata\MetadataBag A bag of metadatas
$destination string The output file
리턴 integer the number of file written

프로퍼티 상세

$erase 보호되어 있는 프로퍼티

protected $erase

$mode 보호되어 있는 프로퍼티

protected $mode

$modules 보호되어 있는 프로퍼티

protected $modules