refactoring.

This commit is contained in:
Taylor Otwell
2011-09-27 21:10:32 -05:00
parent ed3e3e73cc
commit c6f9734603
15 changed files with 253 additions and 178 deletions

View File

@@ -130,6 +130,25 @@ class Container {
$this->singletons[$name] = $instance;
}
/**
* Resolve a core Laravel class from the container.
*
* <code>
* // Resolve the "laravel.input" class from the container
* $input = IoC::container()->core('input');
*
* // Equivalent resolution using the "resolve" method
* $input = IoC::container()->resolve('laravel.input');
* </code>
*
* @param string $name
* @return mixed
*/
public function core($name)
{
return $this->resolve("laravel.{$name}");
}
/**
* Resolve an object instance from the container.
*