Skip to content

Commit a7a6cb6

Browse files
committed
Rebased code from ideawu/ssdb
1 parent 60cc285 commit a7a6cb6

File tree

7 files changed

+341
-423
lines changed

7 files changed

+341
-423
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# PHP SDK for SSDB - phpSsdb (PhpFastCache Fork)
1+
# PHP SDK for SSDB - Phpfastcache implementation of [ideawu/ssdb](https://github.com/ideawu/ssdb/tree/master/api/php)

src/autoload.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
*
1313
*/
1414

15-
define('PSSDB_PHP_EXT', 'php');
16-
1715
/**
1816
* Register Autoload
1917
*/
20-
spl_autoload_register(function ($entity) {
18+
spl_autoload_register(static function ($entity) {
2119
$module = explode('\\', $entity, 2);
2220
if ($module[ 0 ] !== 'phpssdb') {
2321
/**
@@ -28,7 +26,7 @@
2826
}
2927

3028
$entity = str_replace('\\', '/', $entity);
31-
$path = __DIR__ . '/' . $entity . '.' . PSSDB_PHP_EXT;
29+
$path = __DIR__ . '/' . $entity . '.' . '.php';
3230

3331
if (is_readable($path)) {
3432
require_once $path;
@@ -38,4 +36,4 @@
3836
if (class_exists('Composer\Autoload\ClassLoader')) {
3937
trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpssdb" instead of hard-autoloading.',
4038
E_USER_WARNING);
41-
}
39+
}

0 commit comments

Comments
 (0)