本文整理汇总了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();
}
示例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;
}
示例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);
}
示例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;
}