本文整理汇总了PHP中Cell::read方法的典型用法代码示例。如果您正苦于以下问题:PHP Cell::read方法的具体用法?PHP Cell::read怎么用?PHP Cell::read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cell
的用法示例。
在下文中一共展示了Cell::read方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: read
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true) {
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid) {
case 1:
if ($ftype == TType::LST) {
$this->results = array();
$_size0 = 0;
$_etype3 = 0;
$xfer += $input->readListBegin($_etype3, $_size0);
for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
$elem5 = null;
$xfer += $input->readString($elem5);
$this->results[] = $elem5;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::LST) {
$this->cells = array();
$_size6 = 0;
$_etype9 = 0;
$xfer += $input->readListBegin($_etype9, $_size6);
for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
$elem11 = null;
$elem11 = new Cell();
$xfer += $elem11->read($input);
$this->cells[] = $elem11;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->scanner);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->mutator);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
示例2: read
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true) {
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid) {
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->mutator);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::LST) {
$this->cells = array();
$_size35 = 0;
$_etype38 = 0;
$xfer += $input->readListBegin($_etype38, $_size35);
for ($_i39 = 0; $_i39 < $_size35; ++$_i39) {
$elem40 = null;
$elem40 = new Cell();
$xfer += $elem40->read($input);
$this->cells[] = $elem40;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}