removed application and resolver classes. added phpunit tests.

This commit is contained in:
Taylor Otwell
2011-09-04 23:19:14 -05:00
parent d35e2abd77
commit cb8e8194ce
14 changed files with 146 additions and 88 deletions

View File

@@ -141,4 +141,21 @@ class Container {
return $object;
}
/**
* Magic Method for resolving classes out of the IoC container.
*/
public function __get($key)
{
if ($this->registered('laravel.'.$key))
{
return $this->resolve('laravel.'.$key);
}
elseif ($this->registered($key))
{
return $this->resolve($key);
}
throw new \Exception("Attempting to resolve undefined class [$key].");
}
}