added facades and made other ioc improvements.

This commit is contained in:
Taylor Otwell
2011-08-30 22:09:47 -05:00
parent 501953f2db
commit 0ef96fb8d0
27 changed files with 271 additions and 276 deletions

View File

@@ -1,6 +1,8 @@
<?php namespace Laravel;
class Package {
class Package extends Facade { public static $resolve = 'package'; }
class Package_Engine {
/**
* All of the loaded packages.
@@ -14,19 +16,11 @@ class Package {
*
* The package name should correspond to a package directory for your application.
*
* <code>
* // Load the "swift-mailer" package
* Package::load('swift-mailer');
*
* // Load the "swift-mailer" and "facebook" package
* Package::load(array('swift-mailer', 'facebook'));
* </code>
*
* @param string|array $packages
* @param string $path
* @return void
*/
public function load($packages, $path = PACKAGE_PATH)
public function load($packages, $path)
{
foreach ((array) $packages as $package)
{
@@ -42,11 +36,6 @@ class Package {
/**
* Determine if a given package has been loaded.
*
* <code>
* // Determine if the "swift-mailer" package has been loaded
* $loaded = Package::loaded('swift-mailer');
* </code>
*
* @param string $package
* @return bool
*/