当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Io_Writer::writeGuid方法代码示例

本文整理汇总了PHP中Zend_Io_Writer::writeGuid方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Io_Writer::writeGuid方法的具体用法?PHP Zend_Io_Writer::writeGuid怎么用?PHP Zend_Io_Writer::writeGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Io_Writer的用法示例。


在下文中一共展示了Zend_Io_Writer::writeGuid方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     if ($this->getSize() == 0) {
         $this->setSize(24);
     }
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->write(str_pad('', $this->getSize() - 24, ""));
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:13,代码来源:Padding.php

示例2: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $objectsWriter = new Zend_Io_StringWriter();
     foreach ($this->getObjects() as $objects) {
         foreach ($objects as $object) {
             $object->write($objectsWriter);
         }
     }
     $this->setSize(24 + 22 + $objectsWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeGuid($this->_reserved1)->writeUInt16LE($this->_reserved2)->writeUInt32LE($objectsWriter->getSize())->write($objectsWriter->toString());
 }
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:17,代码来源:HeaderExtension.php

示例3: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $commandTypes = array();
     foreach ($this->_commands as $command) {
         if (!in_array($command['type'], $commandTypes)) {
             $commandTypes[] = $command['type'];
         }
     }
     $commandTypesCount = count($commandTypes);
     $commandTypesWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $commandTypesCount; $i++) {
         $commandTypesWriter->writeUInt16LE(strlen($commandType = iconv($this->getOption('encoding'), 'utf-16le', $commandTypes[$i])) / 2)->write($commandType);
     }
     $commandsCount = count($this->_commands);
     $commandsWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $commandsCount; $i++) {
         $commandsWriter->writeUInt32LE($this->_commands[$i]['presentationTime'])->writeUInt16LE(array_search($this->_commands[$i]['type'], $commandTypes))->writeUInt16LE(strlen($command = iconv($this->getOption('encoding'), 'utf-16le', $this->_commands[$i]['name'])) / 2)->write($command);
     }
     $this->setSize(24 + 20 + $commandTypesWriter->getSize() + $commandsWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeGuid($this->_reserved)->writeUInt16LE($commandsCount)->writeUInt16LE($commandTypesCount)->write($commandTypesWriter->toString())->write($commandsWriter->toString());
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:28,代码来源:ScriptCommand.php

示例4: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $bitrateRecordsCount = count($this->_bitrateRecords);
     $this->setSize(24 + 2 + $bitrateRecordsCount * 6);
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeUInt16LE($bitrateRecordsCount);
     for ($i = 0; $i < $bitrateRecordsCount; $i++) {
         $writer->writeUInt16LE($this->_bitrateRecords[$i]['flags'] << 5 | $this->_bitrateRecords[$i]['streamNumber'] & 0x1f)->writeUInt32LE($this->_bitrateRecords[$i]['averageBitrate']);
     }
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:15,代码来源:StreamBitrateProperties.php

示例5: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $objectsWriter = new Zend_Io_StringWriter();
     foreach ($this->getObjects() as $objects) {
         foreach ($objects as $object) {
             $object->write($objectsWriter);
         }
     }
     $this->setSize(24 + 6 + $objectsWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeUInt32LE($this->getObjectCount())->writeInt8($this->_reserved1)->writeInt8($this->_reserved2)->write($objectsWriter->toString());
 }
开发者ID:jreinert,项目名称:RuneUI,代码行数:18,代码来源:Header.php

示例6: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $typeSpecificData = new Zend_Io_StringWriter();
     switch ($this->_streamType) {
         case self::AUDIO_MEDIA:
             $typeSpecificData->writeUInt16LE($this->_typeSpecificData['codecId'])->writeUInt16LE($this->_typeSpecificData['numberOfChannels'])->writeUInt32LE($this->_typeSpecificData['samplesPerSecond'])->writeUInt32LE($this->_typeSpecificData['avgNumBytesPerSecond'])->writeUInt16LE($this->_typeSpecificData['blockAlignment'])->writeUInt16LE($this->_typeSpecificData['bitsPerSample'])->writeUInt16LE(strlen($this->_typeSpecificData['codecSpecificData']))->write($this->_typeSpecificData['codecSpecificData']);
             break;
         case self::VIDEO_MEDIA:
             $typeSpecificData->writeUInt32LE($this->_typeSpecificData['encodedImageWidth'])->writeUInt32LE($this->_typeSpecificData['encodedImageHeight'])->writeInt8($this->_typeSpecificData['reservedFlags'])->writeUInt16LE(0)->writeUInt32LE(38 + strlen($this->_typeSpecificData['codecSpecificData']))->writeUInt32LE($this->_typeSpecificData['imageWidth'])->writeUInt32LE($this->_typeSpecificData['imageHeight'])->writeUInt16LE($this->_typeSpecificData['reserved'])->writeUInt16LE($this->_typeSpecificData['bitsPerPixelCount'])->writeUInt32LE($this->_typeSpecificData['compressionId'])->writeUInt32LE($this->_typeSpecificData['imageSize'])->writeUInt32LE($this->_typeSpecificData['horizontalPixelsPerMeter'])->writeUInt32LE($this->_typeSpecificData['verticalPixelsPerMeter'])->writeUInt32LE($this->_typeSpecificData['colorsUsedCount'])->writeUInt32LE($this->_typeSpecificData['importantColorsCount'])->write($this->_typeSpecificData['codecSpecificData']);
             break;
         case self::JFIF_MEDIA:
             $typeSpecificData->writeUInt32LE($this->_typeSpecificData['imageWidth'])->writeUInt32LE($this->_typeSpecificData['imageHeight'])->writeUInt32LE(0);
             break;
         case self::DEGRADABLE_JPEG_MEDIA:
             $typeSpecificData->writeUInt32LE($this->_typeSpecificData['imageWidth'])->writeUInt32LE($this->_typeSpecificData['imageHeight'])->writeUInt16LE(0)->writeUInt16LE(0)->writeUInt16LE(0);
             $interchangeDataSize = strlen($this->_typeSpecificData['interchangeData']);
             if ($interchangeDataSize == 1) {
                 $interchangeDataSize = 0;
             }
             $typeSpecificData->writeUInt16LE($interchangeDataSize)->write($this->_typeSpecificData['interchangeData']);
             break;
         case self::FILE_TRANSFER_MEDIA:
             // break intentionally omitted
         // break intentionally omitted
         case self::BINARY_MEDIA:
             $typeSpecificData->writeGuid($this->_typeSpecificData['majorMediaType'])->writeGuid($this->_typeSpecificData['mediaSubtype'])->writeUInt32LE($this->_typeSpecificData['fixedSizeSamples'])->writeUInt32LE($this->_typeSpecificData['temporalCompression'])->writeUInt32LE($this->_typeSpecificData['sampleSize'])->writeGuid($this->_typeSpecificData['formatType'])->writeUInt32LE(strlen($this->_typeSpecificData['formatData']))->write($this->_typeSpecificData['formatData']);
             break;
         case self::COMMAND_MEDIA:
             // break intentionally omitted
         // break intentionally omitted
         default:
             break;
     }
     $errorCorrectionData = new Zend_Io_StringWriter();
     switch ($this->_errorCorrectionType) {
         case self::AUDIO_SPREAD:
             $errorCorrectionData->writeInt8($this->_errorCorrectionData['span'])->writeUInt16LE($this->_errorCorrectionData['virtualPacketLength'])->writeUInt16LE($this->_errorCorrectionData['virtualChunkLength'])->writeUInt16LE(strlen($this->_errorCorrectionData['silenceData']))->write($this->_errorCorrectionData['silenceData']);
             break;
         case self::NO_ERROR_CORRECTION:
             // break intentionally omitted
         // break intentionally omitted
         default:
             break;
     }
     $this->setSize(24 + 54 + $typeSpecificData->getSize() + $errorCorrectionData->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeGuid($this->_streamType)->writeGuid($this->_errorCorrectionType)->writeInt64LE($this->_timeOffset)->writeUInt32LE($typeSpecificData->getSize())->writeUInt32LE($errorCorrectionData->getSize())->writeUInt16LE($this->_flags)->writeUInt32LE($this->_reserved)->write($typeSpecificData->toString())->write($errorCorrectionData->toString());
 }
开发者ID:adam-fonseca,项目名称:RuneUI,代码行数:54,代码来源:StreamProperties.php

示例7: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $priorityRecordCount = count($this->_priorityRecords);
     $this->setSize(24 + 2 + $priorityRecordCount * 4);
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeUInt16LE($priorityRecordCount);
     for ($i = 0; $i < $priorityRecordCount; $i++) {
         $writer->writeUInt16LE($this->_priorityRecords[$i]['streamNumber'])->writeUInt16LE($this->_priorityRecords[$i]['flags']);
     }
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:15,代码来源:StreamPrioritization.php

示例8: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $this->setSize(24 + 2);
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeUInt8($this->_profile)->writeUInt8($this->_mode);
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:11,代码来源:Compatibility.php

示例9: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $descriptionRecordsCount = count($this->_descriptionRecords);
     $descriptionRecordsWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $descriptionRecordsCount; $i++) {
         $descriptionRecordsWriter->writeUInt16LE(0)->writeUInt16LE($this->_descriptionRecords[$i]['streamNumber'])->writeUInt16LE(strlen($name = iconv($this->getOption('encoding'), 'utf-16le', $this->_descriptionRecords[$i]['name']) . ""));
         if (is_string($this->_descriptionRecords[$i]['data'])) {
             /* There is no way to distinguish byte arrays from unicode
              * strings and hence the need for a list of fields of type byte
              * array */
             static $byteArray = array('');
             // TODO: Add to the list if you encounter one
             if (in_array($name, $byteArray)) {
                 $descriptionRecordsWriter->writeUInt16LE(1)->writeUInt32LE(strlen($this->_descriptionRecords[$i]['data']))->write($name)->write($this->_descriptionRecords[$i]['data']);
             } else {
                 $value = iconv($this->getOption('encoding'), 'utf-16le', $this->_descriptionRecords[$i]['data']);
                 $value = $value ? $value . "" : '';
                 $descriptionRecordsWriter->writeUInt16LE(0)->writeUInt32LE(strlen($value))->write($name)->writeString16($value);
             }
         } else {
             if (is_bool($this->_descriptionRecords[$i]['data'])) {
                 $descriptionRecordsWriter->writeUInt16LE(2)->writeUInt32LE(2)->write($name)->writeUInt16LE($this->_descriptionRecords[$i]['data'] ? 1 : 0);
             } else {
                 if (is_int($this->_descriptionRecords[$i]['data'])) {
                     $descriptionRecordsWriter->writeUInt16LE(3)->writeUInt32LE(4)->write($name)->writeUInt32LE($this->_descriptionRecords[$i]['data']);
                 } else {
                     if (is_float($this->_descriptionRecords[$i]['data'])) {
                         $descriptionRecordsWriter->writeUInt16LE(4)->writeUInt32LE(8)->write($name)->writeInt64LE($this->_descriptionRecords[$i]['data']);
                     } else {
                         // Invalid value and there is nothing to be done
                         throw new Zend_Media_Asf_Exception('Invalid data type');
                     }
                 }
             }
         }
     }
     $this->setSize(24 + 2 + $descriptionRecordsWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeUInt16LE($descriptionRecordsCount)->write($descriptionRecordsWriter->toString());
 }
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:45,代码来源:Metadata.php

