source: src/webapp/webservice/inc/autoloader.php@ 713b56e

0.5 debian/bullseye debian/jessie
Last change on this file since 713b56e was 86442cb, checked in by Joachim Langenbach <joachim.langenbach@…>, 9 years ago

Added Nmea0183 Parsers to the PHP webservice to allow the user to load a logfile into the map
(loading the logfile and display it on the map is not implemented yet)

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[c455d7b]1<?php
2/*
3 Copyright (C) 2017 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19function gnuboatAutoloader($class)
20{
21 $parts = explode('\\', $class);
22 $fileName = __DIR__ ."/". join("/", $parts) .".php";
23 if(file_exists($fileName))
24 require_once($fileName);
25}
26
[86442cb]27function canClassBeLoaded($class) {
28 $parts = explode('\\', $class);
29 $fileName = __DIR__ ."/". join("/", $parts) .".php";
30 return file_exists($fileName);
31}
32
[c455d7b]33spl_autoload_register("gnuboatAutoloader");
34
35?>
Note: See TracBrowser for help on using the repository browser.