本文整理汇总了PHP中ARC2::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP ARC2::getVersion方法的具体用法?PHP ARC2::getVersion怎么用?PHP ARC2::getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ARC2
的用法示例。
在下文中一共展示了ARC2::getVersion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHTMLDocHeading
function getHTMLDocHeading()
{
return $this->v('endpoint_heading', 'ARC SPARQL+ Endpoint (v' . ARC2::getVersion() . ')', $this->a);
}
示例2: getHTMLFormDoc
function getHTMLFormDoc()
{
$r = '' . $this->getHTMLDocHead() . '
<body>
<h1>ARC SPARQL+ Endpoint (v' . ARC2::getVersion() . ')</h1>
<div class="intro">
<p>
This interface implements
<a href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL</a> and
<a href="http://arc.semsol.org/docs/v2/sparql+">SPARQL+</a> via <a href="http://www.w3.org/TR/rdf-sparql-protocol/#query-bindings-http">HTTP Bindings</a>.
</p>
<p>
Enabled operations: ' . join(', ', $this->getFeatures()) . '
</p>
<p>
Max. number of results : ' . $this->v('endpoint_max_limit', '<em>unrestricted</em>', $this->a) . '
</p>
</div>
<form id="sparql-form" action="" enctype="application/x-www-form-urlencoded" method="post">
<textarea id="query" name="query" rows="20" cols="80">
SELECT ?s ?p ?o WHERE {
?s ?p ?o .
}
LIMIT 10
</textarea>
Output format (if supported by query type):
<select id="output" name="output">
<option value="">default</option>
<option value="xml">XML</option>
<option value="json">JSON</option>
<option value="plain">Plain</option>
<option value="php_ser">Serialized PHP</option>
<option value="turtle">Turtle</option>
<option value="rdfxml">RDF/XML</option>
<!-- <option value="sql">SQL</option> -->
<option value="htmltab">HTML Table</option>
</select><br /><br />
jsonp/callback (for JSON results):
<input type="text" id="jsonp" name="jsonp" /><br /><br />
API key (if required):
<input type="text" id="key" name="key" /><br /><br />
Set form method:
<a href="javascript:;" onclick="javascript:document.getElementById(\'sparql-form\').method=\'get\'">GET</a>
<a href="javascript:;" onclick="javascript:document.getElementById(\'sparql-form\').method=\'post\'">POST</a>
<br /><br />
<input type="submit" value="Send Query" />
</form>
</body>
</html>
';
return $r;
}
示例3: testGetVersion
public function testGetVersion()
{
$actual = ARC2::getVersion();
$this->assertRegExp('/^[0-9]{4}-[0-9]{2}-[0-9]{2}/', $actual, "should start with date");
}
示例4: getWelcomeDoc
function getWelcomeDoc()
{
if (file_exists('welcome.htm')) {
return file_get_contents('welcome.htm');
} else {
return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ARC Data Wiki</title>
<style type="text/css">
body {
font-size: 14px;
font-family: Trebuchet MS, Verdana, Geneva, sans-serif;
background-color: #fcfcfc;
padding: 20px 20% 20px 20%;
color: #666;
}
h1 { font-size: 1.6em; font-weight: normal; }
a { color: #c00000; }
</style>
</head>
<body>
<h1>ARC Data Wiki (v' . ARC2::getVersion() . ')</h1>
<p>
This Web space allows the manipulation of RDF documents via
<a href="http://arc.semsol.org/docs/v2/sparql+">SPARQL+</a>
(or, more precisely, a slightly tweaked version of it which
accepts INSERT and DELETE queries without an explicitly specified target graph).
</p>
<p>
<a href="http://arc.semsol.org/download/plugins/data_wiki">Plugin Documentation</a>
</p>
</body>
</html>
';
}
}
示例5: define
if (!defined('MORIARTY_DIR')) {
define('MORIARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
}
if (!defined('MORIARTY_ARC_DIR')) {
define('MORIARTY_ARC_DIR', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'arc_2008_11_18' . DIRECTORY_SEPARATOR);
trigger_error("Constant MORIARTY_ARC_DIR was not defined, so a value of '" . MORIARTY_ARC_DIR . "' will be assumed", E_USER_WARNING);
}
if (!defined('MORIARTY_TEST_DIR')) {
define('MORIARTY_TEST_DIR', MORIARTY_DIR . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR);
}
if (!defined('MORIARTY_PHPUNIT_DIR')) {
define('MORIARTY_PHPUNIT_DIR', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'phpunit' . DIRECTORY_SEPARATOR);
}
require_once MORIARTY_ARC_DIR . 'ARC2.php';
$__arc = new ARC2();
if ($__arc->getVersion() < '2008-08-04') {
trigger_error("Unsupported version of ARC detected. Expected at least '2008-08-04' but found '" . ARC2::getVersion() . "'", E_USER_ERROR);
}
// MORIARTY_HTTP_CACHE_DIR - define this to be a valid path to enable automatic HTTP caching
// MORIARTY_HTTP_CACHE_READ_ONLY - define this if you never perform updates via your application
// MORIARTY_HTTP_CACHE_USE_STALE_ON_FAILURE - define this if you want your app to use cached results when it cannot contact the platform
// MORIARTY_ALWAYS_CACHE_EVERYTHING - define this if you want your app to cache even when HTTP response don't allow it
define('RDF_TYPE', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type');
define('RDF_SUBJECT', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#subject');
define('RDF_PREDICATE', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate');
define('RDF_OBJECT', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#object');
define('RDF_STATEMENT', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement');
define('RDF_FIRST', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#first');
define('RDF_REST', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest');
define('RDF_NIL', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil');
define('RDF_LIST', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#List');