-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfixes, v5 API by default, updated documentation, cosmetic changes. (…
…#13) * Autoload for those not using Composer. Refactoring. v5 is now default API for search. Signed-off-by: Carlos Escribano <[email protected]> * Results and bugfixes Signed-off-by: Carlos Escribano <[email protected]> * Small cosmetic changes Signed-off-by: Carlos Escribano <[email protected]> * README Signed-off-by: Carlos Escribano <[email protected]> * sc Signed-off-by: Carlos Escribano <[email protected]>
- Loading branch information
1 parent
69fd397
commit 7e9cc42
Showing
14 changed files
with
1,320 additions
and
1,368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
spl_autoload_register('autoload_doofinder_classes'); | ||
|
||
function autoload_doofinder_classes($className) { | ||
$libraryPrefix = 'Doofinder\\Api\\'; | ||
$libraryDirectory = __DIR__ . '/src/'; | ||
|
||
$len = strlen($libraryPrefix); | ||
|
||
// Binary safe comparison of $len first characters | ||
if (strncmp($libraryPrefix, $className, $len) !== 0) { | ||
return; | ||
} | ||
|
||
$classPath = str_replace('\\', '/', substr($className, $len)) . '.php'; | ||
$file = $libraryDirectory . $classPath; | ||
|
||
if (file_exists($file)) { | ||
require $file; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.