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


PHP Transform::toUInt8方法代码示例

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


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

示例1: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_description, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
       "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_description) . "\0\0";
     break;
   default:
     $data .= $this->_description . "\0";
   }
   $this->setData($data . $this->_link);
   return ID3_Frame::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:25,代码来源:WXXX.php

示例2: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = $this->_device . "\0";
   foreach ($this->_adjustments as $channel) {
     $data .= Transform::toInt8($channel[self::channelType]) .
       Transform::toInt16BE($channel[self::volumeAdjustment] * 512);
     if (abs($channel[self::peakVolume]) <= 0xff)
       $data .= Transform::toInt8(8) .
         Transform::toUInt8($channel[self::peakVolume]);
     else if (abs($channel[self::peakVolume]) <= 0xffff)
       $data .= Transform::toInt8(16) .
         Transform::toUInt16BE($channel[self::peakVolume]);
     else if (abs($channel[self::peakVolume]) <= 0xffffffff)
       $data .= Transform::toInt8(32) .
         Transform::toUInt32BE($channel[self::peakVolume]);
     else
       $data .= Transform::toInt8(64) .
         Transform::toInt64BE($channel[self::peakVolume]); // UInt64
   }
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:27,代码来源:RVA2.php

示例3: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_currency .
     $this->_price . "\0" . $this->_date . $this->_contact . "\0" .
     Transform::toUInt8($this->_delivery);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $order = $this->_encoding == self::UTF16 ?
       Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER;
     $data .= Transform::toString16($this->_seller, $order) . "\0\0" .
       Transform::toString16($this->_description, $order) . "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE
       ($this->_seller . "\0\0" . $this->_description . "\0\0");
     break;
   default:
     $data .= $this->_seller . "\0" . $this->_description . "\0";
   }
   parent::setData
     ($data . ($this->_mimeType ?
               $this->_mimeType . "\0" . $this->_imageData : ""));
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:30,代码来源:COMR.php

示例4: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   parent::setData
     ($this->_owner . "\0" . Transform::toUInt8($this->_group) .
      $this->_groupData);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:12,代码来源:GRID.php

示例5: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_format);
   foreach ($this->_events as $timestamp => $tempo) {
     if ($tempo >= 0xff)
       $data .= Transform::toUInt8(0xff) . Transform::toUInt8($tempo - 0xff);
     else
       $data .= Transform::toUInt8($tempo);
     $data .= Transform::toUInt32BE($timestamp);
   }
   parent::setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:18,代码来源:SYTC.php

示例6: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_currency .
     $this->_price . "\0" . $this->_date;
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_seller, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER);
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_seller);
     break;
   default:
     $data .= $this->_seller;
   }
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:25,代码来源:OWNE.php

示例7: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_language .
     Transform::toUInt8($this->_format) . Transform::toUInt8($this->_type);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_description, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
       "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_description) . "\0\0";
     break;
   default:
     $data .= $this->_description . "\0";
   }
   foreach ($this->_events as $timestamp => $syllable) {
     switch ($this->_encoding) {
     case self::UTF16:
     case self::UTF16LE:
       $data .= Transform::toString16
         ($syllable, $this->_encoding == self::UTF16 ?
          Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
         "\0\0";
       break;
     case self::UTF16BE:
       $data .= Transform::toString16BE($syllable) . "\0\0";
       break;
     default:
       $data .= $syllable . "\0";
     }
     $data .= Transform::toUInt32BE($timestamp);
   }
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:43,代码来源:SYLT.php

示例8: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_mimeType . "\0";
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $order = $this->_encoding == self::UTF16 ?
       Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER;
     $data .= Transform::toString16($this->_filename, $order) . "\0\0" .
       Transform::toString16($this->_description, $order) . "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE
       ($this->_filename . "\0\0" . $this->_description . "\0\0");
     break;
   default:
     $data .= $this->_filename . "\0" . $this->_description . "\0";
   }
   $this->setData($data . $this->_objectData);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:26,代码来源:GEOB.php

示例9: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_language;
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_text, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER);
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_text);
     break;
   default:
     $data .= $this->_text;
   }
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:24,代码来源:USER.php

示例10: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $array = $this->_text;
     foreach ($array as &$text)
       $text = Transform::toString16($text);
     $data .= Transform::toString16
       (implode("\0\0", $array), $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER);
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE(implode("\0\0", $this->_text));
     break;
   default:
     $data .= implode("\0", $this->_text);
   }
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:27,代码来源:AbstractText.php

示例11: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_format);
   foreach ($this->_events as $timestamp => $type)
     $data .= Transform::toUInt8($type) . Transform::toUInt32BE($timestamp);
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:13,代码来源:ETCO.php

示例12: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding);
   $order = $this->_encoding == self::UTF16 ?
     Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER;
   foreach ($this->_people as $entry) {
     foreach ($entry as $key => $val) {
       switch ($this->_encoding) {
       case self::UTF16:
       case self::UTF16LE:
         $data .= Transform::toString16($key, $order) . "\0\0" .
                  Transform::toString16($val, $order) . "\0\0";
         break;
       case self::UTF16BE:
         $data .= Transform::toString16BE($key . "\0\0" . $val . "\0\0");
         break;
       default:
         $data .= $key . "\0" . $val . "\0";
       }
     }
   }
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:29,代码来源:IPLS.php

示例13: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $this->setData
     (Transform::toUInt16BE($this->_reverbLeft) .
      Transform::toUInt16BE($this->_reverbRight) .
      Transform::toUInt8($this->_reverbBouncesLeft) .
      Transform::toUInt8($this->_reverbBouncesRight) .
      Transform::toUInt8($this->_reverbFeedbackLtoL) .
      Transform::toUInt8($this->_reverbFeedbackLtoR) .
      Transform::toUInt8($this->_reverbFeedbackRtoR) .
      Transform::toUInt8($this->_reverbFeedbackRtoL) .
      Transform::toUInt8($this->_premixLtoR) .
      Transform::toUInt8($this->_premixRtoL));
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:20,代码来源:RVRB.php

示例14: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_mimeType . "\0" .
     Transform::toUInt8($this->_imageType);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_description, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
       "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_description) . "\0\0";
     break;
   default:
     $data .= $this->_description . "\0";
   }
   parent::setData($data . $this->_imageData);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:26,代码来源:APIC.php

示例15: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $this->setData
     (Transform::toUInt8($this->_format) .
      Transform::toUInt32BE($this->_position));
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:12,代码来源:POSS.php


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