本文整理汇总了PHP中Converter::DS方法的典型用法代码示例。如果您正苦于以下问题:PHP Converter::DS方法的具体用法?PHP Converter::DS怎么用?PHP Converter::DS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Converter
的用法示例。
在下文中一共展示了Converter::DS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: responseAnchor
/**
* ==========================================================================
* GET MINIMUM DATA OF A RESPONSE
* ==========================================================================
*
* -- CODE: -----------------------------------------------------------------
*
* var_dump(Get::responseAnchor(1399334470));
*
* --------------------------------------------------------------------------
*
*/
public static function responseAnchor($path, $folder = array(RESPONSE, POST), $FP = 'response:')
{
if (strpos($path, ROOT) === false) {
$path = self::responsePath($path, $folder[0]);
// By post slug, ID or time
}
if ($path && ($buffer = File::open($path)->get(1)) !== false) {
$results = self::responseExtract($path, $FP);
$parts = explode(S, $buffer, 2);
$results['name_raw'] = Filter::colon($FP . 'name_raw', isset($parts[1]) ? Converter::DS(trim($parts[1])) : "", $results);
$results['name'] = Filter::colon($FP . 'name', $results['name_raw'], $results);
return Mecha::O($results);
}
return false;
}
示例2: __doParseHeaders
protected static function __doParseHeaders($text, $FP, $data)
{
$results = array();
$headers = explode("\n", trim($text));
foreach ($headers as $header) {
$field = explode(S, $header, 2);
if (!isset($field[1])) {
$field[1] = 'false';
}
$key = Text::parse(trim($field[0]), '->array_key', true);
$value = Converter::DS(trim($field[1]));
$value = Filter::colon($FP . $key . '_raw', Converter::strEval($value), $data);
$results[$key . '_raw'] = $value;
$value = Filter::colon($FP . $key, $value, $data);
$results[$key] = $value;
}
return $results;
}