source: php/trunk/rdfa.php@ 71

Last change on this file since 71 was 62, checked in by cla, 14 years ago

rdfint

  • reworked way of determining session name for fDebug for the samples
  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
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
21if (!defined( 'RDFINT'))
22 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT'));
23if (RDFINT == '')
24 die( 'error: environment variable PHP_LIBROOT_RDFINT not defined !');
25require_once( RDFINT.'/classes/rdfa_Data.php');
26require_once( RDFINT.'/classes/rdfa_Projection.php');
27require_once( RDFINT.'/classes/rdfa_SparqlEndpoint.php');
28require_once( RDFINT.'/classes/rdfa_SparqlQuery.php');
29
30// --- load ARC
31define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2'));
32if( ARC2 == '')
33 die( 'error:environment variable PHP_LIBROOT_ARC2 not defined !');
34require_once( ARC2.'/ARC2.php');
35
36// --- load fDebug
37define( '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';
41if (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}
50require_once( $location);
51
52// --- configure fDebug
53if (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?>
Note: See TracBrowser for help on using the repository browser.