added facades for core classes.

This commit is contained in:
Taylor Otwell
2011-09-03 22:36:27 -05:00
parent 86da3af7a1
commit 31e2c1c49e
20 changed files with 135 additions and 69 deletions

15
laravel/facade.php Normal file
View File

@@ -0,0 +1,15 @@
<?php namespace Laravel;
abstract class Facade {
/**
* Magic Method for passing methods to a class registered in the IoC container.
* This provides a convenient method of accessing functions on classes that
* could not otherwise be accessed staticly.
*/
public static function __callStatic($method, $parameters)
{
return call_user_func_array(array(IoC::container()->resolve('laravel.'.static::$resolve), $method), $parameters);
}
}