本文整理汇总了PHP中Reader::readGUID方法的典型用法代码示例。如果您正苦于以下问题:PHP Reader::readGUID方法的具体用法?PHP Reader::readGUID怎么用?PHP Reader::readGUID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reader
的用法示例。
在下文中一共展示了Reader::readGUID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs the class with given parameters and options.
*
* @param Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader, &$options = array())
{
$this->_reader = $reader;
$this->_options = $options;
$this->_offset = $this->_reader->getOffset();
$this->_id = $this->_reader->readGUID();
$this->_size = $this->_reader->readInt64LE();
}
示例2: nextObject
/**
* Returns the next ASF object or <var>false</var> if end of stream has been
* reached. Returned objects are of the type ASF_Object or of any of its child
* types.
*
* @todo Only the ASF_Header_Object top level object is regognized.
* @return ASF_Object
*/
public function nextObject()
{
$object = false;
if ($this->hasObjects()) {
$guid = $this->_reader->readGUID();
$size = $this->_reader->readInt64LE();
$offset = $this->_reader->getOffset();
switch ($guid) {
case "75b22630-668e-11cf-a6d9-00aa0062ce6c":
/* ASF_Header_Object */
$object = new ASF_HeaderObject($this->_reader, $guid, $size);
break;
default:
$object = new ASF_Object($this->_reader, $guid, $size);
}
$this->_reader->setOffset($offset - 24 + $size);
}
return $object;
}
示例3: __construct
/**
* Constructs the class with given parameters and options.
*
* @param Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader, &$options = array())
{
if (($this->_reader = $reader) === null) {
$this->_type = strtolower(substr(get_class($this), -4));
} else {
$this->_offset = $this->_reader->getOffset();
$this->_size = $this->_reader->readUInt32BE();
$this->_type = $this->_reader->read(4);
if ($this->_size == 1)
$this->_size = $this->_reader->readInt64BE();
if ($this->_size == 0)
$this->_size = $this->_reader->getSize() - $this->_offset;
if ($this->_type == "uuid")
$this->_type = $this->_reader->readGUID();
}
$this->_options = $options;
}