Fix an issue where utility skos and dc functions would fail due to a signature change.
[project/ldt.git] / ldt.hooks.php
1 <?php
2 /**
3 * @file
4 * Hook definitions for Linked Data Tools
5 *
6 * @copyright Copyright(c) 2012 Christopher Skne
7 * @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html
8 * @author Chris Skene chris at xtfer dot com
9 */
10
11 /**
12 * Provide information about library plugins for working with Linked Data.
13 *
14 * Defines hook_ldt_library_wrapper().
15 *
16 * This hook only needs to be implemented by providers of linked data libraries
17 * for use with LDT.
18 *
19 * @return array
20 * An array of library configurations. Each library should provide two
21 * keys:
22 * 'name' - The human readable name of the library. May be wrapped in t() if
23 * appropriate.
24 * 'class' - The class to load for working with data.
25 */
26 function hook_ldt_library_wrappers() {
27 $wrappers = array();
28
29 $wrappers['easyrdf'] = array(
30 'name' => 'EasyRdf',
31 'class' => '\Drupal\ldt\Plugins\EasyRdf',
32 );
33
34 return $wrappers;
35 }
36
37 /**
38 * Define data formats accepted by LDT.
39 *
40 * Linked Data comes in different formats. This function returns an array
41 * of supported formats. Some formats may not be compatible with some plugins,
42 * it is up to the implementer to know which, currently.
43 *
44 * Defines hook_ldt_data_formats().
45 *
46 * @return array
47 * An array of format definitions. Each definition includes:
48 * 'name' - Human readable name.
49 * 'accept' - an array of mime type accept headers to set for requests
50 * 'uri' - a URI for the format definition
51 * 'extensions' - an array of possible file extensiosn
52 * The 'uri' and 'extensions' keys are not used by the default EasyRDF plugin
53 * however it provides its own data here, and the information is provided for
54 * use by other plugins.
55 */
56 function hook_ldt_data_formats() {
57 $formats = array();
58
59 $formats['rdf+xml'] = array(
60 'name' => 'RDF/XML',
61 'accept' => 'application/rdf+xml',
62 );
63
64 return $formats;
65 }