1 | <?php
|
---|
2 |
|
---|
3 | /* RDFInt - RDF Interfaces for PHP
|
---|
4 | * Copyright 2011 netlabs.org
|
---|
5 | * Author: Christian Langanke, Adrian Gschwend
|
---|
6 | *
|
---|
7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
8 | * you may not use this file except in compliance with the License.
|
---|
9 | * You may obtain a copy of the License at
|
---|
10 | *
|
---|
11 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
12 | *
|
---|
13 | * Unless required by applicable law or agreed to in writing, software
|
---|
14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
16 | * See the License for the specific language governing permissions and
|
---|
17 | * limitations under the License.
|
---|
18 | */
|
---|
19 |
|
---|
20 | // --- load classes of this library
|
---|
21 | if (!defined( 'RDFINT'))
|
---|
22 | define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT'));
|
---|
23 | if (RDFINT == '')
|
---|
24 | die( 'error: environment variable PHP_LIBROOT_RDFINT not defined !');
|
---|
25 | require_once( RDFINT.'/classes/rdfa_Data.php');
|
---|
26 | require_once( RDFINT.'/classes/rdfa_Projection.php');
|
---|
27 | require_once( RDFINT.'/classes/rdfa_SparqlEndpoint.php');
|
---|
28 | require_once( RDFINT.'/classes/rdfa_SparqlQuery.php');
|
---|
29 |
|
---|
30 | // --- load ARC
|
---|
31 | define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2'));
|
---|
32 | if( ARC2 == '')
|
---|
33 | die( 'error:environment variable PHP_LIBROOT_ARC2 not defined !');
|
---|
34 | require_once( ARC2.'/ARC2.php');
|
---|
35 |
|
---|
36 | // --- load fDebug
|
---|
37 | define( 'fDebug', getenv( 'PHP_LIBROOT_FDEBUG'));
|
---|
38 | $locationStub = RDFINT.'/classes/fdebug.php';
|
---|
39 | $locationLib1 = fDebug.'/server/php/fdebug.lib.php';
|
---|
40 | $locationLib2 = fDebug.'/fdebug.lib.php';
|
---|
41 | if (fDebug == '') {
|
---|
42 | $location = $locationStub;
|
---|
43 | } else {
|
---|
44 | $location = $locationLib1;
|
---|
45 | if (!file_exists( $location))
|
---|
46 | $location = locationLib2;
|
---|
47 | if (!file_exists( $location))
|
---|
48 | $location = $locationStub;
|
---|
49 | }
|
---|
50 | require_once( $location);
|
---|
51 |
|
---|
52 | // --- configure fDebug
|
---|
53 | if (defined( 'FDEBUG_SESSION_NAME') != '') {
|
---|
54 | $fdebug = \fDebug::getInstance();
|
---|
55 | If (isset( $_SERVER[ "SERVER_NAME"]))
|
---|
56 | $fdebug->setSession( $_SERVER[ "SERVER_NAME"]);
|
---|
57 | else
|
---|
58 | $fdebug->setSession( 'localhost', FDEBUG_SESSION_NAME);
|
---|
59 | $fdebug->openSocket( '127.0.0.1');
|
---|
60 | $fdebug->sendSource( '<?xml version="1.0" ?><emptysource/>');
|
---|
61 | }
|
---|
62 |
|
---|
63 | ?>
|
---|