-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
2,186 additions
and
1,434 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* | ||
* Author: Andrei Baicus <[email protected]> | ||
* Created on: 17/08/2018 | ||
* | ||
* @package Neve | ||
*/ | ||
|
||
|
@@ -78,8 +79,8 @@ public function load_class( $class ) { | |
|
||
// work backwards through the namespace names of the fully-qualified | ||
// class name to find a mapped file name | ||
while ( false !== $pos = strrpos( $prefix, '\\' ) ) { | ||
|
||
while ( false !== strrpos( $prefix, '\\' ) ) { | ||
$pos = strrpos( $prefix, '\\' ); | ||
// retain the trailing namespace separator in the prefix | ||
$prefix = substr( $class, 0, $pos + 1 ); | ||
|
||
|
@@ -123,8 +124,8 @@ protected function load_mapped_file( $prefix, $relative_class ) { | |
// replace namespace separators with directory separators | ||
// in the relative class name, append with .php | ||
$file = $base_dir | ||
. str_replace( '\\', '/', $relative_class ) | ||
. '.php'; | ||
. str_replace( '\\', '/', $relative_class ) | ||
. '.php'; | ||
|
||
// if the mapped file exists, require it | ||
if ( $this->require_file( $file ) ) { | ||
|
@@ -153,4 +154,4 @@ protected function require_file( $file ) { | |
|
||
return false; | ||
} | ||
} | ||
} |
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.