PHPExiftool\Writer::addMetadatasArg PHP Метод

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
    protected function addMetadatasArg(MetadataBag $metadatas)
    {
        $command = ' ';
        if ($this->modules & self::MODULE_MWG) {
            $command .= ' -use MWG';
        }
        foreach ($metadatas as $metadata) {
            foreach ($metadata->getValue()->asArray() as $value) {
                $command .= ' -' . $metadata->getTag()->getTagname() . '=' . escapeshellarg($value);
            }
        }
        return $command;
    }

Usage Example

Пример #1
0
 public function addMetadatasArgTester($metadatas)
 {
     return parent::addMetadatasArg($metadatas);
 }