本文整理汇总了PHP中Store::describe方法的典型用法代码示例。如果您正苦于以下问题:PHP Store::describe方法的具体用法?PHP Store::describe怎么用?PHP Store::describe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Store
的用法示例。
在下文中一共展示了Store::describe方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FakeRequestFactory
function test_describe_multiple_uris_gets_from_sparql_service()
{
$query = 'DESCRIBE <http://example.org/scooby> <http://example.org/shaggy>';
$fake_request_factory = new FakeRequestFactory();
$fake_request = new FakeHttpRequest(new HttpResponse());
$fake_request_factory->register('GET', "http://example.org/store/services/sparql?query=" . urlencode($query) . "&output=rdf", $fake_request);
$store = new Store("http://example.org/store", null, $fake_request_factory);
$response = $store->describe(array('http://example.org/scooby', 'http://example.org/shaggy'));
$this->assertTrue($fake_request->was_executed());
}
示例2: Store
}
}
if ($store_uri == null && $describer_class == null) {
send_not_found($uri, $template);
}
$sparql_service_uri = $store_uri . '/services/sparql';
$search_service_uri = $store_uri . '/items';
require_once MORIARTY_DIR . 'moriarty.inc.php';
require_once MORIARTY_DIR . 'simplegraph.class.php';
if ($describer_class) {
$describer = new $describer_class();
} else {
require_once MORIARTY_DIR . 'store.class.php';
$describer = new Store($store_uri);
}
$response = $describer->describe($resource_uri, 'cbd', 'json');
$body = '';
$content_location = '';
$etag = '';
if ($response->is_success()) {
if (array_key_exists('etag', $response->headers)) {
$etag = $response->headers['etag'];
}
$g = new SimpleGraph();
$g->from_json($response->body);
if (!$g->has_triples_about($resource_uri)) {
send_not_found($uri, $template);
} else {
$g->remove_property_values($resource_uri, 'http://schemas.talis.com/2005/dir/schema#etag');
if ($uri != $doc_uri) {
header("HTTP/1.1 303 See Other");