Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Commit

Permalink
Autoload drops if classname is not namespaced.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Oct 21, 2013
1 parent 7f9ef90 commit 436f30f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Consistency.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ function ( $current, $key ) use ( $path, $parts ) {
public static function autoload ( $classname ) {

if(false === strpos($classname, '\\'))
$classname = str_replace('_', '\\', $classname);
if(false === strpos($classname, '_'))
return false;
else
$classname = str_replace('_', '\\', $classname);

$classname = ltrim($classname, '\\');

Expand Down

0 comments on commit 436f30f

Please sign in to comment.