protected function fillXml($imageData, $pathInfo, $timestamp)
    {
        // <?xml version="1.0" encoding="utf-8"
        // <ezimage serial_number="1" is_valid="1" filename="River-Boat.jpg" suffix="jpg" basename="River-Boat" dirpath="var/ezdemo_site/storage/images/travel/peruvian-amazon/river-boat/322-1-eng-US" url="var/ezdemo_site/storage/images/travel/peruvian-amazon/river-boat/322-1-eng-US/River-Boat.jpg" original_filename="bbbbc2fe.jpg" mime_type="image/jpeg" width="770" height="512" alternative_text="Old River Boat" alias_key="1293033771" timestamp="1342530101">
        //   <original attribute_id="322" attribute_version="1" attribute_language="eng-US"/>
        //   <information Height="512" Width="770" IsColor="1"/>
        // </ezimage>
        $xml = <<<EOT
<?xml version="1.0" encoding="utf-8"?>
<ezimage serial_number="1" is_valid="%s" filename="%s"
    suffix="%s" basename="%s" dirpath="%s" url="%s"
    original_filename="%s" mime_type="%s" width="%s"
    height="%s" alternative_text="%s" alias_key="%s" timestamp="%s">
  <original attribute_id="%s" attribute_version="%s" attribute_language="%s"/>
  <information Height="%s" Width="%s" IsColor="%s"/>
</ezimage>
EOT;

        return sprintf(
            $xml,
            // <ezimage>
            ($pathInfo['basename'] !== '' ? '1' : ''), // is_valid="%s"
            htmlspecialchars($pathInfo['basename']), // filename="%s"
            htmlspecialchars($pathInfo['extension']), // suffix="%s"
            htmlspecialchars($pathInfo['filename']), // basename="%s"
            htmlspecialchars($pathInfo['dirname']), // dirpath
            htmlspecialchars($imageData['uri']), // url
            htmlspecialchars($pathInfo['basename']), // @todo: Needs original file name, for whatever reason?
            htmlspecialchars($imageData['mime']), // mime_type
            htmlspecialchars($imageData['width']), // width
            htmlspecialchars($imageData['height']), // height
            htmlspecialchars($imageData['alternativeText']), // alternative_text
            htmlspecialchars(1293033771), // alias_key, fixed for the original image
            htmlspecialchars($timestamp), // timestamp
            // <original>
            $imageData['fieldId'],
            $imageData['versionNo'],
            $imageData['languageCode'],
            // <information>
            $imageData['height'], // Height
            $imageData['width'], // Width
            1 // IsColor @todo Do we need to fix that here?
        );
    }
protected function fillXml($imageData, $pathInfo, $timestamp)
    {
        // <?xml version="1.0" encoding="utf-8"
        // <ezimage serial_number="1" is_valid="1" filename="River-Boat.jpg" suffix="jpg" basename="River-Boat" dirpath="var/ezdemo_site/storage/images/travel/peruvian-amazon/river-boat/322-1-eng-US" url="var/ezdemo_site/storage/images/travel/peruvian-amazon/river-boat/322-1-eng-US/River-Boat.jpg" original_filename="bbbbc2fe.jpg" mime_type="image/jpeg" width="770" height="512" alternative_text="Old River Boat" alias_key="1293033771" timestamp="1342530101">
        //   <original attribute_id="322" attribute_version="1" attribute_language="eng-US"/>
        //   <information Height="512" Width="770" IsColor="1"/>
        // </ezimage>
        $xml = <<<EOT
<?xml version="1.0" encoding="utf-8"?>
<ezimage serial_number="1" is_valid="%s" filename="%s"
    suffix="%s" basename="%s" dirpath="%s" url="%s"
    original_filename="%s" mime_type="%s" width="%s"
    height="%s" alternative_text="%s" alias_key="%s" timestamp="%s">
  <original attribute_id="%s" attribute_version="%s" attribute_language="%s"/>
  <information Height="%s" Width="%s" IsColor="%s"/>
</ezimage>
EOT;

        return sprintf(
            $xml,
            // <ezimage>
            ($pathInfo['basename'] !== '' ? '1' : ''), // is_valid="%s"
            htmlspecialchars($pathInfo['basename']), // filename="%s"
            htmlspecialchars($pathInfo['extension']), // suffix="%s"
            htmlspecialchars($pathInfo['filename']), // basename="%s"
            htmlspecialchars($pathInfo['dirname']), // dirpath
            htmlspecialchars($imageData['uri']), // url
            htmlspecialchars($pathInfo['basename']), // @todo: Needs original file name, for whatever reason?
            htmlspecialchars($imageData['mime']), // mime_type
            htmlspecialchars($imageData['width']), // width
            htmlspecialchars($imageData['height']), // height
            htmlspecialchars($imageData['alternativeText']), // alternative_text
            htmlspecialchars(1293033771), // alias_key, fixed for the original image
            htmlspecialchars($timestamp), // timestamp
            // <original>
            $imageData['fieldId'],
            $imageData['versionNo'],
            $imageData['languageCode'],
            // <information>
            $imageData['height'], // Height
            $imageData['width'], // Width
            1 // IsColor @todo Do we need to fix that here?
        );
    }
