本文整理汇总了PHP中strings::get_from_hashrange方法的典型用法代码示例。如果您正苦于以下问题:PHP strings::get_from_hashrange方法的具体用法?PHP strings::get_from_hashrange怎么用?PHP strings::get_from_hashrange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类strings
的用法示例。
在下文中一共展示了strings::get_from_hashrange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strings
$props['str_value'] = $me_value;
$new_me = new me_setting();
$new_me->get_from_hashrange($props['id_me'], $props['name']);
if ($new_me->id_me == 'undefined') {
//echo "CREATE";
$new_me->create($props);
} else {
//echo "EDIT";
if ($APP['fs']->connect()) {
$keyname = $GLOBALS['settings'][$APP['fs']->kind]['paths']['job-output']['@attributes']['value'] . "/" . sha1(microtime() . $new_me->str_value) . ".txt";
$bucket_name = $GLOBALS['settings'][$APP['fs']->kind][$APP['fs']->bucket_syntax()]['@attributes']['value'];
$file_upload_success = $fs->create_object(false, $bucket_name, $keyname, $props['str_value'], "text/plain");
if ($file_upload_success) {
$FILE_LOCATION = $APP['fs']->key_url($bucket_name, $keyname);
$new_string = new strings();
$new_string->get_from_hashrange($new_me->str_value);
if ($new_string->id != "undefined") {
$props = array();
$props["val"] = $FILE_LOCATION;
$new_string->update_raw($props);
}
}
}
// end if (able to connect to file storage
// update latest cache
//$JOB->obj_hf->update_raw(array("str_cache_latest"=>$sha1_string));
// existing entry for this setting
//$new_me->update(array('str_value'=>$props['str_value']));
}
}
// end if (a non-standard me field)
示例2: logger
logger("\t\t\t" . "THERE ARE STILL OTHER JOBS THAT NEED TO BE COMPLETED\n");
break;
}
} else {
$THIS_JOB = new job_id_user();
$THIS_JOB->get_from_hashrange($JOB->id_user, $JID_MERGE_CHECK);
// THIS JOB WAS *NOT* RUN TO FILL A PLACEHOLDER IN AN OUTPUT ENTRY FROM ANOTHER JOB
logger("\t\t" . "THIS JOB WAS *NOT* RUN TO FILL A PLACEHOLDER IN AN OUTPUT ENTRY FROM ANOTHER JOB\n");
if ($THIS_JOB) {
if ($THIS_JOB->id_status == 'done') {
// this will be the case on direct runs
// and also this will be the ending point on nested subjobs after having
// traced up to the completed root of the job tree
// $STDOUT = is the value that is posted to the output expression url
$OUTPUT_STRING = new strings();
$OUTPUT_STRING->get_from_hashrange($THIS_JOB->str_output);
$OUTPUT_STRING->build();
if (isset($OUTPUT_STRING->body)) {
if (strlen($OUTPUT_STRING->body) > 0) {
// in edit mode, this won't get hit
$STDOUT = $OUTPUT_STRING->body;
logger("\t\t" . "POST-MERGE OUTPUT:\n" . substr($STDOUT, 0, 200) . "\n");
// CHILD JOB MERGING _MIGHT_ HAVE CHANGED THE RAW OUTPUT OF THE JOBS...UPDATE IT JUST IN CASE SO THAT ADJACENT DICTIONARY GETS THE UPDATED INFO
$adjacent_dictionary["[RAW_OUTPUT]"] = $STDOUT;
logger("\tSAVING ADJACENT DICTIONARY TO JOB\n");
$ad_data = array('ad' => $adjacent_dictionary);
$ad_encoded = base64_encode(serialize($ad_data));
$JOB->update(array('str_ad' => $ad_encoded));
/*
$output_expression_jid=$JID_MERGE_CHECK;
if ( strlen(trim($STDOUT))>0 )