本文整理汇总了PHP中EasyRdf_Format::getFormats方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyRdf_Format::getFormats方法的具体用法?PHP EasyRdf_Format::getFormats怎么用?PHP EasyRdf_Format::getFormats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EasyRdf_Format
的用法示例。
在下文中一共展示了EasyRdf_Format::getFormats方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetFormats
public function testGetFormats()
{
$formats = EasyRdf_Format::getFormats();
$this->assertType('array', $formats);
$this->assertGreaterThan(0, count($formats));
foreach ($formats as $format) {
$this->assertEquals('EasyRdf_Format', get_class($format));
}
}
示例2: set_include_path
* supported input and output formats. These options are then
* displayed on the HTML form.
*
* The input data is loaded or parsed into an EasyRdf_Graph.
* That graph is than outputted again in the desired output format.
*
* @package EasyRdf
* @copyright Copyright (c) 2009-2011 Nicholas J Humfrey
* @license http://unlicense.org/
*/
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/');
require_once "EasyRdf.php";
require_once "html_tag_helpers.php";
$input_format_options = array('Guess' => 'guess');
$output_format_options = array();
foreach (EasyRdf_Format::getFormats() as $format) {
if ($format->getSerialiserClass()) {
$output_format_options[$format->getLabel()] = $format->getName();
}
if ($format->getParserClass()) {
$input_format_options[$format->getLabel()] = $format->getName();
}
}
?>
<html>
<head><title>EasyRdf Converter</title></head>
<body>
<h1>EasyRdf Converter</h1>
<div style="margin: 10px">
<?php