本文整理汇总了PHP中PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder方法的具体用法?PHP PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder怎么用?PHP PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPExcel_Writer_Excel5_BIFFwriter
的用法示例。
在下文中一共展示了PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _convertNumber
/**
* Convert a number token to ptgInt or ptgNum
*
* @access private
* @param mixed $num an integer or double for conversion to its ptg value
*/
function _convertNumber($num)
{
// Integer in the range 0..2**16-1
if (preg_match("/^\\d+\$/", $num) and $num <= 65535) {
return pack("Cv", $this->ptg['ptgInt'], $num);
} else {
// A float
if (PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder()) {
// if it's Big Endian
$num = strrev($num);
}
return pack("Cd", $this->ptg['ptgNum'], $num);
}
}
示例2: _writeMarginBottom
/**
* Store the BOTTOMMARGIN BIFF record.
*/
private function _writeMarginBottom()
{
$record = 0x29;
// Record identifier
$length = 0x8;
// Bytes to follow
$margin = $this->_phpSheet->getPageMargins()->getBottom();
// Margin in inches
$header = pack("vv", $record, $length);
$data = pack("d", $margin);
if (PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder()) {
// if it's Big Endian
$data = strrev($data);
}
$this->_append($header . $data);
}