protected function fillXml ( $ imageData , $ pathInfo , $ timestamp ) { // <?xml version="1.0" encoding="utf-8" // <ezimage serial_number="1" is_valid="1" filename="River-Boat.jpg" suffix="jpg" basename="River-Boat" dirpath="var/ezdemo_site/storage/images/travel/peruvian-amazon/river-boat/322-1-eng-US" url="var/ezdemo_site/storage/images/travel/peruvian-amazon/river-boat/322-1-eng-US/River-Boat.jpg" original_filename="bbbbc2fe.jpg" mime_type="image/jpeg" width="770" height="512" alternative_text="Old River Boat" alias_key="1293033771" timestamp="1342530101"> //   <original attribute_id="322" attribute_version="1" attribute_language="eng-US"/> //   <information Height="512" Width="770" IsColor="1"/> // </ezimage> $ xml =  <<<EOT
<?xml version="1.0" encoding="utf-8"?>
<ezimage serial_number="1" is_valid="%s" filename="%s"
    suffix="%s" basename="%s" dirpath="%s" url="%s"
    original_filename="%s" mime_type="%s" width="%s"
    height="%s" alternative_text="%s" alias_key="%s" timestamp="%s">
  <original attribute_id="%s" attribute_version="%s" attribute_language="%s"/>
  <information Height="%s" Width="%s" IsColor="%s"/>
</ezimage>
EOT ; return sprintf ( $ xml , // <ezimage> ( $ pathInfo [ 'basename' ] !== '' ? '1' : '' ) , // is_valid="%s" htmlspecialchars ( $ pathInfo [ 'basename' ] ) , // filename="%s" htmlspecialchars ( $ pathInfo [ 'extension' ] ) , // suffix="%s" htmlspecialchars ( $ pathInfo [ 'filename' ] ) , // basename="%s" htmlspecialchars ( $ pathInfo [ 'dirname' ] ) , // dirpath htmlspecialchars ( $ imageData [ 'uri' ] ) , // url htmlspecialchars ( $ pathInfo [ 'basename' ] ) , // @todo: Needs original file name, for whatever reason? htmlspecialchars ( $ imageData [ 'mime' ] ) , // mime_type htmlspecialchars ( $ imageData [ 'width' ] ) , // width htmlspecialchars ( $ imageData [ 'height' ] ) , // height htmlspecialchars ( $ imageData [ 'alternativeText' ] ) , // alternative_text htmlspecialchars ( 1293033771 ) , // alias_key, fixed for the original image htmlspecialchars ( $ timestamp ) , // timestamp // <original> $ imageData [ 'fieldId' ] , $ imageData [ 'versionNo' ] , $ imageData [ 'languageCode' ] , // <information> $ imageData [ 'height' ] , // Height $ imageData [ 'width' ] , // Width 1 // IsColor @todo Do we need to fix that here? ) ; }
Fill the XML template with the data provided.

@param array $imageData
@param array $pathInfo
@param int $timestamp

@return string
Fill the XML template with the data provided .