pscheit / psc-cms-boot
Boot strapping package for Webforge
Installs: 1 120
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
README
PHP Bootloading Sucks - at least that helps to suck a little more less
- manages to load the autoload for composer (even if you're bootstrapping as a dependency)
- helps in early stages bootstrapping
- lets you bootstrap a Psc - CMS - Container for Psc - CMS - Projects
Copy the lib/package.boot.php
next to your bootstrap.php
use Psc\Boot\BootLoader; require 'package.boot.php'; $bootLoader = new BootLoader(__DIR__, 'ACME\Container'); $bootLoader->loadComposer(); $bootLoader->registerContainer(); // this is optional
When you registered the Container $GLOBALS['env']['container']
points to the ACME\Container
.
When you do $bootLoader->registerRootDirectory
the $GLOBALS['env']['root']
points to a \Webforge\Common\System\Dir
which is the directory of your bootstrap.php (given here as DIR).