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


PHP Transform::toString8方法代码示例

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


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

示例1: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $this->setData(Transform::toString8(substr($this->_target, 0, 4), 4) . $this->_url . "" . $this->_qualifier);
     return parent::__toString();
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:10,代码来源:LINK.php

示例2: __toString

  /**
   * Returns the frame raw data.
   *
   * @return string
   */
  public function __toString()
  {
    /* ID3v2.3.0 Flags; convert from 2.4.0 format */
    if ($this->getOption("version", 4) < 4) {
      $flags = 0;
      if ($this->hasFlag(self::DISCARD_ON_TAGCHANGE))
        $flags = $flags | 0x8000;
      if ($this->hasFlag(self::DISCARD_ON_FILECHANGE))
        $flags = $flags | 0x4000;
      if ($this->hasFlag(self::READ_ONLY))
        $flags = $flags | 0x2000;
      if ($this->hasFlag(self::COMPRESSION))
        $flags = $flags | 0x80;
      if ($this->hasFlag(self::ENCRYPTION))
        $flags = $flags | 0x40;
      if ($this->hasFlag(self::GROUPING_IDENTITY))
        $flags = $flags | 0x20;
    }

    /* ID3v2.4.0 Flags */
    else
      $flags = $this->_flags;
    
    $size = $this->_size;
    if ($this->getOption("version", 4) < 4)
      $data = $this->_data;
    else {
      $data = $this->encodeUnsynchronisation($this->_data);
      if (($dataLength = strlen($data)) != $size) {
        $size = 4 + $dataLength;
        $data = Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) .
          $data;
        $flags |= self::DATA_LENGTH_INDICATOR | self::UNSYNCHRONISATION;
        $this->setOption("unsyncronisation", true);
      }
    }
    return Transform::toString8(substr($this->_identifier, 0, 4), 4) .
      Transform::toUInt32BE($this->encodeSynchsafe32($size)) .
      Transform::toUInt16BE($flags) . $data;
  }
开发者ID:rtdean93,项目名称:therock,代码行数:45,代码来源:Frame.php

示例3: __toString

 /**
  * Returns the tag raw data.
  *
  * @return string
  */
 private function __toString()
 {
   return "TAG" .
     Transform::toString8(substr($this->_title,  0, 30), 30) .
     Transform::toString8(substr($this->_artist, 0, 30), 30) .
     Transform::toString8(substr($this->_album,  0, 30), 30) .
     Transform::toString8(substr($this->_year,   0,  4),  4) .
     ($this->_track ?
      Transform::toString8(substr($this->_comment, 0, 28), 28) .
      "\0" . Transform::toInt8($this->_track) :
      Transform::toString8(substr($this->_comment, 0, 30), 30)) .
     Transform::toInt8($this->_genre);
 }
开发者ID:rtdean93,项目名称:therock,代码行数:18,代码来源:ID3v1.php

示例4: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     /* ID3v2.3.0 Flags; convert from 2.4.0 format */
     if (isset($this->_options["version"]) && $this->_options["version"] < 4) {
         $flags = 0;
         if ($this->hasFlag(self::DISCARD_ON_TAGCHANGE)) {
             $flags = $flags | 0x8000;
         }
         if ($this->hasFlag(self::DISCARD_ON_FILECHANGE)) {
             $flags = $flags | 0x4000;
         }
         if ($this->hasFlag(self::READ_ONLY)) {
             $flags = $flags | 0x2000;
         }
         if ($this->hasFlag(self::COMPRESSION)) {
             $flags = $flags | 0x80;
         }
         if ($this->hasFlag(self::ENCRYPTION)) {
             $flags = $flags | 0x40;
         }
         if ($this->hasFlag(self::GROUPING_IDENTITY)) {
             $flags = $flags | 0x20;
         }
     } else {
         $flags = $this->_flags;
     }
     return Transform::toString8(substr($this->_identifier, 0, 4), 4) . Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) . Transform::toUInt16BE($flags) . $this->_data;
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:33,代码来源:Frame.php


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