示例10: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $languageIdRecordsCount = count($this->_languages);
     $languageIdRecordsWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $languageIdRecordsCount; $i++) {
         $languageIdRecordsWriter->writeInt8(strlen($languageId = iconv($this->getOption('encoding'), 'utf-16le', $this->_languages[$i]) . ""))->writeString16($languageId);
     }
     $this->setSize(24 + 2 + $languageIdRecordsWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeUInt16LE($languageIdRecordsCount)->write($languageIdRecordsWriter->toString());
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:17,代码来源:LanguageList.php

示例11: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $name = iconv($this->getOption('encoding'), 'utf-16le', $this->_name) . "";
     $markersCount = count($this->_markers);
     $markersWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $markersCount; $i++) {
         $markersWriter->writeInt64LE($this->_markers[$i]['offset'])->writeInt64LE($this->_markers[$i]['presentationTime'])->writeUInt16LE(12 + ($descriptionLength = strlen($description = iconv('utf-16le', $this->getOption('encoding'), $this->_markers[$i]['description']) . "")))->writeUInt32LE($this->_markers[$i]['sendTime'])->writeUInt32LE($this->_markers[$i]['flags'])->writeUInt32LE($descriptionLength)->writeString16($description);
     }
     $this->setSize(24 + 24 + strlen($name) + $markersWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeGuid($this->_reserved1)->writeUInt32LE($markersCount)->writeUInt16LE($this->_reserved2)->writeUInt16LE(strlen($name))->writeString16($name)->write($markersWriter->toString());
 }
