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


PHP Zend_Io_Writer::writeUInt8方法代码示例

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


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

示例1: writeRecordHeaderByte

 /**
  * 
  * @param int $local_message_type
  * @param bool $is_definition
  * @param bool $is_normal_header
  * @return \Fit\Writer
  */
 protected function writeRecordHeaderByte($local_msg_type, $is_definition = false, $is_normal_header = true)
 {
     //write definition record
     //write definition record header byte
     $header_bits = array_merge(array_slice(self::inttobar($local_msg_type), 0, 4), array(false, false, (bool) $is_definition, false === (bool) $is_normal_header));
     $this->writer->writeUInt8(self::bartoint($header_bits));
     return $this;
 }
开发者ID:alexmcroberts,项目名称:fit-php,代码行数:15,代码来源:Writer.php

示例2: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding);
     switch ($this->_encoding) {
         case self::UTF16LE:
             $writer->writeString16($this->_description, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1);
             break;
         case self::UTF16:
             // break intentionally omitted
         // break intentionally omitted
         case self::UTF16BE:
             $writer->writeString16($this->_description, null, 1);
             break;
         default:
             $writer->writeString8($this->_description, 1);
             break;
     }
     $writer->write($this->_link);
 }
开发者ID:jreinert,项目名称:RuneUI,代码行数:25,代码来源:Wxxx.php

示例3: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding)->write($this->_currency)->writeString8($this->_price, 1)->write($this->_date)->writeString8($this->_contact, 1)->writeUInt8($this->_delivery);
     switch ($this->_encoding) {
         case self::UTF16LE:
             $writer->writeString16($this->_seller, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1)->writeString16($this->_description, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1);
             break;
         case self::UTF16:
             // break intentionally omitted
         // break intentionally omitted
         case self::UTF16BE:
             $writer->writeString16($this->_seller, null, 1)->writeString16($this->_description, null, 1);
             break;
         default:
             $writer->writeString8($this->_seller, 1)->writeString8($this->_description, 1);
             break;
     }
     if ($this->_mimeType) {
         $writer->writeString8($this->_mimeType, 1)->write($this->_imageData);
     }
 }
开发者ID:adam-fonseca,项目名称:RuneUI,代码行数:27,代码来源:Comr.php

示例4: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding);
     switch ($this->_encoding) {
         case self::UTF16LE:
             $count = count($this->_text);
             for ($i = 0; $i < $count; $i++) {
                 $writer->writeString16($this->_text, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, $i == $count ? null : 1);
             }
             break;
         case self::UTF16:
             // break intentionally omitted
         // break intentionally omitted
         case self::UTF16BE:
             $writer->write(implode("", $this->_text));
             break;
         default:
             $writer->write(implode("", $this->_text));
             break;
     }
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:27,代码来源:TextFrame.php

示例5: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_format);
     foreach ($this->_events as $timestamp => $type) {
         $writer->writeUInt8($type)->writeUInt32BE($timestamp);
     }
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:13,代码来源:Etco.php

示例6: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_group)->write($this->_signature);
 }
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:10,代码来源:Sign.php

示例7: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding)->write($this->_currency)->writeString8($this->_price, 1)->write($this->_date);
     switch ($this->_encoding) {
         case self::UTF16LE:
             $writer->writeString16($this->_seller, Zend_Io_Writer::LITTLE_ENDIAN_ORDER);
             break;
         case self::UTF16:
             // break intentionally omitted
         // break intentionally omitted
         case self::UTF16BE:
             $writer->writeString16($this->_seller);
             break;
         default:
             $writer->writeString8($this->_seller);
             break;
     }
 }
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:24,代码来源:Owne.php

示例8: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_format)->writeUInt32BE($this->_position);
 }
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:10,代码来源:Poss.php

示例9: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding);
     foreach ($this->_people as $entry) {
         foreach ($entry as $key => $val) {
             switch ($this->_encoding) {
                 case self::UTF16LE:
                     $writer->writeString16($key, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1)->writeString16($val, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1);
                     break;
                 case self::UTF16:
                     // break intentionally omitted
                 // break intentionally omitted
                 case self::UTF16BE:
                     $writer->writeString16($key, null, 1)->writeString16($val, null, 1);
                     break;
                 default:
                     $writer->writeString8($key, 1)->writeString8($val, 1);
                     break;
             }
         }
     }
 }
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:28,代码来源:Ipls.php

示例10: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_format);
     foreach ($this->_events as $timestamp => $tempo) {
         if ($tempo >= 0xff) {
             $writer->writeUInt8(0xff)->writeUInt8($tempo - 0xff);
         } else {
             $writer->writeUInt8($tempo);
         }
         $writer->writeUInt32BE($timestamp);
     }
 }
开发者ID:adam-fonseca,项目名称:RuneUI,代码行数:18,代码来源:Sytc.php

示例11: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding)->write($this->_language);
     switch ($this->_encoding) {
         case self::UTF16LE:
             $writer->writeString16($this->_text, Zend_Io_Writer::LITTLE_ENDIAN_ORDER);
             break;
         case self::UTF16:
             // break intentionally omitted
         // break intentionally omitted
         case self::UTF16BE:
             // break intentionally omitted
         // break intentionally omitted
         default:
             $writer->write($this->_text);
             break;
     }
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:24,代码来源:LanguageTextFrame.php

示例12: _writeData

 /**
  * Writes the frame raw data without the header.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 protected function _writeData($writer)
 {
     $writer->writeUInt8($this->_encoding)->write($this->_language)->writeUInt8($this->_format)->writeUInt8($this->_type);
     switch ($this->_encoding) {
         case self::UTF16LE:
             $writer->writeString16($this->_description, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1);
             break;
         case self::UTF16:
             // break intentionally omitted
         // break intentionally omitted
         case self::UTF16BE:
             $writer->writeString16($this->_description, null, 1);
             break;
         default:
             $writer->writeString8($this->_description, 1);
             break;
     }
     foreach ($this->_events as $timestamp => $syllable) {
         switch ($this->_encoding) {
             case self::UTF16LE:
                 $writer->writeString16($syllable, Zend_Io_Writer::LITTLE_ENDIAN_ORDER, 1);
                 break;
             case self::UTF16:
                 // break intentionally omitted
             // break intentionally omitted
             case self::UTF16BE:
                 $writer->writeString16($syllable, null, 1);
                 break;
             default:
                 $writer->writeString8($syllable, 1);
                 break;
         }
         $writer->writeUInt32BE($timestamp);
     }
 }
开发者ID:google-code-backups,项目名称:php-reader,代码行数:41,代码来源:Sylt.php

示例13: write

 /**
  * Writes the header/footer data without the identifier.
  *
  * @param Zend_Io_Writer $writer The writer object.
  * @return void
  */
 public function write($writer)
 {
     $writer->writeUInt8(floor($this->_version))->writeUInt8(($this->_version - floor($this->_version)) * 10)->writeUInt8($this->_flags)->writeUInt32BE($this->_encodeSynchsafe32($this->_size));
 }
开发者ID:adam-fonseca,项目名称:RuneUI,代码行数:10,代码来源:Header.php


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