當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Updater::buildDeleteGraph方法代碼示例

本文整理匯總了PHP中Updater::buildDeleteGraph方法的典型用法代碼示例。如果您正苦於以下問題:PHP Updater::buildDeleteGraph方法的具體用法?PHP Updater::buildDeleteGraph怎麽用?PHP Updater::buildDeleteGraph使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Updater的用法示例。


在下文中一共展示了Updater::buildDeleteGraph方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: stdClass

<?php

include 'config.php';
include_once 'checkLogin.php';
include ARC_DIR . 'ARC2.php';
include CLASSES_DIR . 'Updater.php';
header("Content-type: application/json");
$testPost['jsonStr'] = '{"old":"{\\"http://code.rubrick-jetpack.org/vocab/Context1\\":{\\"http://rdfs.org/sioc/ns#name\\":[{\\"value\\":\\"Demo\\",\\"type\\":\\"literal\\"}],\\"http://code.rubrick-jetpack.org/vocab/description\\":[{\\"value\\":\\"Just a demo\\",\\"type\\":\\"literal\\"}]}}","new":"{\\"http://code.rubrick-jetpack.org/vocab/Context1\\":{\\"http://rdfs.org/sioc/ns#name\\":[{\\"value\\":\\"Demo\\",\\"type\\":\\"literal\\"}],\\"http://code.rubrick-jetpack.org/vocab/description\\":[{\\"value\\":\\"Just a demo ed\\",\\"type\\":\\"literal\\"}]}}","uri":"http://code.rubrick-jetpack.org/vocab/Context1"}';
$testPost['uri'] = 'http://testURI.org';
$store = ARC2::getStore($config);
$responseObj = new stdClass();
//$postObj = json_decode($_POST['jsonStr']);
$postObj = json_decode($_POST['jsonStr']);
$updater = new Updater($_POST['uri'], array('post' => $postObj));
//print_r($updater->postData);
$updater->buildAddGraph();
$updater->buildDeleteGraph();
$updater->finalizeGraph('add');
$updater->finalizeGraph('delete');
//echo json_encode($updater->deleteGraph->toRDFJSON(true) );
開發者ID:patrickmj,項目名稱:Rubrick,代碼行數:20,代碼來源:updateResource.php

示例2: json_encode

<?php

include 'config.php';
include_once 'checkLogin.php';
include ARC_DIR . 'ARC2.php';
include CLASSES_DIR . 'Updater.php';
header('Content-type: application/json');
$store = ARC2::getStore($config);
$POST['jsonStr'] = '{"new":"{}","old":"{\\"http://data.rubrick-jetpack.org/Rubrics/0280bce1098ee66c35f8027d3a200b9f9d6cc90a\\":{\\"http://www.holygoat.co.uk/owl/redwood/0.1/tags/tag\\":[{\\"value\\":\\"http://data.rubrick-jetpack.org/Tag/tagged_rubric\\",\\"type\\":\\"uri\\"},{\\"value\\":\\"http://data.rubrick-jetpack.org/Tag/woot_tag_2\\",\\"type\\":\\"uri\\"}]}}"}';
$postObj = json_decode($POST['jsonStr']);
/*
$jsonObj = json_decode($jsonStr);
$newIndex = json_decode($jsonObj->new, true);
//print_r($newIndex);
$testT = new Tagging(false, array('properties'=>array('newTagGraph' => $newIndex)) );
$testT->buildUpdateGraph();
echo json_encode($testT->updateGraph->toRDFJSON(true) );
*/
$u = new Updater(false, array('post' => $postObj));
$u->buildDeleteGraph();
echo json_encode($u->deleteGraph->toRDFJSON(true));
開發者ID:patrickmj,項目名稱:Rubrick,代碼行數:21,代碼來源:test.php


注:本文中的Updater::buildDeleteGraph方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。