added shortcut for registering controllers in the ioc container.

This commit is contained in:
Taylor Otwell
2012-01-16 16:50:34 -06:00
parent f182ae277f
commit d50638cc75

View File

@@ -70,6 +70,18 @@ class IoC {
static::$singletons[$name] = $instance;
}
/**
* Register a controller with the IoC container.
*
* @param string $name
* @param Closure $resolver
* @return void
*/
public static function controller($name, $resolver)
{
static::register("controller: {$name}", $resolver);
}
/**
* Resolve a core Laravel class from the container.
*