| 1 | <?PHP
|
|---|
| 2 |
|
|---|
| 3 | /* RDFInt.php - 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 | $fdebug = \fDebug::getInstance();
|
|---|
| 21 | If (isset( $_SERVER["SERVER_NAME"]))
|
|---|
| 22 | $fdebug->setSession( $_SERVER["SERVER_NAME"]);
|
|---|
| 23 | else {
|
|---|
| 24 | $unittest_name = str_replace( '_', ' ', basename( getcwd()));
|
|---|
| 25 | $fdebug->setSession( 'localhost', SAMPLE_NAME . ' ' . $unittest_name);
|
|---|
| 26 | }
|
|---|
| 27 | $fdebug->openSocket( '127.0.0.1');
|
|---|
| 28 | $fdebug->sendSource( '<?xml version="1.0" ?><emptysource/>');
|
|---|
| 29 |
|
|---|
| 30 | // if fDebug implementation already supports filtering,
|
|---|
| 31 | // filter out log messages of the library classes, as configured
|
|---|
| 32 | if (method_exists( $fdebug, 'setContextFilter')) {
|
|---|
| 33 | if (!RDFA_DEBUGOUTPUT_READER) $fdebug->setContextFilter( 'RDFA_READER');
|
|---|
| 34 | if (!RDFA_DEBUGOUTPUT_PROJECTION) $fdebug->setContextFilter( 'RDFA_PROJECTION');
|
|---|
| 35 | if (!RDFA_DEBUGOUTPUT_SPARQLENDPOINT) $fdebug->setContextFilter( 'RDFA_SPARQLENDPOINT');
|
|---|
| 36 | if (!RDFA_DEBUGOUTPUT_SPARQLQUERY) $fdebug->setContextFilter( 'RDFA_SPARQLQUERY');
|
|---|
| 37 | }
|
|---|
| 38 | ?>
|
|---|