本文整理汇总了PHP中Data::Get方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::Get方法的具体用法?PHP Data::Get怎么用?PHP Data::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data::Get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Log
public function Log()
{
$Filename = sprintf('%s_%s', (new \DateTime('now', new \DateTimeZone('GMT')))->format('Y-m-d'), $this->GetType());
$Log = \Data::Get($Filename, true, false, array($this->LogDirectory));
if (empty($Log) || !is_array($Log)) {
$Log = array();
}
$Log[] = $this;
return \Data::Set($Filename, $Log, true, true, array($this->LogDirectory));
}
示例2: LoadPreview
private function LoadPreview()
{
if (method_exists($this, 'GetPreview')) {
$Filename = \FileManager::GetFilename($this->File);
if (!empty($this->PreviewFilenameSuffix)) {
$Filename .= '.' . $this->PreviewFilenameSuffix;
}
$Filename .= '.jpg';
$Preview = \Data::Get($Filename, false, false, array($this->MediaDirectory));
if (!empty($Preview)) {
if (empty($this->Preview)) {
$this->Preview = $Preview;
}
return true;
} elseif (!empty($this->Preview)) {
return \Data::Set($Filename, $this->Preview, false, true, array($this->MediaDirectory));
}
}
return false;
}
示例3:
<tr>
<td style="text-align: center"><input title="Remove size from this material" type=button value="-" onclick="NotReady();"></td>
<td><?php
echo $n + 1;
?>
</td>
<td><?php
echo Data::Get('current_material', 'fraction_in', $n);
?>
</td>
<td><?php
echo Data::Get('current_material', 'decimal_in', $n);
?>
</td>
<td><?php
echo Data::Get('current_material', 'millimeters', $n);
?>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="999" style="text-align: center">None found</td>
</tr>
<?php
}
?>
<table>
<!-- ============ END Sizes by Material ============ -->
示例4: str_pad
echo Data::Get('all_materials', 'balls_per_kilo', $n);
?>
'></td>
<td><input id="id_<?php
echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
?>
_page_link" readonly="readonly" type="text" style="width: 510px; background: none; border: 0; " value='<?php
echo Data::Get('all_materials', 'page_link', $n);
?>
'></td>
<td style="background-color: white;">
<input id="id_<?php
echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
?>
_save" type=button title="Save" value="Save" onclick="SaveMaterial();" style="display: none">
<input id="id_<?php
echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
?>
_cancel" type=button title="Cancel" value="Cancel" onclick="CancelMaterial();" style="display: none">
</td>
</tr>
<?php
}
?>
</table>
<!-- ============ END Materials ============ -->
</div>
<?php
include 'javascript.js.php';
示例5:
<br> Materials Available for size: <?php
echo Data::GetData('all_sizes', 'fraction_in', 'id', $this->GetQs('size'));
?>
<br><br>
<?php
if (Data::GetRowCount('current_size') > 0) {
?>
<?php
for ($n = 0; $n < Data::GetRowCount('current_size'); $n++) {
?>
<a href="<?php
echo Data::Get('current_size', 'page_link', $n);
?>
"><?php
echo Data::Get('current_size', 'material', $n);
?>
</a><br>
<?php
}
?>
<?php
} else {
?>
None found for size
<?php
}
?>
</div>
示例6: str_pad
echo Data::Get('all_sizes', 'one_ball_weight_ounce', $n);
?>
'></td>
<td><input id="id_<?php
echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
?>
_one_ball_weight_gram" readonly="readonly" type="text" style="width: 120px; background: none; border: 0; " value='<?php
echo Data::Get('all_sizes', 'one_ball_weight_gram', $n);
?>
'></td>
<td style="background-color: white;">
<input id="id_<?php
echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
?>
_save" type=button title="Save" value="Save" onclick="SaveSize();" style="display: none">
<input id="id_<?php
echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
?>
_cancel" type=button title="Cancel" value="Cancel" onclick="CancelSize();" style="display: none">
</td>
</tr>
<?php
}
?>
</table>
<!-- ============ END Sizes ============ -->
</div>
<?php
include 'javascript.js.php';