Streamline app compatibility between Solr and WS

This commit is contained in:
Gilles Crettenand
2015-06-02 13:33:09 +02:00
parent 1ee3aa305d
commit 018846e567
10 changed files with 765 additions and 760 deletions

View File

@@ -1,20 +1,20 @@
<?php
namespace BSR;
ini_set('display_errors', 'On');
// register an autoloader to automatically load classes
// the namespace for the class must begin with BSR and
// otherwise respect the PSR-4 standard
spl_autoload_register(function ($class) {
$class = substr($class, strlen('BSR'));
$path = sprintf('%s/%s.php', __DIR__, str_replace('\\', '/', $class));
if (file_exists($path)) {
require $path;
}
});
$web = new NetBiblio();
$web->Run();
<?php
namespace BSR;
ini_set('display_errors', 'On');
// register an autoloader to automatically load classes
// the namespace for the class must begin with BSR and
// otherwise respect the PSR-4 standard
spl_autoload_register(function ($class) {
$class = substr($class, strlen('BSR'));
$path = sprintf('%s/%s.php', __DIR__, str_replace('\\', '/', $class));
if (file_exists($path)) {
require $path;
}
});
$web = new NetBiblio();
$web->Run();