开发者ID:adam-fonseca,项目名称:RuneUI,代码行数:18,代码来源:Marker.php

示例12: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $title = iconv($this->getOption('encoding'), 'utf-16le', $this->_title ? $this->_title . "" : '');
     $author = iconv($this->getOption('encoding'), 'utf-16le', $this->_author ? $this->_author . "" : '');
     $copyright = iconv($this->getOption('encoding'), 'utf-16le', $this->_copyright ? $this->_copyright . "" : '');
     $description = iconv($this->getOption('encoding'), 'utf-16le', $this->_description ? $this->_description . "" : '');
     $rating = iconv($this->getOption('encoding'), 'utf-16le', $this->_rating ? $this->_rating . "" : '');
     require_once 'Zend/Io/StringWriter.php';
     $buffer = new Zend_Io_StringWriter();
     $buffer->writeUInt16LE(strlen($title))->writeUInt16LE(strlen($author))->writeUInt16LE(strlen($copyright))->writeUInt16LE(strlen($description))->writeUInt16LE(strlen($rating))->writeString16($title)->writeString16($author)->writeString16($copyright)->writeString16($description)->writeString16($rating);
     $this->setSize(24 + $buffer->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->write($buffer->toString());
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:19,代码来源:ContentDescription.php

示例13: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $streamNameCount = count($this->_streamNames);
     $streamNameWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $streamNameCount; $i++) {
         $streamNameWriter->writeUInt16LE($this->_streamNames['languageIndex'])->writeUInt16LE(strlen($streamName = iconv($this->getOption('encoding'), 'utf-16le', $this->_streamNames['streamName']) . ""))->writeString16($streamName);
     }
     $payloadExtensionSystemCount = count($this->_payloadExtensionSystems);
     $payloadExtensionSystemWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $payloadExtensionSystemCount; $i++) {
         $payloadExtensionSystemWriter->writeGuid($this->_streamNames['extensionSystemId'])->writeUInt16LE($this->_streamNames['extensionDataSize'])->writeUInt16LE(strlen($extensionSystemInfo = iconv($this->getOption('encoding'), 'utf-16le', $this->_streamNames['extensionSystemInfo']) . ""))->writeString16($extensionSystemInfo);
     }
     $this->setSize(24 + 64 + $streamNameWriter->getSize() + $payloadExtensionSystemWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeInt64LE($this->_startTime)->writeInt64LE($this->_endTime)->writeUInt32LE($this->_dataBitrate)->writeUInt32LE($this->_bufferSize)->writeUInt32LE($this->_initialBufferFullness)->writeUInt32LE($this->_alternateDataBitrate)->writeUInt32LE($this->_alternateBufferSize)->writeUInt32LE($this->_alternateInitialBufferFullness)->writeUInt32LE($this->_maximumObjectSize)->writeUInt32LE($this->_flags)->writeUInt16LE($this->_streamNumber)->writeUInt16LE($this->_streamLanguageIndex)->writeInt64LE($this->_averageTimePerFrame)->writeUInt16LE($streamNameCount)->writeUInt16LE($payloadExtensionSystemCount)->write($streamNameWriter->toString())->write($payloadExtensionSystemWriter->toString());
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:22,代码来源:ExtendedStreamProperties.php

示例14: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $buffer = new Zend_Io_StringWriter();
     $buffer->writeUInt32LE($this->_bannerImageType)->writeUInt32LE(count($this->_bannerImageData))->write($this->_bannerImageData)->writeUInt32LE(count($this->_bannerImageUrl))->write($this->_bannerImageUrl)->writeUInt32LE(count($this->_copyrightUrl))->write($this->_copyrightUrl);
     $this->setSize(24 + $buffer->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->write($buffer->toString());
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:14,代码来源:ContentBranding.php

示例15: write

 /**
  * Writes the object data.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     require_once 'Zend/Io/StringWriter.php';
     $recordCount = count($this->_records);
     $recordWriter = new Zend_Io_StringWriter();
     for ($i = 0; $i < $recordCount; $i++) {
         $recordWriter->writeUInt16LE($streamNumbersCount = count($this->_records[$i]));
         for ($j = 0; $j < $streamNumbersCount; $j++) {
             $recordWriter->writeUInt16LE($this->_records[$i][$j]['streamNumbers']);
         }
     }
     $this->setSize(24 + $recordWriter->getSize());
     $writer->writeGuid($this->getIdentifier())->writeInt64LE($this->getSize())->writeGuid($this->_exclusionType)->writeUInt16LE($recordCount)->write($recordWriter->toString());
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:20,代码来源:GroupMutualExclusion.php


注:本文中的Zend_Io_Writer::writeGuid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。