本文整理汇总了PHP中GetInt4d函数的典型用法代码示例。如果您正苦于以下问题:PHP GetInt4d函数的具体用法?PHP GetInt4d怎么用?PHP GetInt4d使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetInt4d函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __readPropertySets
function __readPropertySets()
{
$offset = 0;
while ($offset < strlen($this->entry)) {
$d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE);
$nameSize = ord($d[SIZE_OF_NAME_POS]) | ord($d[SIZE_OF_NAME_POS + 1]) << 8;
$type = ord($d[TYPE_POS]);
$startBlock = GetInt4d($d, START_BLOCK_POS);
$size = GetInt4d($d, SIZE_POS);
$name = '';
for ($i = 0; $i < $nameSize; $i++) {
$name .= $d[$i];
}
$name = str_replace("", "", $name);
$this->props[] = array('name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size);
if (strtolower($name) == "workbook" || strtolower($name) == "book") {
$this->wrkbook = count($this->props) - 1;
}
if ($name == "Root Entry") {
$this->rootentry = count($this->props) - 1;
}
$offset += PROPERTY_STORAGE_BLOCK_SIZE;
}
}
示例2: __readPropertySets
public function __readPropertySets()
{
$offset = 0;
//var_dump($this->entry);
while ($offset < strlen($this->entry)) {
$d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE);
$nameSize = ord($d[SIZE_OF_NAME_POS]) | ord($d[SIZE_OF_NAME_POS + 1]) << 8;
$type = ord($d[TYPE_POS]);
//$maxBlock = strlen($d) / BIG_BLOCK_SIZE - 1;
$startBlock = GetInt4d($d, START_BLOCK_POS);
$size = GetInt4d($d, SIZE_POS);
$name = '';
for ($i = 0; $i < $nameSize; ++$i) {
$name .= $d[$i];
}
$name = str_replace("", '', $name);
$this->props[] = array('name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size);
if ($name == 'Workbook' || $name == 'Book') {
$this->wrkbook = count($this->props) - 1;
}
if ($name == 'Root Entry') {
$this->rootentry = count($this->props) - 1;
}
//echo "name ==$name=\n";
$offset += PROPERTY_STORAGE_BLOCK_SIZE;
}
}