本文整理汇总了PHP中Transform::readUInt32BE方法的典型用法代码示例。如果您正苦于以下问题:PHP Transform::readUInt32BE方法的具体用法?PHP Transform::readUInt32BE怎么用?PHP Transform::readUInt32BE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transform
的用法示例。
在下文中一共展示了Transform::readUInt32BE方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ID3v2 tag.
*
* @param Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($reader === null) {
return;
}
$offset = $this->_reader->getOffset();
$this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE());
/* ID3v2.3.0 ExtendedHeader */
if (isset($this->_options["version"]) && $this->_options["version"] < 4) {
if ($this->_reader->readUInt16BE() == 0x8000) {
$this->_flags = self::CRC32;
}
$this->_padding = $this->_reader->readUInt32BE();
if ($this->hasFlag(self::CRC32)) {
$this->_crc = Transform::readUInt32BE();
}
} else {
$this->_reader->skip(1);
$this->_flags = $this->_reader->readInt8();
if ($this->hasFlag(self::UPDATE)) {
$this->_reader->skip(1);
}
if ($this->hasFlag(self::CRC32)) {
$this->_reader->skip(1);
$this->_crc = Transform::fromInt8($this->_reader->read(1)) * (0xfffffff + 1) + decodeSynchsafe32(Transform::fromUInt32BE($this->_reader->read(4)));
}
if ($this->hasFlag(self::RESTRICTED)) {
$this->_reader->skip(1);
$this->_restrictions = $this->_reader->readInt8(1);
}
}
}