Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modification on autoloading : use composer/composer project
- Loading branch information
Benjamin RICHARD
committed
Jan 4, 2012
1 parent
a21c322
commit fd001d4
Showing
6 changed files
with
20 additions
and
105 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the RebolonPagerBundle package. | ||
* | ||
* It has been freely inspired by FOSUserBundle | ||
*/ | ||
$loader = require __DIR__.'/../vendor/.composer/autoload.php'; | ||
$loader->register(); | ||
|
||
if (file_exists($file = __DIR__.'/autoload.php')) { | ||
require_once $file; | ||
} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) { | ||
require_once $file; | ||
} | ||
// @todo : resolve this autoload requirements whereas it should not be !!! | ||
spl_autoload_register(function($class) { | ||
if (0 === strpos($class, 'Rebolon\\PagerBundle\\')) { | ||
$path = __DIR__ . '/../' . implode('/', array_slice(explode('\\', $class), 2)) . '.php'; | ||
|
||
if (!stream_resolve_include_path($path)) { | ||
return false; | ||
} | ||
require_once $path; | ||
return true; | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
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