[2] | 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
|
---|
[27] | 21 | if (!defined( 'RDFINT'))
|
---|
| 22 | define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT'));
|
---|
| 23 | if (RDFINT == '')
|
---|
| 24 | die( 'error: environment variable PHP_LIBROOT_RDFINT not defined !');
|
---|
[2] | 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');
|
---|
[72] | 29 | require_once( RDFINT.'/classes/Core.php');
|
---|
[2] | 30 |
|
---|
[27] | 31 | // --- load ARC
|
---|
| 32 | define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2'));
|
---|
| 33 | if( ARC2 == '')
|
---|
| 34 | die( 'error:environment variable PHP_LIBROOT_ARC2 not defined !');
|
---|
| 35 | require_once( ARC2.'/ARC2.php');
|
---|
[2] | 36 |
|
---|
[27] | 37 | // --- load fDebug
|
---|
| 38 | define( 'fDebug', getenv( 'PHP_LIBROOT_FDEBUG'));
|
---|
| 39 | $locationStub = RDFINT.'/classes/fdebug.php';
|
---|
| 40 | $locationLib1 = fDebug.'/server/php/fdebug.lib.php';
|
---|
| 41 | $locationLib2 = fDebug.'/fdebug.lib.php';
|
---|
| 42 | if (fDebug == '') {
|
---|
| 43 | $location = $locationStub;
|
---|
| 44 | } else {
|
---|
| 45 | $location = $locationLib1;
|
---|
| 46 | if (!file_exists( $location))
|
---|
| 47 | $location = locationLib2;
|
---|
| 48 | if (!file_exists( $location))
|
---|
| 49 | $location = $locationStub;
|
---|
| 50 | }
|
---|
| 51 | require_once( $location);
|
---|
| 52 |
|
---|
| 53 | // --- configure fDebug
|
---|
[61] | 54 | if (defined( 'FDEBUG_SESSION_NAME') != '') {
|
---|
| 55 | $fdebug = \fDebug::getInstance();
|
---|
| 56 | If (isset( $_SERVER[ "SERVER_NAME"]))
|
---|
| 57 | $fdebug->setSession( $_SERVER[ "SERVER_NAME"]);
|
---|
[62] | 58 | else
|
---|
| 59 | $fdebug->setSession( 'localhost', FDEBUG_SESSION_NAME);
|
---|
[61] | 60 | $fdebug->openSocket( '127.0.0.1');
|
---|
| 61 | $fdebug->sendSource( '<?xml version="1.0" ?><emptysource/>');
|
---|
[27] | 62 | }
|
---|
| 63 |
|
---|
[2] | 64 | ?>
|
---|