From 38da3b86cd957fa1bd7235df292adc47c748b09e Mon Sep 17 00:00:00 2001 From: Barry Date: Wed, 20 Mar 2013 15:17:05 +0100 Subject: [PATCH] Detect facades automaticcaly --- _IDE_helper.php | 11576 ++++++++-------- readme.md | 4 +- .../LaravelIdeHelper/GeneratorCommand.php | 25 +- src/config/config.php | 37 +- 4 files changed, 5852 insertions(+), 5790 deletions(-) diff --git a/_IDE_helper.php b/_IDE_helper.php index 93e9b94..52f8e90 100644 --- a/_IDE_helper.php +++ b/_IDE_helper.php @@ -1,583 +1,11 @@ __construct(); - } - - /** - * Bind the installation paths to the application. - * - * @static - * @param array $paths - */ - public static function bindInstallPaths($paths){ - self::$realClass->bindInstallPaths($paths); - } - - /** - * Get the application bootstrap file. - * - * @static - * @return string - */ - public static function getBootstrapFile(){ - return self::$realClass->getBootstrapFile(); - } - - /** - * Register the aliased class loader. - * - * @static - * @param array $aliases - */ - public static function registerAliasLoader($aliases){ - self::$realClass->registerAliasLoader($aliases); - } - - /** - * Start the exception handling for the request. - * - * @static - */ - public static function startExceptionHandling(){ - self::$realClass->startExceptionHandling(); - } - - /** - * Get the current application environment. - * - * @static - * @return string - */ - public static function environment(){ - return self::$realClass->environment(); - } - - /** - * Detect the application's current environment. - * - * @static - * @param array|string $environments - * @return string - */ - public static function detectEnvironment($environments){ - return self::$realClass->detectEnvironment($environments); - } - - /** - * Determine if we are running in the console. - * - * @static - * @return bool - */ - public static function runningInConsole(){ - return self::$realClass->runningInConsole(); - } - - /** - * Determine if we are running unit tests. - * - * @static - * @return bool - */ - public static function runningUnitTests(){ - return self::$realClass->runningUnitTests(); - } - - /** - * Register a service provider with the application. - * - * @static - * @param Illuminate\Support\ServiceProvider|string $provider - * @param array $options - */ - public static function register($provider, $options = array()){ - self::$realClass->register($provider, $options); - } - - /** - * Load and boot all of the remaining deferred providers. - * - * @static - */ - public static function loadDeferredProviders(){ - self::$realClass->loadDeferredProviders(); - } - - /** - * Resolve the given type from the container. - * (Overriding Container::make) - * - * @static - * @param string $abstract - * @param array $parameters - * @return mixed - */ - public static function make($abstract, $parameters = array()){ - return self::$realClass->make($abstract, $parameters); - } - - /** - * Register a "before" application filter. - * - * @static - * @param Closure|string $callback - */ - public static function before($callback){ - self::$realClass->before($callback); - } - - /** - * Register an "after" application filter. - * - * @static - * @param Closure|string $callback - */ - public static function after($callback){ - self::$realClass->after($callback); - } - - /** - * Register a "close" application filter. - * - * @static - * @param Closure|string $callback - */ - public static function close($callback){ - self::$realClass->close($callback); - } - - /** - * Register a "finish" application filter. - * - * @static - * @param Closure|string $callback - */ - public static function finish($callback){ - self::$realClass->finish($callback); - } - - /** - * Register a "shutdown" callback. - * - * @static - * @param callable $callback - */ - public static function shutdown($callback = null){ - self::$realClass->shutdown($callback); - } - - /** - * Handles the given request and delivers the response. - * - * @static - */ - public static function run(){ - self::$realClass->run(); - } - - /** - * Handle the given request and get the response. - * - * @static - * @param Illuminate\Foundation\Request $request - * @return Symfony\Component\HttpFoundation\Response - */ - public static function dispatch($request){ - return self::$realClass->dispatch($request); - } - - /** - * Handle the given request and get the response. - * Provides compatibility with BrowserKit functional testing. - * - * @static - * @param Illuminate\Foundation\Request $request - * @param int $type - * @param bool $catch - * @return Symfony\Component\HttpFoundation\Response - */ - public static function handle($request, $type = '1', $catch = true){ - return self::$realClass->handle($request, $type, $catch); - } - - /** - * Boot the application's service providers. - * - * @static - */ - public static function boot(){ - self::$realClass->boot(); - } - - /** - * Register a new boot listener. - * - * @static - * @param mixed $callback - */ - public static function booting($callback){ - self::$realClass->booting($callback); - } - - /** - * Register a new "booted" listener. - * - * @static - * @param mixed $callback - */ - public static function booted($callback){ - self::$realClass->booted($callback); - } - - /** - * Prepare the request by injecting any services. - * - * @static - * @param Illuminate\Foundation\Request $request - * @return Illuminate\Foundation\Request - */ - public static function prepareRequest($request){ - return self::$realClass->prepareRequest($request); - } - - /** - * Prepare the given value as a Response object. - * - * @static - * @param mixed $value - * @param Illuminate\Foundation\Request $request - * @return Symfony\Component\HttpFoundation\Response - */ - public static function prepareResponse($value, $request){ - return self::$realClass->prepareResponse($value, $request); - } - - /** - * Set the current application locale. - * - * @static - * @param string $locale - */ - public static function setLocale($locale){ - self::$realClass->setLocale($locale); - } - - /** - * Throw an HttpException with the given data. - * - * @static - * @param int $code - * @param string $message - * @param array $headers - */ - public static function abort($code, $message = '', $headers = array()){ - self::$realClass->abort($code, $message, $headers); - } - - /** - * Register a 404 error handler. - * - * @static - * @param Closure $callback - */ - public static function missing($callback){ - self::$realClass->missing($callback); - } - - /** - * Register an application error handler. - * - * @static - * @param Closure $callback - */ - public static function error($callback){ - self::$realClass->error($callback); - } - - /** - * Register an error handler for fatal errors. - * - * @static - * @param Closure $callback - */ - public static function fatal($callback){ - self::$realClass->fatal($callback); - } - - /** - * Get the service providers that have been loaded. - * - * @static - * @return array - */ - public static function getLoadedProviders(){ - return self::$realClass->getLoadedProviders(); - } - - /** - * Set the application's deferred services. - * - * @static - * @param array $services - */ - public static function setDeferredServices($services){ - self::$realClass->setDeferredServices($services); - } - - /** - * Dynamically access application services. - * - * @static - * @param string $key - * @return mixed - */ - public static function __get($key){ - return self::$realClass->__get($key); - } - - /** - * Dynamically set application services. - * - * @static - * @param string $key - * @param mixed $value - */ - public static function __set($key, $value){ - self::$realClass->__set($key, $value); - } - - /** - * Determine if the given abstract type has been bound. - * - * @static - * @param string $abstract - * @return bool - */ - public static function bound($abstract){ - return self::$realClass->bound($abstract); - } - - /** - * Register a binding with the container. - * - * @static - * @param string $abstract - * @param Closure|string|null $concrete - * @param bool $shared - */ - public static function bind($abstract, $concrete = null, $shared = false){ - self::$realClass->bind($abstract, $concrete, $shared); - } - - /** - * Register a binding if it hasn't already been registered. - * - * @static - * @param string $abstract - * @param Closure|string|null $concrete - * @param bool $shared - * @return bool - */ - public static function bindIf($abstract, $concrete = null, $shared = false){ - return self::$realClass->bindIf($abstract, $concrete, $shared); - } - - /** - * Register a shared binding in the container. - * - * @static - * @param string $abstract - * @param Closure|string|null $concrete - */ - public static function singleton($abstract, $concrete = null){ - self::$realClass->singleton($abstract, $concrete); - } - - /** - * Wrap a Closure such that it is shared. - * - * @static - * @param Closure $closure - * @return Closure - */ - public static function share($closure){ - return self::$realClass->share($closure); - } - - /** - * "Extend" an abstract type in the container. - * - * @static - * @param string $abstract - * @param Closure $closure - */ - public static function extend($abstract, $closure){ - self::$realClass->extend($abstract, $closure); - } - - /** - * Register an existing instance as shared in the container. - * - * @static - * @param string $abstract - * @param mixed $instance - */ - public static function instance($abstract, $instance){ - self::$realClass->instance($abstract, $instance); - } - - /** - * Alias a type to a shorter name. - * - * @static - * @param string $abstract - * @param string $alias - */ - public static function alias($abstract, $alias){ - self::$realClass->alias($abstract, $alias); - } - - /** - * Instantiate a concrete instance of the given type. - * - * @static - * @param string $concrete - * @param array $parameters - * @return mixed - */ - public static function build($concrete, $parameters = array()){ - return self::$realClass->build($concrete, $parameters); - } - - /** - * Register a new resolving callback. - * - * @static - * @param Closure $callback - */ - public static function resolving($callback){ - self::$realClass->resolving($callback); - } - - /** - * Get the container's bindings. - * - * @static - * @return array - */ - public static function getBindings(){ - return self::$realClass->getBindings(); - } - - /** - * Determine if a given offset exists. - * - * @static - * @param string $key - * @return bool - */ - public static function offsetExists($key){ - return self::$realClass->offsetExists($key); - } - - /** - * Get the value at a given offset. - * - * @static - * @param string $key - * @return mixed - */ - public static function offsetGet($key){ - return self::$realClass->offsetGet($key); - } - - /** - * Set the value at a given offset. - * - * @static - * @param string $key - * @param mixed $value - */ - public static function offsetSet($key, $value){ - self::$realClass->offsetSet($key, $value); - } - - /** - * Unset the value at a given offset. - * - * @static - * @param string $key - */ - public static function offsetUnset($key){ - self::$realClass->offsetUnset($key); - } - - } -} - -namespace { - class Artisan{ - /** - * @var Illuminate\Foundation\Artisan $realClass - */ - static private $realClass; - - /** - * Create a new Artisan command runner instance. - * - * @static - * @param Illuminate\Foundation\Application $app - */ - public static function __construct($app){ - self::$realClass->__construct($app); - } - - /** - * Run an Artisan console command by name. - * - * @static - * @param string $command - * @param array $parameters - * @param Symfony\Component\Console\Output\OutputInterface $output - */ - public static function call($command, $parameters = array(), $output = null){ - self::$realClass->call($command, $parameters, $output); - } - - /** - * Dynamically pass all missing methods to console Artisan. - * - * @static - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __call($method, $parameters){ - return self::$realClass->__call($method, $parameters); - } - - } -} - namespace { class Auth{ /** - * @var Illuminate\Auth\Guard $realClass + * @var Illuminate\Auth\Guard $root */ - static private $realClass; + static private $root; /** * Create a new authentication guard. @@ -587,7 +15,7 @@ namespace { * @param Illuminate\Session\Store $session */ public static function __construct($provider, $session){ - self::$realClass->__construct($provider, $session); + self::$root->__construct($provider, $session); } /** @@ -597,7 +25,7 @@ namespace { * @return bool */ public static function check(){ - return self::$realClass->check(); + return self::$root->check(); } /** @@ -607,7 +35,7 @@ namespace { * @return bool */ public static function guest(){ - return self::$realClass->guest(); + return self::$root->guest(); } /** @@ -617,7 +45,7 @@ namespace { * @return Illuminate\Auth\UserInterface|null */ public static function user(){ - return self::$realClass->user(); + return self::$root->user(); } /** @@ -628,7 +56,7 @@ namespace { * @return bool */ public static function stateless($credentials = array()){ - return self::$realClass->stateless($credentials); + return self::$root->stateless($credentials); } /** @@ -639,7 +67,7 @@ namespace { * @return bool */ public static function validate($credentials = array()){ - return self::$realClass->validate($credentials); + return self::$root->validate($credentials); } /** @@ -652,7 +80,7 @@ namespace { * @return bool */ public static function attempt($credentials = array(), $remember = false, $login = true){ - return self::$realClass->attempt($credentials, $remember, $login); + return self::$root->attempt($credentials, $remember, $login); } /** @@ -663,7 +91,7 @@ namespace { * @param bool $remember */ public static function login($user, $remember = false){ - self::$realClass->login($user, $remember); + self::$root->login($user, $remember); } /** @@ -675,7 +103,7 @@ namespace { * @return Illuminate\Auth\UserInterface */ public static function loginUsingId($id, $remember = false){ - return self::$realClass->loginUsingId($id, $remember); + return self::$root->loginUsingId($id, $remember); } /** @@ -684,7 +112,7 @@ namespace { * @static */ public static function logout(){ - self::$realClass->logout(); + self::$root->logout(); } /** @@ -694,7 +122,7 @@ namespace { * @return Illuminate\CookieJar */ public static function getCookieJar(){ - return self::$realClass->getCookieJar(); + return self::$root->getCookieJar(); } /** @@ -704,7 +132,7 @@ namespace { * @param Illuminate\CookieJar $cookie */ public static function setCookieJar($cookie){ - self::$realClass->setCookieJar($cookie); + self::$root->setCookieJar($cookie); } /** @@ -714,7 +142,7 @@ namespace { * @return Illuminate\Events\Dispatcher */ public static function getDispatcher(){ - return self::$realClass->getDispatcher(); + return self::$root->getDispatcher(); } /** @@ -724,7 +152,7 @@ namespace { * @param Illuminate\Events\Dispatcher */ public static function setDispatcher($events){ - self::$realClass->setDispatcher($events); + self::$root->setDispatcher($events); } /** @@ -734,7 +162,7 @@ namespace { * @return Illuminate\Session\Store */ public static function getSession(){ - return self::$realClass->getSession(); + return self::$root->getSession(); } /** @@ -744,7 +172,7 @@ namespace { * @return array */ public static function getQueuedCookies(){ - return self::$realClass->getQueuedCookies(); + return self::$root->getQueuedCookies(); } /** @@ -754,7 +182,7 @@ namespace { * @return Illuminate\Auth\UserProviderInterface */ public static function getProvider(){ - return self::$realClass->getProvider(); + return self::$root->getProvider(); } /** @@ -764,7 +192,7 @@ namespace { * @return Illuminate\Auth\UserInterface|null */ public static function getUser(){ - return self::$realClass->getUser(); + return self::$root->getUser(); } /** @@ -774,7 +202,7 @@ namespace { * @param Illuminate\Auth\UserInterface $user */ public static function setUser($user){ - self::$realClass->setUser($user); + self::$root->setUser($user); } /** @@ -784,7 +212,7 @@ namespace { * @return string */ public static function getName(){ - return self::$realClass->getName(); + return self::$root->getName(); } /** @@ -794,136 +222,7 @@ namespace { * @return string */ public static function getRecallerName(){ - return self::$realClass->getRecallerName(); - } - - } -} - -namespace { - class Blade{ - /** - * @var Illuminate\View\Compilers\BladeCompiler $realClass - */ - static private $realClass; - - /** - * Compile the view at the given path. - * - * @static - * @param string $path - */ - public static function compile($path){ - self::$realClass->compile($path); - } - - /** - * Compile the given Blade template contents. - * - * @static - * @param string $value - * @return string - */ - public static function compileString($value){ - return self::$realClass->compileString($value); - } - - /** - * Register a custom Blade compiler. - * - * @static - * @param Closure $compiler - */ - public static function extend($compiler){ - self::$realClass->extend($compiler); - } - - /** - * Get the regular expression for a generic Blade function. - * - * @static - * @param string $function - * @return string - */ - public static function createMatcher($function){ - return self::$realClass->createMatcher($function); - } - - /** - * Get the regular expression for a generic Blade function. - * - * @static - * @param string $function - * @return string - */ - public static function createOpenMatcher($function){ - return self::$realClass->createOpenMatcher($function); - } - - /** - * Create a plain Blade matcher. - * - * @static - * @param string $function - * @return string - */ - public static function createPlainMatcher($function){ - return self::$realClass->createPlainMatcher($function); - } - - /** - * Sets the content tags used for the compiler. - * - * @static - * @param string $openTag - * @param string $closeTag - * @param array $raw - */ - public static function setContentTags($openTag, $closeTag, $raw = false){ - self::$realClass->setContentTags($openTag, $closeTag, $raw); - } - - /** - * Sets the raw content tags used for the compiler. - * - * @static - * @param string $openTag - * @param string $closeTag - */ - public static function setEscapedContentTags($openTag, $closeTag){ - self::$realClass->setEscapedContentTags($openTag, $closeTag); - } - - /** - * Create a new compiler instance. - * - * @static - * @param string $cachePath - */ - public static function __construct($files, $cachePath){ - self::$realClass->__construct($files, $cachePath); - } - - /** - * Get the path to the compiled version of a view. - * - * @static - * @param string $path - * @return string - */ - public static function getCompiledPath($path){ - return self::$realClass->getCompiledPath($path); - } - - /** - * Determine if the view at the given path is expired. - * - * @static - * @param string $path - * @return bool - */ - public static function isExpired($path){ - return self::$realClass->isExpired($path); + return self::$root->getRecallerName(); } } @@ -932,9 +231,9 @@ namespace { namespace { class Cache{ /** - * @var Illuminate\Cache\Store $realClass + * @var Illuminate\Cache\Store $root */ - static private $realClass; + static private $root; /** * Determine if an item exists in the cache. @@ -944,7 +243,7 @@ namespace { * @return bool */ public static function has($key){ - return self::$realClass->has($key); + return self::$root->has($key); } /** @@ -956,7 +255,7 @@ namespace { * @return mixed */ public static function get($key, $default = null){ - return self::$realClass->get($key, $default); + return self::$root->get($key, $default); } /** @@ -968,7 +267,7 @@ namespace { * @param int $minutes */ public static function put($key, $value, $minutes){ - self::$realClass->put($key, $value, $minutes); + self::$root->put($key, $value, $minutes); } /** @@ -980,7 +279,7 @@ namespace { * @param int $minutes */ public static function add($key, $value, $minutes){ - self::$realClass->add($key, $value, $minutes); + self::$root->add($key, $value, $minutes); } /** @@ -991,7 +290,7 @@ namespace { * @param int $value */ public static function increment($key, $value = '1'){ - self::$realClass->increment($key, $value); + self::$root->increment($key, $value); } /** @@ -1002,7 +301,7 @@ namespace { * @param int $value */ public static function decrement($key, $value = '1'){ - self::$realClass->decrement($key, $value); + self::$root->decrement($key, $value); } /** @@ -1013,7 +312,7 @@ namespace { * @param mixed $value */ public static function forever($key, $value){ - self::$realClass->forever($key, $value); + self::$root->forever($key, $value); } /** @@ -1026,7 +325,7 @@ namespace { * @return */ public static function remember($key, $minutes, $callback){ - return self::$realClass->remember($key, $minutes, $callback); + return self::$root->remember($key, $minutes, $callback); } /** @@ -1038,7 +337,7 @@ namespace { * @return */ public static function rememberForever($key, $callback){ - return self::$realClass->rememberForever($key, $callback); + return self::$root->rememberForever($key, $callback); } /** @@ -1048,7 +347,7 @@ namespace { * @param string $key */ public static function forget($key){ - self::$realClass->forget($key); + self::$root->forget($key); } /** @@ -1057,7 +356,7 @@ namespace { * @static */ public static function flush(){ - self::$realClass->flush(); + self::$root->flush(); } /** @@ -1067,7 +366,7 @@ namespace { * @return int */ public static function getDefaultCacheTime(){ - return self::$realClass->getDefaultCacheTime(); + return self::$root->getDefaultCacheTime(); } /** @@ -1077,7 +376,7 @@ namespace { * @param int $minutes */ public static function setDefaultCacheTime($minutes){ - self::$realClass->setDefaultCacheTime($minutes); + self::$root->setDefaultCacheTime($minutes); } /** @@ -1088,7 +387,7 @@ namespace { * @return bool */ public static function existsInMemory($key){ - return self::$realClass->existsInMemory($key); + return self::$root->existsInMemory($key); } /** @@ -1098,7 +397,7 @@ namespace { * @return array */ public static function getMemory(){ - return self::$realClass->getMemory(); + return self::$root->getMemory(); } /** @@ -1109,7 +408,7 @@ namespace { * @return bool */ public static function offsetExists($key){ - return self::$realClass->offsetExists($key); + return self::$root->offsetExists($key); } /** @@ -1120,7 +419,7 @@ namespace { * @return mixed */ public static function offsetGet($key){ - return self::$realClass->offsetGet($key); + return self::$root->offsetGet($key); } /** @@ -1131,7 +430,7 @@ namespace { * @param mixed $value */ public static function offsetSet($key, $value){ - self::$realClass->offsetSet($key, $value); + self::$root->offsetSet($key, $value); } /** @@ -1141,533 +440,7 @@ namespace { * @param string $key */ public static function offsetUnset($key){ - self::$realClass->offsetUnset($key); - } - - } -} - -namespace { - class ClassLoader{ - /** - * @var Illuminate\Support\ClassLoader $realClass - */ - static private $realClass; - - /** - * Load the given class file. - * - * @static - * @param string $class - */ - public static function load($class){ - self::$realClass->load($class); - } - - /** - * Get the normal file name for a class. - * - * @static - * @param string $class - * @return string - */ - public static function normalizeClass($class){ - return self::$realClass->normalizeClass($class); - } - - /** - * Register the given class loader on the auto-loader stack. - * - * @static - */ - public static function register(){ - self::$realClass->register(); - } - - /** - * Add directories to the class loader. - * - * @static - * @param string|array $directories - */ - public static function addDirectories($directories){ - self::$realClass->addDirectories($directories); - } - - /** - * Remove directories from the class loader. - * - * @static - * @param string|array $directories - */ - public static function removeDirectories($directories = null){ - self::$realClass->removeDirectories($directories); - } - - /** - * Gets all the directories registered with the loader. - * - * @static - * @return array - */ - public static function getDirectories(){ - return self::$realClass->getDirectories(); - } - - } -} - -namespace { - class Config{ - /** - * @var Illuminate\Config\Repository $realClass - */ - static private $realClass; - - /** - * Create a new configuration repository. - * - * @static - * @param Illuminate\Config\LoaderInterface $loader - * @param string $environment - */ - public static function __construct($loader, $environment){ - self::$realClass->__construct($loader, $environment); - } - - /** - * Determine if the given configuration value exists. - * - * @static - * @param string $key - * @return bool - */ - public static function has($key){ - return self::$realClass->has($key); - } - - /** - * Determine if a configuration group exists. - * - * @static - * @param string $key - * @return bool - */ - public static function hasGroup($key){ - return self::$realClass->hasGroup($key); - } - - /** - * Get the specified configuration value. - * - * @static - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function get($key, $default = null){ - return self::$realClass->get($key, $default); - } - - /** - * Set a given configuration value. - * - * @static - * @param string $key - * @param mixed $value - */ - public static function set($key, $value){ - self::$realClass->set($key, $value); - } - - /** - * Register a package for cascading configuration. - * - * @static - * @param string $package - * @param string $hint - * @param string $namespace - */ - public static function package($package, $hint, $namespace = null){ - self::$realClass->package($package, $hint, $namespace); - } - - /** - * Register an after load callback for a given namespace. - * - * @static - * @param string $namespace - * @param Closure $callback - */ - public static function afterLoading($namespace, $callback){ - self::$realClass->afterLoading($namespace, $callback); - } - - /** - * Add a new namespace to the loader. - * - * @static - * @param string $namespace - * @param string $hint - */ - public static function addNamespace($namespace, $hint){ - self::$realClass->addNamespace($namespace, $hint); - } - - /** - * Returns all registered namespaces with the config - * loader. - * - * @static - * @return array - */ - public static function getNamespaces(){ - return self::$realClass->getNamespaces(); - } - - /** - * Get the loader implementation. - * - * @static - * @return Illuminate\Config\LoaderInterface - */ - public static function getLoader(){ - return self::$realClass->getLoader(); - } - - /** - * Set the loader implementation. - * - * @static - * @return Illuminate\Config\LoaderInterface - */ - public static function setLoader($loader){ - return self::$realClass->setLoader($loader); - } - - /** - * Get the current configuration environment. - * - * @static - * @return string - */ - public static function getEnvironment(){ - return self::$realClass->getEnvironment(); - } - - /** - * Get the after load callback array. - * - * @static - * @return array - */ - public static function getAfterLoadCallbacks(){ - return self::$realClass->getAfterLoadCallbacks(); - } - - /** - * Get all of the configuration items. - * - * @static - * @return array - */ - public static function getItems(){ - return self::$realClass->getItems(); - } - - /** - * Determine if the given configuration option exists. - * - * @static - * @param string $key - * @return bool - */ - public static function offsetExists($key){ - return self::$realClass->offsetExists($key); - } - - /** - * Get a configuration option. - * - * @static - * @param string $key - * @return bool - */ - public static function offsetGet($key){ - return self::$realClass->offsetGet($key); - } - - /** - * Set a configuration option. - * - * @static - * @param string $key - * @return bool - */ - public static function offsetSet($key, $value){ - return self::$realClass->offsetSet($key, $value); - } - - /** - * Unset a configuration option. - * - * @static - * @param string $key - * @return bool - */ - public static function offsetUnset($key){ - return self::$realClass->offsetUnset($key); - } - - /** - * Parse a key into namespace, group, and item. - * - * @static - * @param string $key - * @return array - */ - public static function parseKey($key){ - return self::$realClass->parseKey($key); - } - - /** - * Set the parsed value of a key. - * - * @static - * @param string $key - * @param array $parsed - */ - public static function setParsedKey($key, $parsed){ - self::$realClass->setParsedKey($key, $parsed); - } - - } -} - -namespace { - class Controller{ - /** - * @var Illuminate\Routing\Controllers\Controller $realClass - */ - static private $realClass; - - /** - * Register a new "before" filter on the controller. - * - * @static - * @param string $filter - * @param array $options - */ - public static function beforeFilter($filter, $options = array()){ - self::$realClass->beforeFilter($filter, $options); - } - - /** - * Register a new "after" filter on the controller. - * - * @static - * @param string $filter - * @param array $options - */ - public static function afterFilter($filter, $options = array()){ - self::$realClass->afterFilter($filter, $options); - } - - /** - * Execute an action on the controller. - * - * @static - * @param Illuminate\Container $container - * @param Illuminate\Routing\Router $router - * @param string $method - * @param array $parameters - * @return Symfony\Component\HttpFoundation\Response - */ - public static function callAction($container, $router, $method, $parameters){ - return self::$realClass->callAction($container, $router, $method, $parameters); - } - - /** - * Get the code registered filters. - * - * @static - * @return array - */ - public static function getControllerFilters(){ - return self::$realClass->getControllerFilters(); - } - - /** - * Handle calls to missing methods on the controller. - * - * @static - * @param array $parameters - * @return mixed - */ - public static function missingMethod($parameters){ - return self::$realClass->missingMethod($parameters); - } - - /** - * Handle calls to missing methods on the controller. - * - * @static - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __call($method, $parameters){ - return self::$realClass->__call($method, $parameters); - } - - } -} - -namespace { - class Cookie{ - /** - * @var Illuminate\Cookie\CookieJar $realClass - */ - static private $realClass; - - /** - * Create a new cookie manager instance. - * - * @static - * @param Symfony\Component\HttpFoundation\Request $request - * @param Illuminate\Encryption\Encrypter $encrypter - */ - public static function __construct($request, $encrypter){ - self::$realClass->__construct($request, $encrypter); - } - - /** - * Determine if a cookie exists and is not null. - * - * @static - * @param string $key - * @return bool - */ - public static function has($key){ - return self::$realClass->has($key); - } - - /** - * Get the value of the given cookie. - * - * @static - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function get($key, $default = null){ - return self::$realClass->get($key, $default); - } - - /** - * Create a new cookie instance. - * - * @static - * @param string $name - * @param string $value - * @param int $minutes - * @param string $path - * @param string $domain - * @param bool $secure - * @param bool $httpOnly - * @return Symfony\Component\HttpFoundation\Cookie - */ - public static function make($name, $value, $minutes = '0', $path = '/', $domain = null, $secure = false, $httpOnly = true){ - return self::$realClass->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly); - } - - /** - * Create a cookie that lasts "forever" (five years). - * - * @static - * @param string $name - * @param string $value - * @param string $path - * @param string $domain - * @param bool $secure - * @param bool $httpOnly - * @return Symfony\Component\HttpFoundation\Cookie - */ - public static function forever($name, $value, $path = '/', $domain = null, $secure = false, $httpOnly = true){ - return self::$realClass->forever($name, $value, $path, $domain, $secure, $httpOnly); - } - - /** - * Expire the given cookie. - * - * @static - * @param string $name - * @return Symfony\Component\HttpFoundation\Cookie - */ - public static function forget($name){ - return self::$realClass->forget($name); - } - - /** - * Get the request instance. - * - * @static - * @return Symfony\Component\HttpFoundation\Request - */ - public static function getRequest(){ - return self::$realClass->getRequest(); - } - - /** - * Get the encrypter instance. - * - * @static - * @return Illuminate\Encrypter - */ - public static function getEncrypter(){ - return self::$realClass->getEncrypter(); - } - - } -} - -namespace { - class Crypt{ - /** - * @var Illuminate\Encryption\Encrypter $realClass - */ - static private $realClass; - - /** - * Create a new encrypter instance. - * - * @static - * @param string $key - */ - public static function __construct($key){ - self::$realClass->__construct($key); - } - - /** - * Encrypt the given value. - * - * @static - * @param string $value - * @return string - */ - public static function encrypt($value){ - return self::$realClass->encrypt($value); - } - - /** - * Decrypt the given value. - * - * @static - * @param string $value - * @return string - */ - public static function decrypt($payload){ - return self::$realClass->decrypt($payload); + self::$root->offsetUnset($key); } } @@ -1676,9 +449,9 @@ namespace { namespace { class DB{ /** - * @var Illuminate\Database\Connection $realClass + * @var Illuminate\Database\Connection $root */ - static private $realClass; + static private $root; /** * Create a new database connection instance. @@ -1690,7 +463,7 @@ namespace { * @param array $config */ public static function __construct($pdo, $database = '', $tablePrefix = '', $config = array()){ - self::$realClass->__construct($pdo, $database, $tablePrefix, $config); + self::$root->__construct($pdo, $database, $tablePrefix, $config); } /** @@ -1699,7 +472,7 @@ namespace { * @static */ public static function useDefaultQueryGrammar(){ - self::$realClass->useDefaultQueryGrammar(); + self::$root->useDefaultQueryGrammar(); } /** @@ -1708,7 +481,7 @@ namespace { * @static */ public static function useDefaultSchemaGrammar(){ - self::$realClass->useDefaultSchemaGrammar(); + self::$root->useDefaultSchemaGrammar(); } /** @@ -1717,7 +490,7 @@ namespace { * @static */ public static function useDefaultPostProcessor(){ - self::$realClass->useDefaultPostProcessor(); + self::$root->useDefaultPostProcessor(); } /** @@ -1727,7 +500,7 @@ namespace { * @return Illuminate\Database\Schema\Builder */ public static function getSchemaBuilder(){ - return self::$realClass->getSchemaBuilder(); + return self::$root->getSchemaBuilder(); } /** @@ -1738,7 +511,7 @@ namespace { * @return Illuminate\Database\Query\Builder */ public static function table($table){ - return self::$realClass->table($table); + return self::$root->table($table); } /** @@ -1749,7 +522,7 @@ namespace { * @return Illuminate\Database\Query\Expression */ public static function raw($value){ - return self::$realClass->raw($value); + return self::$root->raw($value); } /** @@ -1761,7 +534,7 @@ namespace { * @return mixed */ public static function selectOne($query, $bindings = array()){ - return self::$realClass->selectOne($query, $bindings); + return self::$root->selectOne($query, $bindings); } /** @@ -1773,7 +546,7 @@ namespace { * @return array */ public static function select($query, $bindings = array()){ - return self::$realClass->select($query, $bindings); + return self::$root->select($query, $bindings); } /** @@ -1785,7 +558,7 @@ namespace { * @return bool */ public static function insert($query, $bindings = array()){ - return self::$realClass->insert($query, $bindings); + return self::$root->insert($query, $bindings); } /** @@ -1797,7 +570,7 @@ namespace { * @return int */ public static function update($query, $bindings = array()){ - return self::$realClass->update($query, $bindings); + return self::$root->update($query, $bindings); } /** @@ -1809,7 +582,7 @@ namespace { * @return int */ public static function delete($query, $bindings = array()){ - return self::$realClass->delete($query, $bindings); + return self::$root->delete($query, $bindings); } /** @@ -1821,7 +594,7 @@ namespace { * @return bool */ public static function statement($query, $bindings = array()){ - return self::$realClass->statement($query, $bindings); + return self::$root->statement($query, $bindings); } /** @@ -1833,7 +606,7 @@ namespace { * @return int */ public static function affectingStatement($query, $bindings = array()){ - return self::$realClass->affectingStatement($query, $bindings); + return self::$root->affectingStatement($query, $bindings); } /** @@ -1844,7 +617,7 @@ namespace { * @return bool */ public static function unprepared($query){ - return self::$realClass->unprepared($query); + return self::$root->unprepared($query); } /** @@ -1855,7 +628,7 @@ namespace { * @return array */ public static function prepareBindings($bindings){ - return self::$realClass->prepareBindings($bindings); + return self::$root->prepareBindings($bindings); } /** @@ -1866,7 +639,7 @@ namespace { * @return mixed */ public static function transaction($callback){ - return self::$realClass->transaction($callback); + return self::$root->transaction($callback); } /** @@ -1877,7 +650,7 @@ namespace { * @return array */ public static function pretend($callback){ - return self::$realClass->pretend($callback); + return self::$root->pretend($callback); } /** @@ -1888,7 +661,7 @@ namespace { * @param array $bindings */ public static function logQuery($query, $bindings, $time = null){ - self::$realClass->logQuery($query, $bindings, $time); + self::$root->logQuery($query, $bindings, $time); } /** @@ -1898,7 +671,7 @@ namespace { * @return PDO */ public static function getPdo(){ - return self::$realClass->getPdo(); + return self::$root->getPdo(); } /** @@ -1908,7 +681,7 @@ namespace { * @return string|null */ public static function getName(){ - return self::$realClass->getName(); + return self::$root->getName(); } /** @@ -1919,7 +692,7 @@ namespace { * @return mixed */ public static function getConfig($option){ - return self::$realClass->getConfig($option); + return self::$root->getConfig($option); } /** @@ -1929,7 +702,7 @@ namespace { * @return string */ public static function getDriverName(){ - return self::$realClass->getDriverName(); + return self::$root->getDriverName(); } /** @@ -1939,7 +712,7 @@ namespace { * @return Illuminate\Database\Query\Grammars\Grammar */ public static function getQueryGrammar(){ - return self::$realClass->getQueryGrammar(); + return self::$root->getQueryGrammar(); } /** @@ -1949,7 +722,7 @@ namespace { * @param Illuminate\Database\Query\Grammars\Grammar */ public static function setQueryGrammar($grammar){ - self::$realClass->setQueryGrammar($grammar); + self::$root->setQueryGrammar($grammar); } /** @@ -1959,7 +732,7 @@ namespace { * @return Illuminate\Database\Query\Grammars\Grammar */ public static function getSchemaGrammar(){ - return self::$realClass->getSchemaGrammar(); + return self::$root->getSchemaGrammar(); } /** @@ -1969,7 +742,7 @@ namespace { * @param Illuminate\Database\Schema\Grammars\Grammar */ public static function setSchemaGrammar($grammar){ - self::$realClass->setSchemaGrammar($grammar); + self::$root->setSchemaGrammar($grammar); } /** @@ -1979,7 +752,7 @@ namespace { * @return Illuminate\Database\Query\Processors\Processor */ public static function getPostProcessor(){ - return self::$realClass->getPostProcessor(); + return self::$root->getPostProcessor(); } /** @@ -1989,7 +762,7 @@ namespace { * @param Illuminate\Database\Query\Processors\Processor */ public static function setPostProcessor($processor){ - self::$realClass->setPostProcessor($processor); + self::$root->setPostProcessor($processor); } /** @@ -1999,7 +772,7 @@ namespace { * @return Illuminate\Events\Dispatcher */ public static function getEventDispatcher(){ - return self::$realClass->getEventDispatcher(); + return self::$root->getEventDispatcher(); } /** @@ -2009,7 +782,7 @@ namespace { * @param Illuminate\Events\Dispatcher */ public static function setEventDispatcher($events){ - self::$realClass->setEventDispatcher($events); + self::$root->setEventDispatcher($events); } /** @@ -2019,7 +792,7 @@ namespace { * @return Illuminate\Pagination\Environment */ public static function getPaginator(){ - return self::$realClass->getPaginator(); + return self::$root->getPaginator(); } /** @@ -2029,7 +802,7 @@ namespace { * @param Illuminate\Pagination\Environment|Closure $paginator */ public static function setPaginator($paginator){ - self::$realClass->setPaginator($paginator); + self::$root->setPaginator($paginator); } /** @@ -2039,7 +812,7 @@ namespace { * @return bool */ public static function pretending(){ - return self::$realClass->pretending(); + return self::$root->pretending(); } /** @@ -2049,7 +822,7 @@ namespace { * @return int */ public static function getFetchMode(){ - return self::$realClass->getFetchMode(); + return self::$root->getFetchMode(); } /** @@ -2060,7 +833,7 @@ namespace { * @return int */ public static function setFetchMode($fetchMode){ - return self::$realClass->setFetchMode($fetchMode); + return self::$root->setFetchMode($fetchMode); } /** @@ -2070,7 +843,7 @@ namespace { * @return array */ public static function getQueryLog(){ - return self::$realClass->getQueryLog(); + return self::$root->getQueryLog(); } /** @@ -2079,7 +852,7 @@ namespace { * @static */ public static function flushQueryLog(){ - self::$realClass->flushQueryLog(); + self::$root->flushQueryLog(); } /** @@ -2089,7 +862,7 @@ namespace { * @return string */ public static function getDatabaseName(){ - return self::$realClass->getDatabaseName(); + return self::$root->getDatabaseName(); } /** @@ -2100,7 +873,7 @@ namespace { * @return string */ public static function setDatabaseName($database){ - return self::$realClass->setDatabaseName($database); + return self::$root->setDatabaseName($database); } /** @@ -2110,7 +883,7 @@ namespace { * @return string */ public static function getTablePrefix(){ - return self::$realClass->getTablePrefix(); + return self::$root->getTablePrefix(); } /** @@ -2120,7 +893,7 @@ namespace { * @param string $prefix */ public static function setTablePrefix($prefix){ - self::$realClass->setTablePrefix($prefix); + self::$root->setTablePrefix($prefix); } /** @@ -2131,3406 +904,7 @@ namespace { * @return Illuminate\Database\Grammar */ public static function withTablePrefix($grammar){ - return self::$realClass->withTablePrefix($grammar); - } - - } -} - -namespace { - class Eloquent{ - /** - * @var Illuminate\Database\Eloquent\Model $realClass - */ - static private $realClass; - - /** - * Create a new Eloquent model instance. - * - * @static - * @param array $attributes - */ - public static function __construct($attributes = array()){ - self::$realClass->__construct($attributes); - } - - /** - * Fill the model with an array of attributes. - * - * @static - * @param array $attributes - * @return Illuminate\Database\Eloquent\Model - */ - public static function fill($attributes){ - return self::$realClass->fill($attributes); - } - - /** - * Create a new instance of the given model. - * - * @static - * @param array $attributes - * @param bool $exists - * @return Illuminate\Database\Eloquent\Model - */ - public static function newInstance($attributes = array(), $exists = false){ - return self::$realClass->newInstance($attributes, $exists); - } - - /** - * Create a new model instance that is existing. - * - * @static - * @param array $attributes - * @return Illuminate\Database\Eloquent\Model - */ - public static function newFromBuilder($attributes = array()){ - return self::$realClass->newFromBuilder($attributes); - } - - /** - * Save a new model and return the instance. - * - * @static - * @param array $attributes - * @return Illuminate\Database\Eloquent\Model - */ - public static function create($attributes){ - return self::$realClass->create($attributes); - } - - /** - * Begin querying the model on a given connection. - * - * @static - * @param string $connection - * @return Illuminate\Database\Eloquent\Builder - */ - public static function on($connection){ - return self::$realClass->on($connection); - } - - /** - * Get all of the models from the database. - * - * @static - * @param array $columns - * @return Illuminate\Database\Eloquent\Collection - */ - public static function all($columns = array()){ - return self::$realClass->all($columns); - } - - /** - * Find a model by its primary key. - * - * @static - * @param mixed $id - * @param array $columns - * @return Illuminate\Database\Eloquent\Model|Collection - */ - public static function find($id, $columns = array()){ - return self::$realClass->find($id, $columns); - } - - /** - * Being querying a model with eager loading. - * - * @static - * @param array $relations - * @return Illuminate\Database\Eloquent\Builder - */ - public static function with($relations){ - return self::$realClass->with($relations); - } - - /** - * Define a one-to-one relationship. - * - * @static - * @param string $related - * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relation\HasOne - */ - public static function hasOne($related, $foreignKey = null){ - return self::$realClass->hasOne($related, $foreignKey); - } - - /** - * Define a polymorphic one-to-one relationship. - * - * @static - * @param string $related - * @param string $name - * @param string $type - * @param string $id - * @return Illuminate\Database\Eloquent\Relation\MorphOne - */ - public static function morphOne($related, $name, $type = null, $id = null){ - return self::$realClass->morphOne($related, $name, $type, $id); - } - - /** - * Define an inverse one-to-one or many relationship. - * - * @static - * @param string $related - * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relations\BelongsTo - */ - public static function belongsTo($related, $foreignKey = null){ - return self::$realClass->belongsTo($related, $foreignKey); - } - - /** - * Define an polymorphic, inverse one-to-one or many relationship. - * - * @static - * @param string $name - * @param string $type - * @param string $id - * @return Illuminate\Database\Eloquent\Relations\BelongsTo - */ - public static function morphTo($name = null, $type = null, $id = null){ - return self::$realClass->morphTo($name, $type, $id); - } - - /** - * Define a one-to-many relationship. - * - * @static - * @param string $related - * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relations\HasMany - */ - public static function hasMany($related, $foreignKey = null){ - return self::$realClass->hasMany($related, $foreignKey); - } - - /** - * Define a polymorphic one-to-many relationship. - * - * @static - * @param string $related - * @param string $name - * @param string $type - * @param string $id - * @return Illuminate\Database\Eloquent\Relation\MorphMany - */ - public static function morphMany($related, $name, $type = null, $id = null){ - return self::$realClass->morphMany($related, $name, $type, $id); - } - - /** - * Define a many-to-many relationship. - * - * @static - * @param string $related - * @param string $table - * @param string $foreignKey - * @param string $otherKey - * @return Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public static function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null){ - return self::$realClass->belongsToMany($related, $table, $foreignKey, $otherKey); - } - - /** - * Get the joining table name for a many-to-many relation. - * - * @static - * @param string $related - * @return string - */ - public static function joiningTable($related){ - return self::$realClass->joiningTable($related); - } - - /** - * Delete the model from the database. - * - * @static - */ - public static function delete(){ - self::$realClass->delete(); - } - - /** - * Register an updating model event with the dispatcher. - * - * @static - * @param Closure $callback - */ - public static function updating($callback){ - self::$realClass->updating($callback); - } - - /** - * Register an updated model event with the dispatcher. - * - * @static - * @param Closure $callback - */ - public static function updated($callback){ - self::$realClass->updated($callback); - } - - /** - * Register a creating model event with the dispatcher. - * - * @static - * @param Closure $callback - */ - public static function creating($callback){ - self::$realClass->creating($callback); - } - - /** - * Register a created model event with the dispatcher. - * - * @static - * @param Closure $callback - */ - public static function created($callback){ - self::$realClass->created($callback); - } - - /** - * Save the model to the database. - * - * @static - * @return bool - */ - public static function save(){ - return self::$realClass->save(); - } - - /** - * Update the model's update timestamp. - * - * @static - * @return bool - */ - public static function touch(){ - return self::$realClass->touch(); - } - - /** - * Set the value of the "created at" attribute. - * - * @static - * @param mixed $value - */ - public static function setCreatedAt($value){ - self::$realClass->setCreatedAt($value); - } - - /** - * Set the value of the "updated at" attribute. - * - * @static - * @param mixed $value - */ - public static function setUpdatedAt($value){ - self::$realClass->setUpdatedAt($value); - } - - /** - * Get the name of the "created at" column. - * - * @static - * @return string - */ - public static function getCreatedAtColumn(){ - return self::$realClass->getCreatedAtColumn(); - } - - /** - * Get the name of the "updated at" column. - * - * @static - * @return string - */ - public static function getUpdatedAtColumn(){ - return self::$realClass->getUpdatedAtColumn(); - } - - /** - * Get a fresh timestamp for the model. - * - * @static - * @return mixed - */ - public static function freshTimestamp(){ - return self::$realClass->freshTimestamp(); - } - - /** - * Get a new query builder for the model's table. - * - * @static - * @return Illuminate\Database\Eloquent\Builder - */ - public static function newQuery(){ - return self::$realClass->newQuery(); - } - - /** - * Create a new Eloquent Collection instance. - * - * @static - * @param array $models - * @return Illuminate\Database\Eloquent\Collection - */ - public static function newCollection($models = array()){ - return self::$realClass->newCollection($models); - } - - /** - * Get the table associated with the model. - * - * @static - * @return string - */ - public static function getTable(){ - return self::$realClass->getTable(); - } - - /** - * Set the table associated with the model. - * - * @static - * @param string $table - */ - public static function setTable($table){ - self::$realClass->setTable($table); - } - - /** - * Get the value of the model's primary key. - * - * @static - * @return mixed - */ - public static function getKey(){ - return self::$realClass->getKey(); - } - - /** - * Get the primary key for the model. - * - * @static - * @return string - */ - public static function getKeyName(){ - return self::$realClass->getKeyName(); - } - - /** - * Determine if the model uses timestamps. - * - * @static - * @return bool - */ - public static function usesTimestamps(){ - return self::$realClass->usesTimestamps(); - } - - /** - * Get the number of models to return per page. - * - * @static - * @return int - */ - public static function getPerPage(){ - return self::$realClass->getPerPage(); - } - - /** - * Set the number of models ot return per page. - * - * @static - * @param int $perPage - */ - public static function setPerPage($perPage){ - self::$realClass->setPerPage($perPage); - } - - /** - * Get the default foreign key name for the model. - * - * @static - * @return string - */ - public static function getForeignKey(){ - return self::$realClass->getForeignKey(); - } - - /** - * Get the hidden attributes for the model. - * - * @static - * @return array - */ - public static function getHidden(){ - return self::$realClass->getHidden(); - } - - /** - * Set the hidden attributes for the model. - * - * @static - * @param array $hidden - */ - public static function setHidden($hidden){ - self::$realClass->setHidden($hidden); - } - - /** - * Get the fillable attributes for the model. - * - * @static - * @return array - */ - public static function getFillable(){ - return self::$realClass->getFillable(); - } - - /** - * Set the fillable attributes for the model. - * - * @static - * @param array $fillable - * @return Illuminate\Database\Eloquent\Model - */ - public static function fillable($fillable){ - return self::$realClass->fillable($fillable); - } - - /** - * Set the guarded attributes for the model. - * - * @static - * @param array $guarded - * @return Illuminate\Database\Eloquent\Model - */ - public static function guard($guarded){ - return self::$realClass->guard($guarded); - } - - /** - * Determine if the given attribute may be mass assigned. - * - * @static - * @param string $key - * @return bool - */ - public static function isFillable($key){ - return self::$realClass->isFillable($key); - } - - /** - * Get the value indicating whether the IDs are incrementing. - * - * @static - * @return bool - */ - public static function getIncrementing(){ - return self::$realClass->getIncrementing(); - } - - /** - * Set whether IDs are incrementing. - * - * @static - * @param bool $value - */ - public static function setIncrementing($value){ - self::$realClass->setIncrementing($value); - } - - /** - * Convert the model instance to JSON. - * - * @static - * @param int $options - * @return string - */ - public static function toJson($options = '0'){ - return self::$realClass->toJson($options); - } - - /** - * Convert the model instance to an array. - * - * @static - * @return array - */ - public static function toArray(){ - return self::$realClass->toArray(); - } - - /** - * Convert the model's attributes to an array. - * - * @static - * @return array - */ - public static function attributesToArray(){ - return self::$realClass->attributesToArray(); - } - - /** - * Get the model's relationships in array form. - * - * @static - * @return array - */ - public static function relationsToArray(){ - return self::$realClass->relationsToArray(); - } - - /** - * Get an attribute from the model. - * - * @static - * @param string $key - * @return mixed - */ - public static function getAttribute($key){ - return self::$realClass->getAttribute($key); - } - - /** - * Determine if a get mutator exists for an attribute. - * - * @static - * @param string $key - * @return bool - */ - public static function hasGetMutator($key){ - return self::$realClass->hasGetMutator($key); - } - - /** - * Set a given attribute on the model. - * - * @static - * @param string $key - * @param mixed $value - */ - public static function setAttribute($key, $value){ - self::$realClass->setAttribute($key, $value); - } - - /** - * Determine if a set mutator exists for an attribute. - * - * @static - * @param string $key - * @return bool - */ - public static function hasSetMutator($key){ - return self::$realClass->hasSetMutator($key); - } - - /** - * Get all of the current attributes on the model. - * - * @static - * @return array - */ - public static function getAttributes(){ - return self::$realClass->getAttributes(); - } - - /** - * Set the array of model attributes. No checking is done. - * - * @static - * @param array $attributes - * @param bool $sync - */ - public static function setRawAttributes($attributes, $sync = false){ - self::$realClass->setRawAttributes($attributes, $sync); - } - - /** - * Get the model's original attribute values. - * - * @static - * @param string|null $key - * @param mixed $default - * @return array - */ - public static function getOriginal($key = null, $default = null){ - return self::$realClass->getOriginal($key, $default); - } - - /** - * Sync the original attributes with the current. - * - * @static - * @return Illuminate\Database\Eloquent\Model - */ - public static function syncOriginal(){ - return self::$realClass->syncOriginal(); - } - - /** - * Get the attributes that have been changed since last sync. - * - * @static - * @return array - */ - public static function getDirty(){ - return self::$realClass->getDirty(); - } - - /** - * Get a specified relationship. - * - * @static - * @param string $relation - * @return mixed - */ - public static function getRelation($relation){ - return self::$realClass->getRelation($relation); - } - - /** - * Set the specific relationship in the model. - * - * @static - * @param string $relation - * @param mixed $value - */ - public static function setRelation($relation, $value){ - self::$realClass->setRelation($relation, $value); - } - - /** - * Get the database connection for the model. - * - * @static - * @return Illuminate\Database\Connection - */ - public static function getConnection(){ - return self::$realClass->getConnection(); - } - - /** - * Get the current connection name for the model. - * - * @static - * @return string - */ - public static function getConnectionName(){ - return self::$realClass->getConnectionName(); - } - - /** - * Set the connection associated with the model. - * - * @static - * @param string $name - */ - public static function setConnection($name){ - self::$realClass->setConnection($name); - } - - /** - * Resolve a connection instance by name. - * - * @static - * @param string $connection - * @return Illuminate\Database\Connection - */ - public static function resolveConnection($connection){ - return self::$realClass->resolveConnection($connection); - } - - /** - * Get the connection resolver instance. - * - * @static - * @return Illuminate\Database\ConnectionResolverInterface - */ - public static function getConnectionResolver(){ - return self::$realClass->getConnectionResolver(); - } - - /** - * Set the connection resolver instance. - * - * @static - * @param Illuminate\Database\ConnectionResolverInterface $resolver - */ - public static function setConnectionResolver($resolver){ - self::$realClass->setConnectionResolver($resolver); - } - - /** - * Get the event dispatcher instance. - * - * @static - * @return Illuminate\Events\Dispatcher - */ - public static function getEventDispatcher(){ - return self::$realClass->getEventDispatcher(); - } - - /** - * Set the event dispatcher instance. - * - * @static - * @param Illuminate\Events\Dispatcher - */ - public static function setEventDispatcher($dispatcher){ - self::$realClass->setEventDispatcher($dispatcher); - } - - /** - * Unset the event dispatcher for models. - * - * @static - */ - public static function unsetEventDispatcher(){ - self::$realClass->unsetEventDispatcher(); - } - - /** - * Get the mutated attributes for a given instance. - * - * @static - * @return array - */ - public static function getMutatedAttributes(){ - return self::$realClass->getMutatedAttributes(); - } - - /** - * Dynamically retrieve attributes on the model. - * - * @static - * @param string $key - * @return mixed - */ - public static function __get($key){ - return self::$realClass->__get($key); - } - - /** - * Dynamically set attributes on the model. - * - * @static - * @param string $key - * @param mixed $value - */ - public static function __set($key, $value){ - self::$realClass->__set($key, $value); - } - - /** - * Determine if the given attribute exists. - * - * @static - * @param mixed $offset - * @return bool - */ - public static function offsetExists($offset){ - return self::$realClass->offsetExists($offset); - } - - /** - * Get the value for a given offset. - * - * @static - * @param mixed $offset - * @return mixed - */ - public static function offsetGet($offset){ - return self::$realClass->offsetGet($offset); - } - - /** - * Set the value for a given offset. - * - * @static - * @param mixed $offset - * @param mixed $value - */ - public static function offsetSet($offset, $value){ - self::$realClass->offsetSet($offset, $value); - } - - /** - * Unset the value for a given offset. - * - * @static - * @param mixed $offset - */ - public static function offsetUnset($offset){ - self::$realClass->offsetUnset($offset); - } - - /** - * Determine if an attribute exists on the model. - * - * @static - * @param string $key - */ - public static function __isset($key){ - self::$realClass->__isset($key); - } - - /** - * Unset an attribute on the model. - * - * @static - * @param string $key - */ - public static function __unset($key){ - self::$realClass->__unset($key); - } - - /** - * Handle dynamic method calls into the method. - * - * @static - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __call($method, $parameters){ - return self::$realClass->__call($method, $parameters); - } - - /** - * Handle dynamic static method calls into the method. - * - * @static - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __callStatic($method, $parameters){ - return self::$realClass->__callStatic($method, $parameters); - } - - /** - * Convert the model to its string representation. - * - * @static - * @return string - */ - public static function __toString(){ - return self::$realClass->__toString(); - } - - } -} - -namespace { - class Event{ - /** - * @var Illuminate\Events\Event $realClass - */ - static private $realClass; - - /** - * Create a new event instance. - * - * @static - * @param mixed $payload - */ - public static function __construct($payload = array()){ - self::$realClass->__construct($payload); - } - - /** - * Stop the propagation of the event to other listeners. - * - * @static - */ - public static function stop(){ - self::$realClass->stop(); - } - - /** - * Determine if the event has been stopped from propagating. - * - * @static - * @return bool - */ - public static function isStopped(){ - return self::$realClass->isStopped(); - } - - /** - * Dynamically retrieve items from the payload. - * - * @static - * @param string $key - * @return mixed - */ - public static function __get($key){ - return self::$realClass->__get($key); - } - - /** - * Dynamically set items in the payload. - * - * @static - * @param string $key - * @param mixed $value - */ - public static function __set($key, $value){ - self::$realClass->__set($key, $value); - } - - /** - * Determine if payload item is set. - * - * @static - * @param string $key - * @return bool - */ - public static function __isset($key){ - return self::$realClass->__isset($key); - } - - /** - * Unset an item from the payload array. - * - * @static - */ - public static function __unset($key){ - self::$realClass->__unset($key); - } - - /** - * Returns whether further event listeners should be triggered. - * - * @static - * @return Boolean Whether propagation was already stopped for this event. - */ - public static function isPropagationStopped(){ - return self::$realClass->isPropagationStopped(); - } - - /** - * Stops the propagation of the event to further event listeners. - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). - * - * @static - */ - public static function stopPropagation(){ - self::$realClass->stopPropagation(); - } - - /** - * Stores the EventDispatcher that dispatches this Event - * - * @static - * @param EventDispatcherInterface $dispatcher - */ - public static function setDispatcher($dispatcher){ - self::$realClass->setDispatcher($dispatcher); - } - - /** - * Returns the EventDispatcher that dispatches this Event - * - * @static - * @return EventDispatcherInterface - */ - public static function getDispatcher(){ - return self::$realClass->getDispatcher(); - } - - /** - * Gets the event's name. - * - * @static - * @return string - */ - public static function getName(){ - return self::$realClass->getName(); - } - - /** - * Sets the event's name property. - * - * @static - * @param string $name The event name. - */ - public static function setName($name){ - self::$realClass->setName($name); - } - - } -} - -namespace { - class File{ - /** - * @var Illuminate\Filesystem\Filesystem $realClass - */ - static private $realClass; - - /** - * Determine if a file exists. - * - * @static - * @param string $path - * @return bool - */ - public static function exists($path){ - return self::$realClass->exists($path); - } - - /** - * Get the contents of a file. - * - * @static - * @param string $path - * @return string - */ - public static function get($path){ - return self::$realClass->get($path); - } - - /** - * Get the contents of a remote file. - * - * @static - * @param string $path - * @return string - */ - public static function getRemote($path){ - return self::$realClass->getRemote($path); - } - - /** - * Get the returned value of a file. - * - * @static - * @param string $path - * @return mixed - */ - public static function getRequire($path){ - return self::$realClass->getRequire($path); - } - - /** - * Require the given file once. - * - * @static - * @param string $file - */ - public static function requireOnce($file){ - self::$realClass->requireOnce($file); - } - - /** - * Write the contents of a file. - * - * @static - * @param string $path - * @param string $contents - * @return int - */ - public static function put($path, $contents){ - return self::$realClass->put($path, $contents); - } - - /** - * Append to a file. - * - * @static - * @param string $path - * @param string $data - * @return int - */ - public static function append($path, $data){ - return self::$realClass->append($path, $data); - } - - /** - * Delete the file at a given path. - * - * @static - * @param string $path - * @return bool - */ - public static function delete($path){ - return self::$realClass->delete($path); - } - - /** - * Move a file to a new location. - * - * @static - * @param string $path - * @param string $target - */ - public static function move($path, $target){ - self::$realClass->move($path, $target); - } - - /** - * Copy a file to a new location. - * - * @static - * @param string $path - * @param string $target - */ - public static function copy($path, $target){ - self::$realClass->copy($path, $target); - } - - /** - * Extract the file extension from a file path. - * - * @static - * @param string $path - * @return string - */ - public static function extension($path){ - return self::$realClass->extension($path); - } - - /** - * Get the file type of a given file. - * - * @static - * @param string $path - * @return string - */ - public static function type($path){ - return self::$realClass->type($path); - } - - /** - * Get the file size of a given file. - * - * @static - * @param string $path - * @return int - */ - public static function size($path){ - return self::$realClass->size($path); - } - - /** - * Get the file's last modification time. - * - * @static - * @param string $path - * @return int - */ - public static function lastModified($path){ - return self::$realClass->lastModified($path); - } - - /** - * Determine if the given path is a directory. - * - * @static - * @param string $directory - * @return bool - */ - public static function isDirectory($directory){ - return self::$realClass->isDirectory($directory); - } - - /** - * Find path names matching a given pattern. - * - * @static - * @param string $pattern - * @param int $flags - * @return array - */ - public static function glob($pattern, $flags = '0'){ - return self::$realClass->glob($pattern, $flags); - } - - /** - * Get an array of all files in a directory. - * - * @static - * @param string $directory - * @return array - */ - public static function files($directory){ - return self::$realClass->files($directory); - } - - /** - * Create a directory. - * - * @static - * @param string $path - * @param int $mode - * @param bool $recursive - * @return bool - */ - public static function makeDirectory($path, $mode = '511', $recursive = false){ - return self::$realClass->makeDirectory($path, $mode, $recursive); - } - - /** - * Copy a directory from one location to another. - * - * @static - * @param string $directory - * @param string $destination - * @param int $options - */ - public static function copyDirectory($directory, $destination, $options = null){ - self::$realClass->copyDirectory($directory, $destination, $options); - } - - /** - * Recursively delete a directory. - * The directory itself may be optionally preserved. - * - * @static - * @param string $directory - * @param bool $preserve - */ - public static function deleteDirectory($directory, $preserve = false){ - self::$realClass->deleteDirectory($directory, $preserve); - } - - /** - * Empty the specified directory of all files and folders. - * - * @static - * @param string $directory - */ - public static function cleanDirectory($directory){ - self::$realClass->cleanDirectory($directory); - } - - } -} - -namespace { - class Form{ - /** - * @var Illuminate\Html\FormBuilder $realClass - */ - static private $realClass; - - /** - * Create a new form builder instance. - * - * @static - * @param Illuminate\Routing\UrlGenerator $url - * @param string $csrfToken - */ - public static function __construct($url, $csrfToken){ - self::$realClass->__construct($url, $csrfToken); - } - - /** - * Open up a new HTML form. - * - * @static - * @param array $options - * @return string - */ - public static function open($options = array()){ - return self::$realClass->open($options); - } - - /** - * Create a new model based form builder. - * - * @static - * @param mixed $model - * @param array $options - * @return string - */ - public static function model($model, $options = array()){ - return self::$realClass->model($model, $options); - } - - /** - * Close the current form. - * - * @static - * @return string - */ - public static function close(){ - return self::$realClass->close(); - } - - /** - * Generate a hidden field with the current CSRF token. - * - * @static - * @return string - */ - public static function token(){ - return self::$realClass->token(); - } - - /** - * Create a form label element. - * - * @static - * @param string $name - * @param string $value - * @param array $options - * @return string - */ - public static function label($name, $value, $options = array()){ - return self::$realClass->label($name, $value, $options); - } - - /** - * Create a form input field. - * - * @static - * @param string $type - * @param string $name - * @param string $value - * @param array $options - * @return string - */ - public static function input($type, $name, $value = null, $options = array()){ - return self::$realClass->input($type, $name, $value, $options); - } - - /** - * Create a text input field. - * - * @static - * @param string $name - * @param string $value - * @param array $options - * @return string - */ - public static function text($name, $value = null, $options = array()){ - return self::$realClass->text($name, $value, $options); - } - - /** - * Create a password input field. - * - * @static - * @param string $name - * @param array $options - * @return string - */ - public static function password($name, $options = array()){ - return self::$realClass->password($name, $options); - } - - /** - * Create a hidden input field. - * - * @static - * @param string $name - * @param string $value - * @param array $options - * @return string - */ - public static function hidden($name, $value = null, $options = array()){ - return self::$realClass->hidden($name, $value, $options); - } - - /** - * Create an e-mail input field. - * - * @static - * @param string $name - * @param string $value - * @param array $options - * @return string - */ - public static function email($name, $value = null, $options = array()){ - return self::$realClass->email($name, $value, $options); - } - - /** - * Create a file input field. - * - * @static - * @param string $name - * @param array $options - * @return string - */ - public static function file($name, $options = array()){ - return self::$realClass->file($name, $options); - } - - /** - * Create a textarea input field. - * - * @static - * @param string $name - * @param string $value - * @param array $options - * @return string - */ - public static function textarea($name, $value = null, $options = array()){ - return self::$realClass->textarea($name, $value, $options); - } - - /** - * Create a select box field. - * - * @static - * @param string $name - * @param array $list - * @param string $selected - * @param array $options - * @return string - */ - public static function select($name, $list = array(), $selected = null, $options = array()){ - return self::$realClass->select($name, $list, $selected, $options); - } - - /** - * Create a checkbox input field. - * - * @static - * @param string $name - * @param mixed $value - * @param bool $checked - * @param array $options - * @return string - */ - public static function checkbox($name, $value = '1', $checked = null, $options = array()){ - return self::$realClass->checkbox($name, $value, $checked, $options); - } - - /** - * Create a radio button input field. - * - * @static - * @param string $name - * @param mixed $value - * @param bool $checked - * @param array $options - * @return string - */ - public static function radio($name, $value = null, $checked = null, $options = array()){ - return self::$realClass->radio($name, $value, $checked, $options); - } - - /** - * Create a submit button element. - * - * @static - * @param string $value - * @param array $options - * @return string - */ - public static function submit($value = null, $options = array()){ - return self::$realClass->submit($value, $options); - } - - /** - * Create a button element. - * - * @static - * @param string $value - * @param array $options - * @return string - */ - public static function button($value = null, $options = array()){ - return self::$realClass->button($value, $options); - } - - /** - * Register a custom form macro. - * - * @static - * @param string $name - * @param callable $macro - */ - public static function macro($name, $macro){ - self::$realClass->macro($name, $macro); - } - - /** - * Get the session store implementation. - * - * @static - * @param Illuminate\Session\Store $session - */ - public static function getSessionStore(){ - self::$realClass->getSessionStore(); - } - - /** - * Set the session store implementation. - * - * @static - * @param Illuminate\Session\Store $session - */ - public static function setSessionStore($session){ - self::$realClass->setSessionStore($session); - } - - /** - * Dynamically handle calls to the form builder. - * - * @static - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __call($method, $parameters){ - return self::$realClass->__call($method, $parameters); - } - - } -} - -namespace { - class Hash{ - /** - * @var Illuminate\Hashing\BcryptHasher $realClass - */ - static private $realClass; - - /** - * Hash the given value. - * - * @static - * @param string $value - * @return string - */ - public static function make($value, $options = array()){ - return self::$realClass->make($value, $options); - } - - /** - * Check the given plain value against a hash. - * - * @static - * @param string $value - * @param string $hashedValue - * @param array $options - * @return bool - */ - public static function check($value, $hashedValue, $options = array()){ - return self::$realClass->check($value, $hashedValue, $options); - } - - } -} - -namespace { - class Html{ - /** - * @var Illuminate\Html\HtmlBuilder $realClass - */ - static private $realClass; - - /** - * Convert an HTML string to entities. - * - * @static - * @param string $value - * @return string - */ - public static function entities($value){ - return self::$realClass->entities($value); - } - - /** - * Convert entities to HTML characters. - * - * @static - * @param string $value - * @return string - */ - public static function decode($value){ - return self::$realClass->decode($value); - } - - /** - * Generate an ordered list of items. - * - * @static - * @param array $list - * @param array $attributes - * @return string - */ - public static function ol($list, $attributes = array()){ - return self::$realClass->ol($list, $attributes); - } - - /** - * Generate an un-ordered list of items. - * - * @static - * @param array $list - * @param array $attributes - * @return string - */ - public static function ul($list, $attributes = array()){ - return self::$realClass->ul($list, $attributes); - } - - /** - * Build an HTML attribute string from an array. - * - * @static - * @param array $attributes - * @return string - */ - public static function attributes($attributes){ - return self::$realClass->attributes($attributes); - } - - } -} - -namespace { - class Input{ - /** - * @var Illuminate\Http\Request $realClass - */ - static private $realClass; - - /** - * Return the Request instance. - * - * @static - * @return Illuminate\Http\Request - */ - public static function instance(){ - return self::$realClass->instance(); - } - - /** - * Get the root URL for the application. - * - * @static - * @return string - */ - public static function root(){ - return self::$realClass->root(); - } - - /** - * Get the URL (no query string) for the request. - * - * @static - * @return string - */ - public static function url(){ - return self::$realClass->url(); - } - - /** - * Get the full URL for the request. - * - * @static - * @return string - */ - public static function fullUrl(){ - return self::$realClass->fullUrl(); - } - - /** - * Get the current path info for the request. - * - * @static - * @return string - */ - public static function path(){ - return self::$realClass->path(); - } - - /** - * Get a segment from the URI (1 based index). - * - * @static - * @param string $index - * @param mixed $default - * @return string - */ - public static function segment($index, $default = null){ - return self::$realClass->segment($index, $default); - } - - /** - * Get all of the segments for the request path. - * - * @static - * @return array - */ - public static function segments(){ - return self::$realClass->segments(); - } - - /** - * Determine if the current request URI matches a pattern. - * - * @static - * @param string $pattern - * @return bool - */ - public static function is($pattern){ - return self::$realClass->is($pattern); - } - - /** - * Determine if the request is the result of an AJAX call. - * - * @static - * @return bool - */ - public static function ajax(){ - return self::$realClass->ajax(); - } - - /** - * Determine if the request is over HTTPS. - * - * @static - * @return bool - */ - public static function secure(){ - return self::$realClass->secure(); - } - - /** - * Determine if the request contains a given input item. - * - * @static - * @param string|array $key - * @return bool - */ - public static function has($key){ - return self::$realClass->has($key); - } - - /** - * Get all of the input and files for the request. - * - * @static - * @return array - */ - public static function all(){ - return self::$realClass->all(); - } - - /** - * Retrieve an input item from the request. - * - * @static - * @param string $key - * @param mixed $default - * @return string - */ - public static function input($key = null, $default = null){ - return self::$realClass->input($key, $default); - } - - /** - * Get a subset of the items from the input data. - * - * @static - * @param array $keys - * @return array - */ - public static function only($keys){ - return self::$realClass->only($keys); - } - - /** - * Get all of the input except for a specified array of items. - * - * @static - * @param array $keys - * @return array - */ - public static function except($keys){ - return self::$realClass->except($keys); - } - - /** - * Retrieve a query string item from the request. - * - * @static - * @param string $key - * @param mixed $default - * @return string - */ - public static function query($key = null, $default = null){ - return self::$realClass->query($key, $default); - } - - /** - * Retrieve a cookie from the request. - * - * @static - * @param string $key - * @param mixed $default - * @return string - */ - public static function cookie($key = null, $default = null){ - return self::$realClass->cookie($key, $default); - } - - /** - * Retrieve a file from the request. - * - * @static - * @param string $key - * @param mixed $default - * @return Symfony\Component\HttpFoundation\File\UploadedFile - */ - public static function file($key = null, $default = null){ - return self::$realClass->file($key, $default); - } - - /** - * Determine if the uploaded data contains a file. - * - * @static - * @param string $key - * @return bool - */ - public static function hasFile($key){ - return self::$realClass->hasFile($key); - } - - /** - * Retrieve a header from the request. - * - * @static - * @param string $key - * @param mixed $default - * @return string - */ - public static function header($key = null, $default = null){ - return self::$realClass->header($key, $default); - } - - /** - * Retrieve a server variable from the request. - * - * @static - * @param string $key - * @param mixed $default - * @return string - */ - public static function server($key = null, $default = null){ - return self::$realClass->server($key, $default); - } - - /** - * Retrieve an old input item. - * - * @static - * @param string $key - * @param mixed $default - * @return string - */ - public static function old($key = null, $default = null){ - return self::$realClass->old($key, $default); - } - - /** - * Flash the input for the current request to the session. - * - * @static - * @param string $filter - * @param array $keys - */ - public static function flash($filter = null, $keys = array()){ - self::$realClass->flash($filter, $keys); - } - - /** - * Flash only some of the input to the session. - * - * @static - * @param dynamic string - */ - public static function flashOnly($keys){ - self::$realClass->flashOnly($keys); - } - - /** - * Flash only some of the input to the session. - * - * @static - * @param dynamic string - */ - public static function flashExcept($keys){ - self::$realClass->flashExcept($keys); - } - - /** - * Flush all of the old input from the session. - * - * @static - */ - public static function flush(){ - self::$realClass->flush(); - } - - /** - * Merge new input into the current request's input array. - * - * @static - * @param array $input - */ - public static function merge($input){ - self::$realClass->merge($input); - } - - /** - * Replace the input for the current request. - * - * @static - * @param array $input - */ - public static function replace($input){ - self::$realClass->replace($input); - } - - /** - * Get the JSON payload for the request. - * - * @static - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function json($key = null, $default = null){ - return self::$realClass->json($key, $default); - } - - /** - * Get the Illuminate session store implementation. - * - * @static - * @return Illuminate\Session\Store - */ - public static function getSessionStore(){ - return self::$realClass->getSessionStore(); - } - - /** - * Set the Illuminate session store implementation. - * - * @static - * @param Illuminate\Session\Store $session - */ - public static function setSessionStore($session){ - self::$realClass->setSessionStore($session); - } - - /** - * Determine if the session store has been set. - * - * @static - * @return bool - */ - public static function hasSessionStore(){ - return self::$realClass->hasSessionStore(); - } - - /** - * Constructor. - * - * @static - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string $content The raw body data - */ - public static function __construct($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - self::$realClass->__construct($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Sets the parameters for this request. - * This method also re-initializes all properties. - * - * @static - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string $content The raw body data - */ - public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - self::$realClass->initialize($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Creates a new request with values from PHP's super globals. - * - * @static - * @return Request A new request - */ - public static function createFromGlobals(){ - return self::$realClass->createFromGlobals(); - } - - /** - * Creates a Request based on a given URI and configuration. - * The information contained in the URI always take precedence - * over the other information (server and parameters). - * - * @static - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) - * @param string $content The raw body data - * @return Request A Request instance - */ - public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - return self::$realClass->create($uri, $method, $parameters, $cookies, $files, $server, $content); - } - - /** - * Clones a request and overrides some of its parameters. - * - * @static - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @return Request The duplicated request - */ - public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){ - return self::$realClass->duplicate($query, $request, $attributes, $cookies, $files, $server); - } - - /** - * Clones the current request. - * Note that the session is not cloned as duplicated requests - * are most of the time sub-requests of the main one. - * - * @static - */ - public static function __clone(){ - self::$realClass->__clone(); - } - - /** - * Returns the request as a string. - * - * @static - * @return string The request - */ - public static function __toString(){ - return self::$realClass->__toString(); - } - - /** - * Overrides the PHP global variables according to this request instance. - * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. - * $_FILES is never override, see rfc1867 - * - * @static - */ - public static function overrideGlobals(){ - self::$realClass->overrideGlobals(); - } - - /** - * Trusts $_SERVER entries coming from proxies. - * - * @static - */ - public static function trustProxyData(){ - self::$realClass->trustProxyData(); - } - - /** - * Sets a list of trusted proxies. - * You should only list the reverse proxies that you manage directly. - * - * @static - * @param array $proxies A list of trusted proxies - */ - public static function setTrustedProxies($proxies){ - self::$realClass->setTrustedProxies($proxies); - } - - /** - * Gets the list of trusted proxies. - * - * @static - * @return array An array of trusted proxies. - */ - public static function getTrustedProxies(){ - return self::$realClass->getTrustedProxies(); - } - - /** - * Sets the name for trusted headers. - * The following header keys are supported: - * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp()) - * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost()) - * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort()) - * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) - * Setting an empty value allows to disable the trusted header for the given key. - * - * @static - * @param string $key The header key - * @param string $value The header name - */ - public static function setTrustedHeaderName($key, $value){ - self::$realClass->setTrustedHeaderName($key, $value); - } - - /** - * Returns true if $_SERVER entries coming from proxies are trusted, - * false otherwise. - * - * @static - * @return boolean - */ - public static function isProxyTrusted(){ - return self::$realClass->isProxyTrusted(); - } - - /** - * Normalizes a query string. - * It builds a normalized query string, where keys/value pairs are alphabetized, - * have consistent escaping and unneeded delimiters are removed. - * - * @static - * @param string $qs Query string - * @return string A normalized query string for the Request - */ - public static function normalizeQueryString($qs){ - return self::$realClass->normalizeQueryString($qs); - } - - /** - * Enables support for the _method request parameter to determine the intended HTTP method. - * Be warned that enabling this feature might lead to CSRF issues in your code. - * Check that you are using CSRF tokens when required. - * The HTTP method can only be overridden when the real HTTP method is POST. - * - * @static - */ - public static function enableHttpMethodParameterOverride(){ - self::$realClass->enableHttpMethodParameterOverride(); - } - - /** - * Checks whether support for the _method request parameter is enabled. - * - * @static - * @return Boolean True when the _method request parameter is enabled, false otherwise - */ - public static function getHttpMethodParameterOverride(){ - return self::$realClass->getHttpMethodParameterOverride(); - } - - /** - * Gets a "parameter" value. - * This method is mainly useful for libraries that want to provide some flexibility. - * Order of precedence: GET, PATH, POST - * Avoid using this method in controllers: - * * slow - * * prefer to get from a "named" source - * It is better to explicitly get request parameters from the appropriate - * public property instead (query, attributes, request). - * - * @static - * @param string $key the key - * @param mixed $default the default value - * @param Boolean $deep is parameter deep in multidimensional array - * @return mixed - */ - public static function get($key, $default = null, $deep = false){ - return self::$realClass->get($key, $default, $deep); - } - - /** - * Gets the Session. - * - * @static - * @return SessionInterface|null The session - */ - public static function getSession(){ - return self::$realClass->getSession(); - } - - /** - * Whether the request contains a Session which was started in one of the - * previous requests. - * - * @static - * @return Boolean - */ - public static function hasPreviousSession(){ - return self::$realClass->hasPreviousSession(); - } - - /** - * Whether the request contains a Session object. - * This method does not give any information about the state of the session object, - * like whether the session is started or not. It is just a way to check if this Request - * is associated with a Session instance. - * - * @static - * @return Boolean true when the Request contains a Session object, false otherwise - */ - public static function hasSession(){ - return self::$realClass->hasSession(); - } - - /** - * Sets the Session. - * - * @static - * @param SessionInterface $session The Session - */ - public static function setSession($session){ - self::$realClass->setSession($session); - } - - /** - * Returns the client IP address. - * This method can read the client IP address from the "X-Forwarded-For" header - * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" - * header value is a comma+space separated list of IP addresses, the left-most - * being the original client, and each successive proxy that passed the request - * adding the IP address where it received the request from. - * If your reverse proxy uses a different header name than "X-Forwarded-For", - * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with - * the "client-ip" key. - * - * @static - * @return string The client IP address - */ - public static function getClientIp(){ - return self::$realClass->getClientIp(); - } - - /** - * Returns current script name. - * - * @static - * @return string - */ - public static function getScriptName(){ - return self::$realClass->getScriptName(); - } - - /** - * Returns the path being requested relative to the executed script. - * The path info always starts with a /. - * Suppose this request is instantiated from /mysite on localhost: - * * http://localhost/mysite returns an empty string - * * http://localhost/mysite/about returns '/about' - * * http://localhost/mysite/enco%20ded returns '/enco%20ded' - * * http://localhost/mysite/about?var=1 returns '/about' - * - * @static - * @return string The raw path (i.e. not urldecoded) - */ - public static function getPathInfo(){ - return self::$realClass->getPathInfo(); - } - - /** - * Returns the root path from which this request is executed. - * Suppose that an index.php file instantiates this request object: - * * http://localhost/index.php returns an empty string - * * http://localhost/index.php/page returns an empty string - * * http://localhost/web/index.php returns '/web' - * * http://localhost/we%20b/index.php returns '/we%20b' - * - * @static - * @return string The raw path (i.e. not urldecoded) - */ - public static function getBasePath(){ - return self::$realClass->getBasePath(); - } - - /** - * Returns the root url from which this request is executed. - * The base URL never ends with a /. - * This is similar to getBasePath(), except that it also includes the - * script filename (e.g. index.php) if one exists. - * - * @static - * @return string The raw url (i.e. not urldecoded) - */ - public static function getBaseUrl(){ - return self::$realClass->getBaseUrl(); - } - - /** - * Gets the request's scheme. - * - * @static - * @return string - */ - public static function getScheme(){ - return self::$realClass->getScheme(); - } - - /** - * Returns the port on which the request is made. - * This method can read the client port from the "X-Forwarded-Port" header - * when trusted proxies were set via "setTrustedProxies()". - * The "X-Forwarded-Port" header must contain the client port. - * If your reverse proxy uses a different header name than "X-Forwarded-Port", - * configure it via "setTrustedHeaderName()" with the "client-port" key. - * - * @static - * @return string - */ - public static function getPort(){ - return self::$realClass->getPort(); - } - - /** - * Returns the user. - * - * @static - * @return string|null - */ - public static function getUser(){ - return self::$realClass->getUser(); - } - - /** - * Returns the password. - * - * @static - * @return string|null - */ - public static function getPassword(){ - return self::$realClass->getPassword(); - } - - /** - * Gets the user info. - * - * @static - * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server - */ - public static function getUserInfo(){ - return self::$realClass->getUserInfo(); - } - - /** - * Returns the HTTP host being requested. - * The port name will be appended to the host if it's non-standard. - * - * @static - * @return string - */ - public static function getHttpHost(){ - return self::$realClass->getHttpHost(); - } - - /** - * Returns the requested URI. - * - * @static - * @return string The raw URI (i.e. not urldecoded) - */ - public static function getRequestUri(){ - return self::$realClass->getRequestUri(); - } - - /** - * Gets the scheme and HTTP host. - * If the URL was called with basic authentication, the user - * and the password are not added to the generated string. - * - * @static - * @return string The scheme and HTTP host - */ - public static function getSchemeAndHttpHost(){ - return self::$realClass->getSchemeAndHttpHost(); - } - - /** - * Generates a normalized URI for the Request. - * - * @static - * @return string A normalized URI for the Request - */ - public static function getUri(){ - return self::$realClass->getUri(); - } - - /** - * Generates a normalized URI for the given path. - * - * @static - * @param string $path A path to use instead of the current one - * @return string The normalized URI for the path - */ - public static function getUriForPath($path){ - return self::$realClass->getUriForPath($path); - } - - /** - * Generates the normalized query string for the Request. - * It builds a normalized query string, where keys/value pairs are alphabetized - * and have consistent escaping. - * - * @static - * @return string|null A normalized query string for the Request - */ - public static function getQueryString(){ - return self::$realClass->getQueryString(); - } - - /** - * Checks whether the request is secure or not. - * This method can read the client port from the "X-Forwarded-Proto" header - * when trusted proxies were set via "setTrustedProxies()". - * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". - * If your reverse proxy uses a different header name than "X-Forwarded-Proto" - * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with - * the "client-proto" key. - * - * @static - * @return Boolean - */ - public static function isSecure(){ - return self::$realClass->isSecure(); - } - - /** - * Returns the host name. - * This method can read the client port from the "X-Forwarded-Host" header - * when trusted proxies were set via "setTrustedProxies()". - * The "X-Forwarded-Host" header must contain the client host name. - * If your reverse proxy uses a different header name than "X-Forwarded-Host", - * configure it via "setTrustedHeaderName()" with the "client-host" key. - * - * @static - * @return string - */ - public static function getHost(){ - return self::$realClass->getHost(); - } - - /** - * Sets the request method. - * - * @static - * @param string $method - */ - public static function setMethod($method){ - self::$realClass->setMethod($method); - } - - /** - * Gets the request "intended" method. - * If the X-HTTP-Method-Override header is set, and if the method is a POST, - * then it is used to determine the "real" intended HTTP method. - * The _method request parameter can also be used to determine the HTTP method, - * but only if enableHttpMethodParameterOverride() has been called. - * The method is always an uppercased string. - * - * @static - * @return string The request method - */ - public static function getMethod(){ - return self::$realClass->getMethod(); - } - - /** - * Gets the "real" request method. - * - * @static - * @return string The request method - */ - public static function getRealMethod(){ - return self::$realClass->getRealMethod(); - } - - /** - * Gets the mime type associated with the format. - * - * @static - * @param string $format The format - * @return string The associated mime type (null if not found) - */ - public static function getMimeType($format){ - return self::$realClass->getMimeType($format); - } - - /** - * Gets the format associated with the mime type. - * - * @static - * @param string $mimeType The associated mime type - * @return string|null The format (null if not found) - */ - public static function getFormat($mimeType){ - return self::$realClass->getFormat($mimeType); - } - - /** - * Associates a format with mime types. - * - * @static - * @param string $format The format - * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) - */ - public static function setFormat($format, $mimeTypes){ - self::$realClass->setFormat($format, $mimeTypes); - } - - /** - * Gets the request format. - * Here is the process to determine the format: - * * format defined by the user (with setRequestFormat()) - * * _format request parameter - * * $default - * - * @static - * @param string $default The default format - * @return string The request format - */ - public static function getRequestFormat($default = 'html'){ - return self::$realClass->getRequestFormat($default); - } - - /** - * Sets the request format. - * - * @static - * @param string $format The request format. - */ - public static function setRequestFormat($format){ - self::$realClass->setRequestFormat($format); - } - - /** - * Gets the format associated with the request. - * - * @static - * @return string|null The format (null if no content type is present) - */ - public static function getContentType(){ - return self::$realClass->getContentType(); - } - - /** - * Sets the default locale. - * - * @static - * @param string $locale - */ - public static function setDefaultLocale($locale){ - self::$realClass->setDefaultLocale($locale); - } - - /** - * Sets the locale. - * - * @static - * @param string $locale - */ - public static function setLocale($locale){ - self::$realClass->setLocale($locale); - } - - /** - * Get the locale. - * - * @static - * @return string - */ - public static function getLocale(){ - return self::$realClass->getLocale(); - } - - /** - * Checks if the request method is of specified type. - * - * @static - * @param string $method Uppercase request method (GET, POST etc). - * @return Boolean - */ - public static function isMethod($method){ - return self::$realClass->isMethod($method); - } - - /** - * Checks whether the method is safe or not. - * - * @static - * @return Boolean - */ - public static function isMethodSafe(){ - return self::$realClass->isMethodSafe(); - } - - /** - * Returns the request body content. - * - * @static - * @param Boolean $asResource If true, a resource will be returned - * @return string|resource The request body content or a resource to read the body stream. - */ - public static function getContent($asResource = false){ - return self::$realClass->getContent($asResource); - } - - /** - * Gets the Etags. - * - * @static - * @return array The entity tags - */ - public static function getETags(){ - return self::$realClass->getETags(); - } - - /** - * - * - * @static - * @return Boolean - */ - public static function isNoCache(){ - return self::$realClass->isNoCache(); - } - - /** - * Returns the preferred language. - * - * @static - * @param array $locales An array of ordered available locales - * @return string|null The preferred locale - */ - public static function getPreferredLanguage($locales = null){ - return self::$realClass->getPreferredLanguage($locales); - } - - /** - * Gets a list of languages acceptable by the client browser. - * - * @static - * @return array Languages ordered in the user browser preferences - */ - public static function getLanguages(){ - return self::$realClass->getLanguages(); - } - - /** - * Gets a list of charsets acceptable by the client browser. - * - * @static - * @return array List of charsets in preferable order - */ - public static function getCharsets(){ - return self::$realClass->getCharsets(); - } - - /** - * Gets a list of content types acceptable by the client browser - * - * @static - * @return array List of content types in preferable order - */ - public static function getAcceptableContentTypes(){ - return self::$realClass->getAcceptableContentTypes(); - } - - /** - * Returns true if the request is a XMLHttpRequest. - * It works if your JavaScript library set an X-Requested-With HTTP header. - * It is known to work with common JavaScript frameworks: - * - * @static - * @return Boolean true if the request is an XMLHttpRequest, false otherwise - */ - public static function isXmlHttpRequest(){ - return self::$realClass->isXmlHttpRequest(); - } - - /** - * Splits an Accept-* HTTP header. - * - * @static - * @param string $header Header to split - * @return array Array indexed by the values of the Accept-* header in preferred order - */ - public static function splitHttpAcceptHeader($header){ - return self::$realClass->splitHttpAcceptHeader($header); - } - - } -} - -namespace { - class Lang{ - /** - * @var Illuminate\Translation\Translator $realClass - */ - static private $realClass; - - /** - * Create a new translator instance. - * - * @static - * @param Illuminate\Translation\LoaderInterface $loader - * @param string $locale - */ - public static function __construct($loader, $locale){ - self::$realClass->__construct($loader, $locale); - } - - /** - * Determine if a translation exists. - * - * @static - * @param string $key - * @param string $locale - * @return bool - */ - public static function has($key, $locale = null){ - return self::$realClass->has($key, $locale); - } - - /** - * Get the translation for the given key. - * - * @static - * @param string $key - * @param array $replace - * @param string $locale - * @return string - */ - public static function get($key, $replace = array(), $locale = null){ - return self::$realClass->get($key, $replace, $locale); - } - - /** - * Get a translation according to an integer value. - * - * @static - * @param string $id - * @param int $number - * @param array $replace - * @param string $locale - * @return string - */ - public static function choice($key, $number, $replace = array(), $locale = null){ - return self::$realClass->choice($key, $number, $replace, $locale); - } - - /** - * Get the translation for a given key. - * - * @static - * @param string $id - * @param array $parameters - * @param string $domain - * @param string $locale - * @return string - */ - public static function trans($id, $parameters = array(), $domain = 'messages', $locale = null){ - return self::$realClass->trans($id, $parameters, $domain, $locale); - } - - /** - * Get a translation according to an integer value. - * - * @static - * @param string $id - * @param int $number - * @param array $parameters - * @param string $domain - * @param string $locale - * @return string - */ - public static function transChoice($id, $number, $parameters = array(), $domain = 'messages', $locale = null){ - return self::$realClass->transChoice($id, $number, $parameters, $domain, $locale); - } - - /** - * Load the specified language group. - * - * @static - * @param string $namespace - * @param string $group - * @param string $locale - * @return string - */ - public static function load($namespace, $group, $locale){ - return self::$realClass->load($namespace, $group, $locale); - } - - /** - * Add a new namespace to the loader. - * - * @static - * @param string $namespace - * @param string $hint - */ - public static function addNamespace($namespace, $hint){ - self::$realClass->addNamespace($namespace, $hint); - } - - /** - * Parse a key into namespace, group, and item. - * - * @static - * @param string $key - * @return array - */ - public static function parseKey($key){ - return self::$realClass->parseKey($key); - } - - /** - * Get the message selector instance. - * - * @static - * @return Symfony\Component\Translation\MessageSelector - */ - public static function getSelector(){ - return self::$realClass->getSelector(); - } - - /** - * Set the message selector instance. - * - * @static - * @param Symfony\Component\Translation\MessageSelector $selector - */ - public static function setSelector($selector){ - self::$realClass->setSelector($selector); - } - - /** - * Get the language line loader implementation. - * - * @static - * @return Illuminate\Translation\LoaderInterface - */ - public static function getLoader(){ - return self::$realClass->getLoader(); - } - - /** - * Get the default locale being used. - * - * @static - * @return string - */ - public static function getLocale(){ - return self::$realClass->getLocale(); - } - - /** - * Set the default locale. - * - * @static - * @param string $locale - */ - public static function setLocale($locale){ - self::$realClass->setLocale($locale); - } - - /** - * Set the parsed value of a key. - * - * @static - * @param string $key - * @param array $parsed - */ - public static function setParsedKey($key, $parsed){ - self::$realClass->setParsedKey($key, $parsed); - } - - } -} - -namespace { - class Log{ - /** - * @var Illuminate\Log\Writer $realClass - */ - static private $realClass; - - /** - * Create a new log writer instance. - * - * @static - * @param Monolog\Logger $monolog - * @param Illuminate\Events\Dispatcher $dispatcher - */ - public static function __construct($monolog, $dispatcher = null){ - self::$realClass->__construct($monolog, $dispatcher); - } - - /** - * Register a file log handler. - * - * @static - * @param string $path - * @param string $level - */ - public static function useFiles($path, $level = 'debug'){ - self::$realClass->useFiles($path, $level); - } - - /** - * Register a daily file log handler. - * - * @static - * @param string $path - * @param int $days - * @param string $level - */ - public static function useDailyFiles($path, $days = '0', $level = 'debug'){ - self::$realClass->useDailyFiles($path, $days, $level); - } - - /** - * Get the underlying Monolog instance. - * - * @static - * @return Monolog\Logger - */ - public static function getMonolog(){ - return self::$realClass->getMonolog(); - } - - /** - * Register a new callback handler for when - * a log event is triggered. - * - * @static - * @param Closure $callback - */ - public static function listen($callback){ - self::$realClass->listen($callback); - } - - /** - * Get the event dispatcher instance. - * - * @static - * @return Illuminate\Events\Dispatcher - */ - public static function getEventDispatcher(){ - return self::$realClass->getEventDispatcher(); - } - - /** - * Set the event dispatcher instance. - * - * @static - * @param Illuminate\Events\Dispatcher - */ - public static function setEventDispatcher($dispatcher){ - self::$realClass->setEventDispatcher($dispatcher); - } - - /** - * Dynamically handle error additions. - * - * @static - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __call($method, $parameters){ - return self::$realClass->__call($method, $parameters); - } - - } -} - -namespace { - class Mail{ - /** - * @var Illuminate\Mail\Mailer $realClass - */ - static private $realClass; - - /** - * Create a new Mailer instance. - * - * @static - * @param Illuminate\View\Environment $views - * @param Swift_Mailer $swift - */ - public static function __construct($views, $swift){ - self::$realClass->__construct($views, $swift); - } - - /** - * Set the global from address and name. - * - * @static - * @param string $address - * @param string $name - */ - public static function alwaysFrom($address, $name = null){ - self::$realClass->alwaysFrom($address, $name); - } - - /** - * Send a new message when only a plain part. - * - * @static - * @param string $view - * @param array $data - * @param mixed $callback - */ - public static function plain($view, $data, $callback){ - self::$realClass->plain($view, $data, $callback); - } - - /** - * Send a new message using a view. - * - * @static - * @param string|array $view - * @param array $data - * @param Closure|string $callback - */ - public static function send($view, $data, $callback){ - self::$realClass->send($view, $data, $callback); - } - - /** - * Tell the mailer to not really send messages. - * - * @static - * @param bool $value - */ - public static function pretend($value = true){ - self::$realClass->pretend($value); - } - - /** - * Get the view environment instance. - * - * @static - * @return Illuminate\View\Environment - */ - public static function getViewEnvironment(){ - return self::$realClass->getViewEnvironment(); - } - - /** - * Get the Swift Mailer instance. - * - * @static - * @return Swift_Mailer - */ - public static function getSwiftMailer(){ - return self::$realClass->getSwiftMailer(); - } - - /** - * Set the Swift Mailer instance. - * - * @static - * @param Swift_Mailer $swift - */ - public static function setSwiftMailer($swift){ - self::$realClass->setSwiftMailer($swift); - } - - /** - * Set the log writer instance. - * - * @static - * @param Illuminate\Log\Writer $logger - */ - public static function setLogger($logger){ - self::$realClass->setLogger($logger); - } - - /** - * Set the IoC container instance. - * - * @static - * @param Illuminate\Container $container - */ - public static function setContainer($container){ - self::$realClass->setContainer($container); - } - - } -} - -namespace { - class Paginator{ - /** - * @var Illuminate\Pagination\Environment $realClass - */ - static private $realClass; - - /** - * Create a new pagination environment. - * - * @static - * @param Symfony\Component\HttpFoundation\Request $request - * @param Illuminate\View\Environment $view - * @param Illuminate\Translation\TranslatorInterface $trans - */ - public static function __construct($request, $view, $trans){ - self::$realClass->__construct($request, $view, $trans); - } - - /** - * Get a new paginator instance. - * - * @static - * @param array $items - * @param int $perPage - * @param int $total - * @return Illuminate\Pagination\Paginator - */ - public static function make($items, $total, $perPage){ - return self::$realClass->make($items, $total, $perPage); - } - - /** - * Get the pagination view. - * - * @static - * @param Illuminate\Pagination\Paginator $paginator - * @return Illuminate\View\View - */ - public static function getPaginationView($paginator){ - return self::$realClass->getPaginationView($paginator); - } - - /** - * Get the number of the current page. - * - * @static - * @return int - */ - public static function getCurrentPage(){ - return self::$realClass->getCurrentPage(); - } - - /** - * Set the number of the current page. - * - * @static - * @param int $number - */ - public static function setCurrentPage($number){ - self::$realClass->setCurrentPage($number); - } - - /** - * Get the root URL for the request. - * - * @static - * @return string - */ - public static function getCurrentUrl(){ - return self::$realClass->getCurrentUrl(); - } - - /** - * Set the base URL in use by the paginator. - * - * @static - * @param string $baseUrl - */ - public static function setBaseUrl($baseUrl){ - self::$realClass->setBaseUrl($baseUrl); - } - - /** - * Get the name of the pagination view. - * - * @static - * @return string - */ - public static function getViewName(){ - return self::$realClass->getViewName(); - } - - /** - * Set the name of the pagination view. - * - * @static - * @param string $viewName - */ - public static function setViewName($viewName){ - self::$realClass->setViewName($viewName); - } - - /** - * Get the locale of the paginator. - * - * @static - * @return string - */ - public static function getLocale(){ - return self::$realClass->getLocale(); - } - - /** - * Set the locale of the paginator. - * - * @static - * @param string $locale - */ - public static function setLocale($locale){ - self::$realClass->setLocale($locale); - } - - /** - * Get the active request instance. - * - * @static - * @return Symfony\Component\HttpFoundation\Request - */ - public static function getRequest(){ - return self::$realClass->getRequest(); - } - - /** - * Set the active request instance. - * - * @static - * @param Symfony\Component\HttpFoundation\Request $request - */ - public static function setRequest($request){ - self::$realClass->setRequest($request); - } - - /** - * Get the current view driver. - * - * @static - * @return Illuminate\View\Environment - */ - public static function getViewDriver(){ - return self::$realClass->getViewDriver(); - } - - /** - * Set the current view driver. - * - * @static - * @param Illuminate\View\Environment $view - */ - public static function setViewDriver($view){ - self::$realClass->setViewDriver($view); - } - - /** - * Get the translator instance. - * - * @static - * @return Symfony\Component\Translation\TranslatorInterface - */ - public static function getTranslator(){ - return self::$realClass->getTranslator(); - } - - } -} - -namespace { - class Password{ - /** - * @var Illuminate\Auth\Reminders\PasswordBroker $realClass - */ - static private $realClass; - - /** - * Create a new password broker instance. - * - * @static - * @param Illuminate\Auth\ReminderRepositoryInterface $reminders - * @param Illuminate\Auth\UserProviderInterface $users - * @param Illuminate\Routing\Redirector $redirector - * @param Illuminate\Mail\Mailer $mailer - * @param string $reminderView - */ - public static function __construct($reminders, $users, $redirect, $mailer, $reminderView){ - self::$realClass->__construct($reminders, $users, $redirect, $mailer, $reminderView); - } - - /** - * Send a password reminder to a user. - * - * @static - * @param array $credentials - * @param Closure $callback - * @return Illuminate\Http\RedirectResponse - */ - public static function remind($credentials, $callback = null){ - return self::$realClass->remind($credentials, $callback); - } - - /** - * Send the password reminder e-mail. - * - * @static - * @param Illuminate\Auth\RemindableInterface $user - * @param string $token - * @param Closure $callback - */ - public static function sendReminder($user, $token, $callback = null){ - self::$realClass->sendReminder($user, $token, $callback); - } - - /** - * Reset the password for the given token. - * - * @static - * @param string $token - * @param string $newPassword - * @param Closure $callback - * @return mixed - */ - public static function reset($credentials, $callback){ - return self::$realClass->reset($credentials, $callback); - } - - /** - * Get the user for the given credentials. - * - * @static - * @param array $credentials - * @return Illuminate\Auth\RemindableInterface - */ - public static function getUser($credentials){ - return self::$realClass->getUser($credentials); + return self::$root->withTablePrefix($grammar); } } @@ -5539,9 +913,9 @@ namespace { namespace { class Queue{ /** - * @var Illuminate\Queue\QueueInterface $realClass + * @var Illuminate\Queue\QueueInterface $root */ - static private $realClass; + static private $root; /** * Push a new job onto the queue. @@ -5552,7 +926,7 @@ namespace { * @param string $queue */ public static function push($job, $data = '', $queue = null){ - self::$realClass->push($job, $data, $queue); + self::$root->push($job, $data, $queue); } /** @@ -5565,7 +939,7 @@ namespace { * @param string $queue */ public static function later($delay, $job, $data = '', $queue = null){ - self::$realClass->later($delay, $job, $data, $queue); + self::$root->later($delay, $job, $data, $queue); } /** @@ -5576,126 +950,7 @@ namespace { * @return Illuminate\Queue\Jobs\Job|nul */ public static function pop($queue = null){ - return self::$realClass->pop($queue); - } - - } -} - -namespace { - class Redirect{ - /** - * @var Illuminate\Routing\Redirector $realClass - */ - static private $realClass; - - /** - * Create a new Redirector instance. - * - * @static - * @param Illuminate\Routing\UrlGenerator $generator - */ - public static function __construct($generator){ - self::$realClass->__construct($generator); - } - - /** - * Create a new redirect response to the previous location. - * - * @static - * @param int $status - * @param array $headers - * @return Illuminate\Http\RedirectResponse - */ - public static function back($status = '302', $headers = array()){ - return self::$realClass->back($status, $headers); - } - - /** - * Create a new redirect response to the current URI. - * - * @static - * @param int $status - * @param array $headers - * @return Illuminate\Http\RedirectResponse - */ - public static function refresh($status = '302', $headers = array()){ - return self::$realClass->refresh($status, $headers); - } - - /** - * Create a new redirect response to the given path. - * - * @static - * @param string $path - * @param int $status - * @param array $headers - * @param bool $secure - * @return Illuminate\Http\RedirectResponse - */ - public static function to($path, $status = '302', $headers = array(), $secure = null){ - return self::$realClass->to($path, $status, $headers, $secure); - } - - /** - * Create a new redirect response to the given HTTPS path. - * - * @static - * @param string $path - * @param int $status - * @param array $headers - * @return Illuminate\Http\RedirectResponse - */ - public static function secure($path, $status = '302', $headers = array()){ - return self::$realClass->secure($path, $status, $headers); - } - - /** - * Create a new redirect response to a named route. - * - * @static - * @param string $route - * @param array $parameters - * @param int $status - * @param array $headers - * @return Illuminate\Http\RedirectResponse - */ - public static function route($route, $parameters = array(), $status = '302', $headers = array()){ - return self::$realClass->route($route, $parameters, $status, $headers); - } - - /** - * Create a new redirect response to a controller action. - * - * @static - * @param string $action - * @param array $parameters - * @param int $status - * @param array $headers - * @return Illuminate\Http\RedirectResponse - */ - public static function action($action, $parameters = array(), $status = '302', $headers = array()){ - return self::$realClass->action($action, $parameters, $status, $headers); - } - - /** - * Get the URL generator instance. - * - * @static - * @return Illuminate\Routing\UrlGenerator - */ - public static function getUrlGenerator(){ - return self::$realClass->getUrlGenerator(); - } - - /** - * Set the active session store. - * - * @static - * @param Illuminate\Session\Store $session - */ - public static function setSession($session){ - self::$realClass->setSession($session); + return self::$root->pop($queue); } } @@ -5704,9 +959,9 @@ namespace { namespace { class Redis{ /** - * @var Illuminate\Redis\Database $realClass + * @var Illuminate\Redis\Database $root */ - static private $realClass; + static private $root; /** * Create a new Redis connection instance. @@ -5718,7 +973,7 @@ namespace { * @param string $password */ public static function __construct($host, $port, $database = '0', $password = null){ - self::$realClass->__construct($host, $port, $database, $password); + self::$root->__construct($host, $port, $database, $password); } /** @@ -5727,7 +982,7 @@ namespace { * @static */ public static function connect(){ - self::$realClass->connect(); + self::$root->connect(); } /** @@ -5739,7 +994,7 @@ namespace { * @return mixed */ public static function command($method, $parameters = array()){ - return self::$realClass->command($method, $parameters); + return self::$root->command($method, $parameters); } /** @@ -5759,7 +1014,7 @@ namespace { * @return string */ public static function buildCommand($method, $parameters){ - return self::$realClass->buildCommand($method, $parameters); + return self::$root->buildCommand($method, $parameters); } /** @@ -5770,7 +1025,7 @@ namespace { * @return mixed */ public static function parseResponse($response){ - return self::$realClass->parseResponse($response); + return self::$root->parseResponse($response); } /** @@ -5781,7 +1036,7 @@ namespace { * @return string */ public static function fileRead($bytes){ - return self::$realClass->fileRead($bytes); + return self::$root->fileRead($bytes); } /** @@ -5792,7 +1047,7 @@ namespace { * @return string */ public static function fileGet($bytes){ - return self::$realClass->fileGet($bytes); + return self::$root->fileGet($bytes); } /** @@ -5802,7 +1057,7 @@ namespace { * @param string $command */ public static function fileWrite($command){ - self::$realClass->fileWrite($command); + self::$root->fileWrite($command); } /** @@ -5812,7 +1067,7 @@ namespace { * @return resource */ public static function getConnection(){ - return self::$realClass->getConnection(); + return self::$root->getConnection(); } /** @@ -5824,18 +1079,3220 @@ namespace { * @return mixed */ public static function __call($method, $parameters){ - return self::$realClass->__call($method, $parameters); + return self::$root->__call($method, $parameters); } } } namespace { - class Request{ + class App{ /** - * @var Illuminate\Http\Request $realClass + * @var Illuminate\Foundation\Application $root */ - static private $realClass; + static private $root; + + /** + * Create a new Illuminate application instance. + * + * @static + */ + public static function __construct(){ + self::$root->__construct(); + } + + /** + * Bind the installation paths to the application. + * + * @static + * @param array $paths + */ + public static function bindInstallPaths($paths){ + self::$root->bindInstallPaths($paths); + } + + /** + * Get the application bootstrap file. + * + * @static + * @return string + */ + public static function getBootstrapFile(){ + return self::$root->getBootstrapFile(); + } + + /** + * Register the aliased class loader. + * + * @static + * @param array $aliases + */ + public static function registerAliasLoader($aliases){ + self::$root->registerAliasLoader($aliases); + } + + /** + * Start the exception handling for the request. + * + * @static + */ + public static function startExceptionHandling(){ + self::$root->startExceptionHandling(); + } + + /** + * Get the current application environment. + * + * @static + * @return string + */ + public static function environment(){ + return self::$root->environment(); + } + + /** + * Detect the application's current environment. + * + * @static + * @param array|string $environments + * @return string + */ + public static function detectEnvironment($environments){ + return self::$root->detectEnvironment($environments); + } + + /** + * Determine if we are running in the console. + * + * @static + * @return bool + */ + public static function runningInConsole(){ + return self::$root->runningInConsole(); + } + + /** + * Determine if we are running unit tests. + * + * @static + * @return bool + */ + public static function runningUnitTests(){ + return self::$root->runningUnitTests(); + } + + /** + * Register a service provider with the application. + * + * @static + * @param Illuminate\Support\ServiceProvider|string $provider + * @param array $options + */ + public static function register($provider, $options = array()){ + self::$root->register($provider, $options); + } + + /** + * Load and boot all of the remaining deferred providers. + * + * @static + */ + public static function loadDeferredProviders(){ + self::$root->loadDeferredProviders(); + } + + /** + * Resolve the given type from the container. + * (Overriding Container::make) + * + * @static + * @param string $abstract + * @param array $parameters + * @return mixed + */ + public static function make($abstract, $parameters = array()){ + return self::$root->make($abstract, $parameters); + } + + /** + * Register a "before" application filter. + * + * @static + * @param Closure|string $callback + */ + public static function before($callback){ + self::$root->before($callback); + } + + /** + * Register an "after" application filter. + * + * @static + * @param Closure|string $callback + */ + public static function after($callback){ + self::$root->after($callback); + } + + /** + * Register a "close" application filter. + * + * @static + * @param Closure|string $callback + */ + public static function close($callback){ + self::$root->close($callback); + } + + /** + * Register a "finish" application filter. + * + * @static + * @param Closure|string $callback + */ + public static function finish($callback){ + self::$root->finish($callback); + } + + /** + * Register a "shutdown" callback. + * + * @static + * @param callable $callback + */ + public static function shutdown($callback = null){ + self::$root->shutdown($callback); + } + + /** + * Handles the given request and delivers the response. + * + * @static + */ + public static function run(){ + self::$root->run(); + } + + /** + * Handle the given request and get the response. + * + * @static + * @param Illuminate\Foundation\Request $request + * @return Symfony\Component\HttpFoundation\Response + */ + public static function dispatch($request){ + return self::$root->dispatch($request); + } + + /** + * Handle the given request and get the response. + * Provides compatibility with BrowserKit functional testing. + * + * @static + * @param Illuminate\Foundation\Request $request + * @param int $type + * @param bool $catch + * @return Symfony\Component\HttpFoundation\Response + */ + public static function handle($request, $type = '1', $catch = true){ + return self::$root->handle($request, $type, $catch); + } + + /** + * Boot the application's service providers. + * + * @static + */ + public static function boot(){ + self::$root->boot(); + } + + /** + * Register a new boot listener. + * + * @static + * @param mixed $callback + */ + public static function booting($callback){ + self::$root->booting($callback); + } + + /** + * Register a new "booted" listener. + * + * @static + * @param mixed $callback + */ + public static function booted($callback){ + self::$root->booted($callback); + } + + /** + * Prepare the request by injecting any services. + * + * @static + * @param Illuminate\Foundation\Request $request + * @return Illuminate\Foundation\Request + */ + public static function prepareRequest($request){ + return self::$root->prepareRequest($request); + } + + /** + * Prepare the given value as a Response object. + * + * @static + * @param mixed $value + * @param Illuminate\Foundation\Request $request + * @return Symfony\Component\HttpFoundation\Response + */ + public static function prepareResponse($value, $request){ + return self::$root->prepareResponse($value, $request); + } + + /** + * Set the current application locale. + * + * @static + * @param string $locale + */ + public static function setLocale($locale){ + self::$root->setLocale($locale); + } + + /** + * Throw an HttpException with the given data. + * + * @static + * @param int $code + * @param string $message + * @param array $headers + */ + public static function abort($code, $message = '', $headers = array()){ + self::$root->abort($code, $message, $headers); + } + + /** + * Register a 404 error handler. + * + * @static + * @param Closure $callback + */ + public static function missing($callback){ + self::$root->missing($callback); + } + + /** + * Register an application error handler. + * + * @static + * @param Closure $callback + */ + public static function error($callback){ + self::$root->error($callback); + } + + /** + * Register an error handler for fatal errors. + * + * @static + * @param Closure $callback + */ + public static function fatal($callback){ + self::$root->fatal($callback); + } + + /** + * Get the service providers that have been loaded. + * + * @static + * @return array + */ + public static function getLoadedProviders(){ + return self::$root->getLoadedProviders(); + } + + /** + * Set the application's deferred services. + * + * @static + * @param array $services + */ + public static function setDeferredServices($services){ + self::$root->setDeferredServices($services); + } + + /** + * Dynamically access application services. + * + * @static + * @param string $key + * @return mixed + */ + public static function __get($key){ + return self::$root->__get($key); + } + + /** + * Dynamically set application services. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function __set($key, $value){ + self::$root->__set($key, $value); + } + + /** + * Determine if the given abstract type has been bound. + * + * @static + * @param string $abstract + * @return bool + */ + public static function bound($abstract){ + return self::$root->bound($abstract); + } + + /** + * Register a binding with the container. + * + * @static + * @param string $abstract + * @param Closure|string|null $concrete + * @param bool $shared + */ + public static function bind($abstract, $concrete = null, $shared = false){ + self::$root->bind($abstract, $concrete, $shared); + } + + /** + * Register a binding if it hasn't already been registered. + * + * @static + * @param string $abstract + * @param Closure|string|null $concrete + * @param bool $shared + * @return bool + */ + public static function bindIf($abstract, $concrete = null, $shared = false){ + return self::$root->bindIf($abstract, $concrete, $shared); + } + + /** + * Register a shared binding in the container. + * + * @static + * @param string $abstract + * @param Closure|string|null $concrete + */ + public static function singleton($abstract, $concrete = null){ + self::$root->singleton($abstract, $concrete); + } + + /** + * Wrap a Closure such that it is shared. + * + * @static + * @param Closure $closure + * @return Closure + */ + public static function share($closure){ + return self::$root->share($closure); + } + + /** + * "Extend" an abstract type in the container. + * + * @static + * @param string $abstract + * @param Closure $closure + */ + public static function extend($abstract, $closure){ + self::$root->extend($abstract, $closure); + } + + /** + * Register an existing instance as shared in the container. + * + * @static + * @param string $abstract + * @param mixed $instance + */ + public static function instance($abstract, $instance){ + self::$root->instance($abstract, $instance); + } + + /** + * Alias a type to a shorter name. + * + * @static + * @param string $abstract + * @param string $alias + */ + public static function alias($abstract, $alias){ + self::$root->alias($abstract, $alias); + } + + /** + * Instantiate a concrete instance of the given type. + * + * @static + * @param string $concrete + * @param array $parameters + * @return mixed + */ + public static function build($concrete, $parameters = array()){ + return self::$root->build($concrete, $parameters); + } + + /** + * Register a new resolving callback. + * + * @static + * @param Closure $callback + */ + public static function resolving($callback){ + self::$root->resolving($callback); + } + + /** + * Get the container's bindings. + * + * @static + * @return array + */ + public static function getBindings(){ + return self::$root->getBindings(); + } + + /** + * Determine if a given offset exists. + * + * @static + * @param string $key + * @return bool + */ + public static function offsetExists($key){ + return self::$root->offsetExists($key); + } + + /** + * Get the value at a given offset. + * + * @static + * @param string $key + * @return mixed + */ + public static function offsetGet($key){ + return self::$root->offsetGet($key); + } + + /** + * Set the value at a given offset. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function offsetSet($key, $value){ + self::$root->offsetSet($key, $value); + } + + /** + * Unset the value at a given offset. + * + * @static + * @param string $key + */ + public static function offsetUnset($key){ + self::$root->offsetUnset($key); + } + + } +} + +namespace { + class Artisan{ + /** + * @var Illuminate\Console\Application $root + */ + static private $root; + + /** + * Start a new Console application. + * + * @static + * @param Illuminate\Foundation\Application $app + * @return Illuminate\Console\Application + */ + public static function start($app){ + return self::$root->start($app); + } + + /** + * Add a command to the console. + * + * @static + * @param Symfony\Component\Console\Command\Command $command + * @return Symfony\Component\Console\Command\Command + */ + public static function add($command){ + return self::$root->add($command); + } + + /** + * Add a command, resolving through the application. + * + * @static + * @param string $command + */ + public static function resolve($command){ + self::$root->resolve($command); + } + + /** + * Resolve an array of commands through the application. + * + * @static + * @param array|dynamic $commands + */ + public static function resolveCommands($commands){ + self::$root->resolveCommands($commands); + } + + /** + * Render the given exception. + * + * @static + * @param Exception $e + * @param Symfony\Component\Console\Output\OutputInterface $output + */ + public static function renderException($e, $output){ + self::$root->renderException($e, $output); + } + + /** + * Set the exception handler instance. + * + * @static + * @param Illuminate\Exception\Handler $handler + */ + public static function setExceptionHandler($handler){ + self::$root->setExceptionHandler($handler); + } + + /** + * Set the Laravel application instance. + * + * @static + * @param Illuminate\Foundation\Application $laravel + */ + public static function setLaravel($laravel){ + self::$root->setLaravel($laravel); + } + + /** + * Constructor. + * + * @static + * @param string $name The name of the application + * @param string $version The version of the application + */ + public static function __construct($name = 'UNKNOWN', $version = 'UNKNOWN'){ + self::$root->__construct($name, $version); + } + + /** + * Runs the current application. + * + * @static + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * @return integer 0 if everything went fine, or an error code + */ + public static function run($input = null, $output = null){ + return self::$root->run($input, $output); + } + + /** + * Runs the current application. + * + * @static + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * @return integer 0 if everything went fine, or an error code + */ + public static function doRun($input, $output){ + return self::$root->doRun($input, $output); + } + + /** + * Set a helper set to be used with the command. + * + * @static + * @param HelperSet $helperSet The helper set + */ + public static function setHelperSet($helperSet){ + self::$root->setHelperSet($helperSet); + } + + /** + * Get the helper set associated with the command. + * + * @static + * @return HelperSet The HelperSet instance associated with this command + */ + public static function getHelperSet(){ + return self::$root->getHelperSet(); + } + + /** + * Set an input definition set to be used with this application + * + * @static + * @param InputDefinition $definition The input definition + */ + public static function setDefinition($definition){ + self::$root->setDefinition($definition); + } + + /** + * Gets the InputDefinition related to this Application. + * + * @static + * @return InputDefinition The InputDefinition instance + */ + public static function getDefinition(){ + return self::$root->getDefinition(); + } + + /** + * Gets the help message. + * + * @static + * @return string A help message. + */ + public static function getHelp(){ + return self::$root->getHelp(); + } + + /** + * Sets whether to catch exceptions or not during commands execution. + * + * @static + * @param Boolean $boolean Whether to catch exceptions or not during commands execution + */ + public static function setCatchExceptions($boolean){ + self::$root->setCatchExceptions($boolean); + } + + /** + * Sets whether to automatically exit after a command execution or not. + * + * @static + * @param Boolean $boolean Whether to automatically exit after a command execution or not + */ + public static function setAutoExit($boolean){ + self::$root->setAutoExit($boolean); + } + + /** + * Gets the name of the application. + * + * @static + * @return string The application name + */ + public static function getName(){ + return self::$root->getName(); + } + + /** + * Sets the application name. + * + * @static + * @param string $name The application name + */ + public static function setName($name){ + self::$root->setName($name); + } + + /** + * Gets the application version. + * + * @static + * @return string The application version + */ + public static function getVersion(){ + return self::$root->getVersion(); + } + + /** + * Sets the application version. + * + * @static + * @param string $version The application version + */ + public static function setVersion($version){ + self::$root->setVersion($version); + } + + /** + * Returns the long version of the application. + * + * @static + * @return string The long application version + */ + public static function getLongVersion(){ + return self::$root->getLongVersion(); + } + + /** + * Registers a new command. + * + * @static + * @param string $name The command name + * @return Command The newly created command + */ + public static function register($name){ + return self::$root->register($name); + } + + /** + * Adds an array of command objects. + * + * @static + * @param Command[] $commands An array of commands + */ + public static function addCommands($commands){ + self::$root->addCommands($commands); + } + + /** + * Returns a registered command by name or alias. + * + * @static + * @param string $name The command name or alias + * @return Command A Command object + */ + public static function get($name){ + return self::$root->get($name); + } + + /** + * Returns true if the command exists, false otherwise. + * + * @static + * @param string $name The command name or alias + * @return Boolean true if the command exists, false otherwise + */ + public static function has($name){ + return self::$root->has($name); + } + + /** + * Returns an array of all unique namespaces used by currently registered commands. + * It does not returns the global namespace which always exists. + * + * @static + * @return array An array of namespaces + */ + public static function getNamespaces(){ + return self::$root->getNamespaces(); + } + + /** + * Finds a registered namespace by a name or an abbreviation. + * + * @static + * @param string $namespace A namespace or abbreviation to search for + * @return string A registered namespace + */ + public static function findNamespace($namespace){ + return self::$root->findNamespace($namespace); + } + + /** + * Finds a command by name or alias. + * Contrary to get, this command tries to find the best + * match if you give it an abbreviation of a name or alias. + * + * @static + * @param string $name A command name or a command alias + * @return Command A Command instance + */ + public static function find($name){ + return self::$root->find($name); + } + + /** + * Gets the commands (registered in the given namespace if provided). + * The array keys are the full names and the values the command instances. + * + * @static + * @param string $namespace A namespace name + * @return Command[] An array of Command instances + */ + public static function all($namespace = null){ + return self::$root->all($namespace); + } + + /** + * Returns an array of possible abbreviations given a set of names. + * + * @static + * @param array $names An array of names + * @return array An array of abbreviations + */ + public static function getAbbreviations($names){ + return self::$root->getAbbreviations($names); + } + + /** + * Returns a text representation of the Application. + * + * @static + * @param string $namespace An optional namespace name + * @param boolean $raw Whether to return raw command list + * @return string A string representing the Application + */ + public static function asText($namespace = null, $raw = false){ + return self::$root->asText($namespace, $raw); + } + + /** + * Returns an XML representation of the Application. + * + * @static + * @param string $namespace An optional namespace name + * @param Boolean $asDom Whether to return a DOM or an XML string + * @return string|DOMDocument An XML string representing the Application + */ + public static function asXml($namespace = null, $asDom = false){ + return self::$root->asXml($namespace, $asDom); + } + + /** + * Tries to figure out the terminal dimensions based on the current environment + * + * @static + * @return array Array containing width and height + */ + public static function getTerminalDimensions(){ + return self::$root->getTerminalDimensions(); + } + + } +} + +namespace { + class Blade{ + /** + * @var Illuminate\View\Compilers\BladeCompiler $root + */ + static private $root; + + /** + * Compile the view at the given path. + * + * @static + * @param string $path + */ + public static function compile($path){ + self::$root->compile($path); + } + + /** + * Compile the given Blade template contents. + * + * @static + * @param string $value + * @return string + */ + public static function compileString($value){ + return self::$root->compileString($value); + } + + /** + * Register a custom Blade compiler. + * + * @static + * @param Closure $compiler + */ + public static function extend($compiler){ + self::$root->extend($compiler); + } + + /** + * Get the regular expression for a generic Blade function. + * + * @static + * @param string $function + * @return string + */ + public static function createMatcher($function){ + return self::$root->createMatcher($function); + } + + /** + * Get the regular expression for a generic Blade function. + * + * @static + * @param string $function + * @return string + */ + public static function createOpenMatcher($function){ + return self::$root->createOpenMatcher($function); + } + + /** + * Create a plain Blade matcher. + * + * @static + * @param string $function + * @return string + */ + public static function createPlainMatcher($function){ + return self::$root->createPlainMatcher($function); + } + + /** + * Sets the content tags used for the compiler. + * + * @static + * @param string $openTag + * @param string $closeTag + * @param array $raw + */ + public static function setContentTags($openTag, $closeTag, $raw = false){ + self::$root->setContentTags($openTag, $closeTag, $raw); + } + + /** + * Sets the raw content tags used for the compiler. + * + * @static + * @param string $openTag + * @param string $closeTag + */ + public static function setEscapedContentTags($openTag, $closeTag){ + self::$root->setEscapedContentTags($openTag, $closeTag); + } + + /** + * Create a new compiler instance. + * + * @static + * @param string $cachePath + */ + public static function __construct($files, $cachePath){ + self::$root->__construct($files, $cachePath); + } + + /** + * Get the path to the compiled version of a view. + * + * @static + * @param string $path + * @return string + */ + public static function getCompiledPath($path){ + return self::$root->getCompiledPath($path); + } + + /** + * Determine if the view at the given path is expired. + * + * @static + * @param string $path + * @return bool + */ + public static function isExpired($path){ + return self::$root->isExpired($path); + } + + } +} + +namespace { + class ClassLoader{ + /** + * @var Illuminate\Support\ClassLoader $root + */ + static private $root; + + /** + * Load the given class file. + * + * @static + * @param string $class + */ + public static function load($class){ + self::$root->load($class); + } + + /** + * Get the normal file name for a class. + * + * @static + * @param string $class + * @return string + */ + public static function normalizeClass($class){ + return self::$root->normalizeClass($class); + } + + /** + * Register the given class loader on the auto-loader stack. + * + * @static + */ + public static function register(){ + self::$root->register(); + } + + /** + * Add directories to the class loader. + * + * @static + * @param string|array $directories + */ + public static function addDirectories($directories){ + self::$root->addDirectories($directories); + } + + /** + * Remove directories from the class loader. + * + * @static + * @param string|array $directories + */ + public static function removeDirectories($directories = null){ + self::$root->removeDirectories($directories); + } + + /** + * Gets all the directories registered with the loader. + * + * @static + * @return array + */ + public static function getDirectories(){ + return self::$root->getDirectories(); + } + + } +} + +namespace { + class Config{ + /** + * @var Illuminate\Config\Repository $root + */ + static private $root; + + /** + * Create a new configuration repository. + * + * @static + * @param Illuminate\Config\LoaderInterface $loader + * @param string $environment + */ + public static function __construct($loader, $environment){ + self::$root->__construct($loader, $environment); + } + + /** + * Determine if the given configuration value exists. + * + * @static + * @param string $key + * @return bool + */ + public static function has($key){ + return self::$root->has($key); + } + + /** + * Determine if a configuration group exists. + * + * @static + * @param string $key + * @return bool + */ + public static function hasGroup($key){ + return self::$root->hasGroup($key); + } + + /** + * Get the specified configuration value. + * + * @static + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function get($key, $default = null){ + return self::$root->get($key, $default); + } + + /** + * Set a given configuration value. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function set($key, $value){ + self::$root->set($key, $value); + } + + /** + * Register a package for cascading configuration. + * + * @static + * @param string $package + * @param string $hint + * @param string $namespace + */ + public static function package($package, $hint, $namespace = null){ + self::$root->package($package, $hint, $namespace); + } + + /** + * Register an after load callback for a given namespace. + * + * @static + * @param string $namespace + * @param Closure $callback + */ + public static function afterLoading($namespace, $callback){ + self::$root->afterLoading($namespace, $callback); + } + + /** + * Add a new namespace to the loader. + * + * @static + * @param string $namespace + * @param string $hint + */ + public static function addNamespace($namespace, $hint){ + self::$root->addNamespace($namespace, $hint); + } + + /** + * Returns all registered namespaces with the config + * loader. + * + * @static + * @return array + */ + public static function getNamespaces(){ + return self::$root->getNamespaces(); + } + + /** + * Get the loader implementation. + * + * @static + * @return Illuminate\Config\LoaderInterface + */ + public static function getLoader(){ + return self::$root->getLoader(); + } + + /** + * Set the loader implementation. + * + * @static + * @return Illuminate\Config\LoaderInterface + */ + public static function setLoader($loader){ + return self::$root->setLoader($loader); + } + + /** + * Get the current configuration environment. + * + * @static + * @return string + */ + public static function getEnvironment(){ + return self::$root->getEnvironment(); + } + + /** + * Get the after load callback array. + * + * @static + * @return array + */ + public static function getAfterLoadCallbacks(){ + return self::$root->getAfterLoadCallbacks(); + } + + /** + * Get all of the configuration items. + * + * @static + * @return array + */ + public static function getItems(){ + return self::$root->getItems(); + } + + /** + * Determine if the given configuration option exists. + * + * @static + * @param string $key + * @return bool + */ + public static function offsetExists($key){ + return self::$root->offsetExists($key); + } + + /** + * Get a configuration option. + * + * @static + * @param string $key + * @return bool + */ + public static function offsetGet($key){ + return self::$root->offsetGet($key); + } + + /** + * Set a configuration option. + * + * @static + * @param string $key + * @return bool + */ + public static function offsetSet($key, $value){ + return self::$root->offsetSet($key, $value); + } + + /** + * Unset a configuration option. + * + * @static + * @param string $key + * @return bool + */ + public static function offsetUnset($key){ + return self::$root->offsetUnset($key); + } + + /** + * Parse a key into namespace, group, and item. + * + * @static + * @param string $key + * @return array + */ + public static function parseKey($key){ + return self::$root->parseKey($key); + } + + /** + * Set the parsed value of a key. + * + * @static + * @param string $key + * @param array $parsed + */ + public static function setParsedKey($key, $parsed){ + self::$root->setParsedKey($key, $parsed); + } + + } +} + +namespace { + class Controller{ + /** + * @var Illuminate\Routing\Controllers\Controller $root + */ + static private $root; + + /** + * Register a new "before" filter on the controller. + * + * @static + * @param string $filter + * @param array $options + */ + public static function beforeFilter($filter, $options = array()){ + self::$root->beforeFilter($filter, $options); + } + + /** + * Register a new "after" filter on the controller. + * + * @static + * @param string $filter + * @param array $options + */ + public static function afterFilter($filter, $options = array()){ + self::$root->afterFilter($filter, $options); + } + + /** + * Execute an action on the controller. + * + * @static + * @param Illuminate\Container $container + * @param Illuminate\Routing\Router $router + * @param string $method + * @param array $parameters + * @return Symfony\Component\HttpFoundation\Response + */ + public static function callAction($container, $router, $method, $parameters){ + return self::$root->callAction($container, $router, $method, $parameters); + } + + /** + * Get the code registered filters. + * + * @static + * @return array + */ + public static function getControllerFilters(){ + return self::$root->getControllerFilters(); + } + + /** + * Handle calls to missing methods on the controller. + * + * @static + * @param array $parameters + * @return mixed + */ + public static function missingMethod($parameters){ + return self::$root->missingMethod($parameters); + } + + /** + * Handle calls to missing methods on the controller. + * + * @static + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __call($method, $parameters){ + return self::$root->__call($method, $parameters); + } + + } +} + +namespace { + class Cookie{ + /** + * @var Illuminate\Cookie\CookieJar $root + */ + static private $root; + + /** + * Create a new cookie manager instance. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @param Illuminate\Encryption\Encrypter $encrypter + */ + public static function __construct($request, $encrypter){ + self::$root->__construct($request, $encrypter); + } + + /** + * Determine if a cookie exists and is not null. + * + * @static + * @param string $key + * @return bool + */ + public static function has($key){ + return self::$root->has($key); + } + + /** + * Get the value of the given cookie. + * + * @static + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function get($key, $default = null){ + return self::$root->get($key, $default); + } + + /** + * Create a new cookie instance. + * + * @static + * @param string $name + * @param string $value + * @param int $minutes + * @param string $path + * @param string $domain + * @param bool $secure + * @param bool $httpOnly + * @return Symfony\Component\HttpFoundation\Cookie + */ + public static function make($name, $value, $minutes = '0', $path = '/', $domain = null, $secure = false, $httpOnly = true){ + return self::$root->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly); + } + + /** + * Create a cookie that lasts "forever" (five years). + * + * @static + * @param string $name + * @param string $value + * @param string $path + * @param string $domain + * @param bool $secure + * @param bool $httpOnly + * @return Symfony\Component\HttpFoundation\Cookie + */ + public static function forever($name, $value, $path = '/', $domain = null, $secure = false, $httpOnly = true){ + return self::$root->forever($name, $value, $path, $domain, $secure, $httpOnly); + } + + /** + * Expire the given cookie. + * + * @static + * @param string $name + * @return Symfony\Component\HttpFoundation\Cookie + */ + public static function forget($name){ + return self::$root->forget($name); + } + + /** + * Get the request instance. + * + * @static + * @return Symfony\Component\HttpFoundation\Request + */ + public static function getRequest(){ + return self::$root->getRequest(); + } + + /** + * Get the encrypter instance. + * + * @static + * @return Illuminate\Encrypter + */ + public static function getEncrypter(){ + return self::$root->getEncrypter(); + } + + } +} + +namespace { + class Crypt{ + /** + * @var Illuminate\Encryption\Encrypter $root + */ + static private $root; + + /** + * Create a new encrypter instance. + * + * @static + * @param string $key + */ + public static function __construct($key){ + self::$root->__construct($key); + } + + /** + * Encrypt the given value. + * + * @static + * @param string $value + * @return string + */ + public static function encrypt($value){ + return self::$root->encrypt($value); + } + + /** + * Decrypt the given value. + * + * @static + * @param string $value + * @return string + */ + public static function decrypt($payload){ + return self::$root->decrypt($payload); + } + + } +} + +namespace { + class Eloquent{ + /** + * @var Illuminate\Database\Eloquent\Model $root + */ + static private $root; + + /** + * Create a new Eloquent model instance. + * + * @static + * @param array $attributes + */ + public static function __construct($attributes = array()){ + self::$root->__construct($attributes); + } + + /** + * Fill the model with an array of attributes. + * + * @static + * @param array $attributes + * @return Illuminate\Database\Eloquent\Model + */ + public static function fill($attributes){ + return self::$root->fill($attributes); + } + + /** + * Create a new instance of the given model. + * + * @static + * @param array $attributes + * @param bool $exists + * @return Illuminate\Database\Eloquent\Model + */ + public static function newInstance($attributes = array(), $exists = false){ + return self::$root->newInstance($attributes, $exists); + } + + /** + * Create a new model instance that is existing. + * + * @static + * @param array $attributes + * @return Illuminate\Database\Eloquent\Model + */ + public static function newFromBuilder($attributes = array()){ + return self::$root->newFromBuilder($attributes); + } + + /** + * Save a new model and return the instance. + * + * @static + * @param array $attributes + * @return Illuminate\Database\Eloquent\Model + */ + public static function create($attributes){ + return self::$root->create($attributes); + } + + /** + * Begin querying the model on a given connection. + * + * @static + * @param string $connection + * @return Illuminate\Database\Eloquent\Builder + */ + public static function on($connection){ + return self::$root->on($connection); + } + + /** + * Get all of the models from the database. + * + * @static + * @param array $columns + * @return Illuminate\Database\Eloquent\Collection + */ + public static function all($columns = array()){ + return self::$root->all($columns); + } + + /** + * Find a model by its primary key. + * + * @static + * @param mixed $id + * @param array $columns + * @return Illuminate\Database\Eloquent\Model|Collection + */ + public static function find($id, $columns = array()){ + return self::$root->find($id, $columns); + } + + /** + * Being querying a model with eager loading. + * + * @static + * @param array $relations + * @return Illuminate\Database\Eloquent\Builder + */ + public static function with($relations){ + return self::$root->with($relations); + } + + /** + * Define a one-to-one relationship. + * + * @static + * @param string $related + * @param string $foreignKey + * @return Illuminate\Database\Eloquent\Relation\HasOne + */ + public static function hasOne($related, $foreignKey = null){ + return self::$root->hasOne($related, $foreignKey); + } + + /** + * Define a polymorphic one-to-one relationship. + * + * @static + * @param string $related + * @param string $name + * @param string $type + * @param string $id + * @return Illuminate\Database\Eloquent\Relation\MorphOne + */ + public static function morphOne($related, $name, $type = null, $id = null){ + return self::$root->morphOne($related, $name, $type, $id); + } + + /** + * Define an inverse one-to-one or many relationship. + * + * @static + * @param string $related + * @param string $foreignKey + * @return Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public static function belongsTo($related, $foreignKey = null){ + return self::$root->belongsTo($related, $foreignKey); + } + + /** + * Define an polymorphic, inverse one-to-one or many relationship. + * + * @static + * @param string $name + * @param string $type + * @param string $id + * @return Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public static function morphTo($name = null, $type = null, $id = null){ + return self::$root->morphTo($name, $type, $id); + } + + /** + * Define a one-to-many relationship. + * + * @static + * @param string $related + * @param string $foreignKey + * @return Illuminate\Database\Eloquent\Relations\HasMany + */ + public static function hasMany($related, $foreignKey = null){ + return self::$root->hasMany($related, $foreignKey); + } + + /** + * Define a polymorphic one-to-many relationship. + * + * @static + * @param string $related + * @param string $name + * @param string $type + * @param string $id + * @return Illuminate\Database\Eloquent\Relation\MorphMany + */ + public static function morphMany($related, $name, $type = null, $id = null){ + return self::$root->morphMany($related, $name, $type, $id); + } + + /** + * Define a many-to-many relationship. + * + * @static + * @param string $related + * @param string $table + * @param string $foreignKey + * @param string $otherKey + * @return Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public static function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null){ + return self::$root->belongsToMany($related, $table, $foreignKey, $otherKey); + } + + /** + * Get the joining table name for a many-to-many relation. + * + * @static + * @param string $related + * @return string + */ + public static function joiningTable($related){ + return self::$root->joiningTable($related); + } + + /** + * Delete the model from the database. + * + * @static + */ + public static function delete(){ + self::$root->delete(); + } + + /** + * Register an updating model event with the dispatcher. + * + * @static + * @param Closure $callback + */ + public static function updating($callback){ + self::$root->updating($callback); + } + + /** + * Register an updated model event with the dispatcher. + * + * @static + * @param Closure $callback + */ + public static function updated($callback){ + self::$root->updated($callback); + } + + /** + * Register a creating model event with the dispatcher. + * + * @static + * @param Closure $callback + */ + public static function creating($callback){ + self::$root->creating($callback); + } + + /** + * Register a created model event with the dispatcher. + * + * @static + * @param Closure $callback + */ + public static function created($callback){ + self::$root->created($callback); + } + + /** + * Save the model to the database. + * + * @static + * @return bool + */ + public static function save(){ + return self::$root->save(); + } + + /** + * Update the model's update timestamp. + * + * @static + * @return bool + */ + public static function touch(){ + return self::$root->touch(); + } + + /** + * Set the value of the "created at" attribute. + * + * @static + * @param mixed $value + */ + public static function setCreatedAt($value){ + self::$root->setCreatedAt($value); + } + + /** + * Set the value of the "updated at" attribute. + * + * @static + * @param mixed $value + */ + public static function setUpdatedAt($value){ + self::$root->setUpdatedAt($value); + } + + /** + * Get the name of the "created at" column. + * + * @static + * @return string + */ + public static function getCreatedAtColumn(){ + return self::$root->getCreatedAtColumn(); + } + + /** + * Get the name of the "updated at" column. + * + * @static + * @return string + */ + public static function getUpdatedAtColumn(){ + return self::$root->getUpdatedAtColumn(); + } + + /** + * Get a fresh timestamp for the model. + * + * @static + * @return mixed + */ + public static function freshTimestamp(){ + return self::$root->freshTimestamp(); + } + + /** + * Get a new query builder for the model's table. + * + * @static + * @return Illuminate\Database\Eloquent\Builder + */ + public static function newQuery(){ + return self::$root->newQuery(); + } + + /** + * Create a new Eloquent Collection instance. + * + * @static + * @param array $models + * @return Illuminate\Database\Eloquent\Collection + */ + public static function newCollection($models = array()){ + return self::$root->newCollection($models); + } + + /** + * Get the table associated with the model. + * + * @static + * @return string + */ + public static function getTable(){ + return self::$root->getTable(); + } + + /** + * Set the table associated with the model. + * + * @static + * @param string $table + */ + public static function setTable($table){ + self::$root->setTable($table); + } + + /** + * Get the value of the model's primary key. + * + * @static + * @return mixed + */ + public static function getKey(){ + return self::$root->getKey(); + } + + /** + * Get the primary key for the model. + * + * @static + * @return string + */ + public static function getKeyName(){ + return self::$root->getKeyName(); + } + + /** + * Determine if the model uses timestamps. + * + * @static + * @return bool + */ + public static function usesTimestamps(){ + return self::$root->usesTimestamps(); + } + + /** + * Get the number of models to return per page. + * + * @static + * @return int + */ + public static function getPerPage(){ + return self::$root->getPerPage(); + } + + /** + * Set the number of models ot return per page. + * + * @static + * @param int $perPage + */ + public static function setPerPage($perPage){ + self::$root->setPerPage($perPage); + } + + /** + * Get the default foreign key name for the model. + * + * @static + * @return string + */ + public static function getForeignKey(){ + return self::$root->getForeignKey(); + } + + /** + * Get the hidden attributes for the model. + * + * @static + * @return array + */ + public static function getHidden(){ + return self::$root->getHidden(); + } + + /** + * Set the hidden attributes for the model. + * + * @static + * @param array $hidden + */ + public static function setHidden($hidden){ + self::$root->setHidden($hidden); + } + + /** + * Get the fillable attributes for the model. + * + * @static + * @return array + */ + public static function getFillable(){ + return self::$root->getFillable(); + } + + /** + * Set the fillable attributes for the model. + * + * @static + * @param array $fillable + * @return Illuminate\Database\Eloquent\Model + */ + public static function fillable($fillable){ + return self::$root->fillable($fillable); + } + + /** + * Set the guarded attributes for the model. + * + * @static + * @param array $guarded + * @return Illuminate\Database\Eloquent\Model + */ + public static function guard($guarded){ + return self::$root->guard($guarded); + } + + /** + * Determine if the given attribute may be mass assigned. + * + * @static + * @param string $key + * @return bool + */ + public static function isFillable($key){ + return self::$root->isFillable($key); + } + + /** + * Get the value indicating whether the IDs are incrementing. + * + * @static + * @return bool + */ + public static function getIncrementing(){ + return self::$root->getIncrementing(); + } + + /** + * Set whether IDs are incrementing. + * + * @static + * @param bool $value + */ + public static function setIncrementing($value){ + self::$root->setIncrementing($value); + } + + /** + * Convert the model instance to JSON. + * + * @static + * @param int $options + * @return string + */ + public static function toJson($options = '0'){ + return self::$root->toJson($options); + } + + /** + * Convert the model instance to an array. + * + * @static + * @return array + */ + public static function toArray(){ + return self::$root->toArray(); + } + + /** + * Convert the model's attributes to an array. + * + * @static + * @return array + */ + public static function attributesToArray(){ + return self::$root->attributesToArray(); + } + + /** + * Get the model's relationships in array form. + * + * @static + * @return array + */ + public static function relationsToArray(){ + return self::$root->relationsToArray(); + } + + /** + * Get an attribute from the model. + * + * @static + * @param string $key + * @return mixed + */ + public static function getAttribute($key){ + return self::$root->getAttribute($key); + } + + /** + * Determine if a get mutator exists for an attribute. + * + * @static + * @param string $key + * @return bool + */ + public static function hasGetMutator($key){ + return self::$root->hasGetMutator($key); + } + + /** + * Set a given attribute on the model. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function setAttribute($key, $value){ + self::$root->setAttribute($key, $value); + } + + /** + * Determine if a set mutator exists for an attribute. + * + * @static + * @param string $key + * @return bool + */ + public static function hasSetMutator($key){ + return self::$root->hasSetMutator($key); + } + + /** + * Get all of the current attributes on the model. + * + * @static + * @return array + */ + public static function getAttributes(){ + return self::$root->getAttributes(); + } + + /** + * Set the array of model attributes. No checking is done. + * + * @static + * @param array $attributes + * @param bool $sync + */ + public static function setRawAttributes($attributes, $sync = false){ + self::$root->setRawAttributes($attributes, $sync); + } + + /** + * Get the model's original attribute values. + * + * @static + * @param string|null $key + * @param mixed $default + * @return array + */ + public static function getOriginal($key = null, $default = null){ + return self::$root->getOriginal($key, $default); + } + + /** + * Sync the original attributes with the current. + * + * @static + * @return Illuminate\Database\Eloquent\Model + */ + public static function syncOriginal(){ + return self::$root->syncOriginal(); + } + + /** + * Get the attributes that have been changed since last sync. + * + * @static + * @return array + */ + public static function getDirty(){ + return self::$root->getDirty(); + } + + /** + * Get a specified relationship. + * + * @static + * @param string $relation + * @return mixed + */ + public static function getRelation($relation){ + return self::$root->getRelation($relation); + } + + /** + * Set the specific relationship in the model. + * + * @static + * @param string $relation + * @param mixed $value + */ + public static function setRelation($relation, $value){ + self::$root->setRelation($relation, $value); + } + + /** + * Get the database connection for the model. + * + * @static + * @return Illuminate\Database\Connection + */ + public static function getConnection(){ + return self::$root->getConnection(); + } + + /** + * Get the current connection name for the model. + * + * @static + * @return string + */ + public static function getConnectionName(){ + return self::$root->getConnectionName(); + } + + /** + * Set the connection associated with the model. + * + * @static + * @param string $name + */ + public static function setConnection($name){ + self::$root->setConnection($name); + } + + /** + * Resolve a connection instance by name. + * + * @static + * @param string $connection + * @return Illuminate\Database\Connection + */ + public static function resolveConnection($connection){ + return self::$root->resolveConnection($connection); + } + + /** + * Get the connection resolver instance. + * + * @static + * @return Illuminate\Database\ConnectionResolverInterface + */ + public static function getConnectionResolver(){ + return self::$root->getConnectionResolver(); + } + + /** + * Set the connection resolver instance. + * + * @static + * @param Illuminate\Database\ConnectionResolverInterface $resolver + */ + public static function setConnectionResolver($resolver){ + self::$root->setConnectionResolver($resolver); + } + + /** + * Get the event dispatcher instance. + * + * @static + * @return Illuminate\Events\Dispatcher + */ + public static function getEventDispatcher(){ + return self::$root->getEventDispatcher(); + } + + /** + * Set the event dispatcher instance. + * + * @static + * @param Illuminate\Events\Dispatcher + */ + public static function setEventDispatcher($dispatcher){ + self::$root->setEventDispatcher($dispatcher); + } + + /** + * Unset the event dispatcher for models. + * + * @static + */ + public static function unsetEventDispatcher(){ + self::$root->unsetEventDispatcher(); + } + + /** + * Get the mutated attributes for a given instance. + * + * @static + * @return array + */ + public static function getMutatedAttributes(){ + return self::$root->getMutatedAttributes(); + } + + /** + * Dynamically retrieve attributes on the model. + * + * @static + * @param string $key + * @return mixed + */ + public static function __get($key){ + return self::$root->__get($key); + } + + /** + * Dynamically set attributes on the model. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function __set($key, $value){ + self::$root->__set($key, $value); + } + + /** + * Determine if the given attribute exists. + * + * @static + * @param mixed $offset + * @return bool + */ + public static function offsetExists($offset){ + return self::$root->offsetExists($offset); + } + + /** + * Get the value for a given offset. + * + * @static + * @param mixed $offset + * @return mixed + */ + public static function offsetGet($offset){ + return self::$root->offsetGet($offset); + } + + /** + * Set the value for a given offset. + * + * @static + * @param mixed $offset + * @param mixed $value + */ + public static function offsetSet($offset, $value){ + self::$root->offsetSet($offset, $value); + } + + /** + * Unset the value for a given offset. + * + * @static + * @param mixed $offset + */ + public static function offsetUnset($offset){ + self::$root->offsetUnset($offset); + } + + /** + * Determine if an attribute exists on the model. + * + * @static + * @param string $key + */ + public static function __isset($key){ + self::$root->__isset($key); + } + + /** + * Unset an attribute on the model. + * + * @static + * @param string $key + */ + public static function __unset($key){ + self::$root->__unset($key); + } + + /** + * Handle dynamic method calls into the method. + * + * @static + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __call($method, $parameters){ + return self::$root->__call($method, $parameters); + } + + /** + * Handle dynamic static method calls into the method. + * + * @static + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __callStatic($method, $parameters){ + return self::$root->__callStatic($method, $parameters); + } + + /** + * Convert the model to its string representation. + * + * @static + * @return string + */ + public static function __toString(){ + return self::$root->__toString(); + } + + } +} + +namespace { + class Event{ + /** + * @var Illuminate\Events\Dispatcher $root + */ + static private $root; + + /** + * Create a new event dispatcher instance. + * + * @static + * @param Illuminate\Container $container + */ + public static function __construct($container = null){ + self::$root->__construct($container); + } + + /** + * Register an event listener with the dispatcher. + * + * @static + * @param string $event + * @param mixed $listener + * @param int $priority + */ + public static function listen($event, $listener, $priority = '0'){ + self::$root->listen($event, $listener, $priority); + } + + /** + * Determine if a given event has listeners. + * + * @static + * @param string $eventName + * @return bool + */ + public static function hasListeners($eventName){ + return self::$root->hasListeners($eventName); + } + + /** + * Register a queued event and payload. + * + * @static + * @param string $event + * @param array $payload + */ + public static function queue($event, $payload = array()){ + self::$root->queue($event, $payload); + } + + /** + * Register an event subscriber with the dispatcher. + * + * @static + * @param string $subscriber + */ + public static function subscribe($subscriber){ + self::$root->subscribe($subscriber); + } + + /** + * Fire an event until the first non-null response is returned. + * + * @static + * @param string $event + * @param array $payload + * @return mixed + */ + public static function until($event, $payload = array()){ + return self::$root->until($event, $payload); + } + + /** + * Flush a set of queued events. + * + * @static + * @param string $event + */ + public static function flush($event){ + self::$root->flush($event); + } + + /** + * Fire an event and call the listeners. + * + * @static + * @param string $event + * @param mixed $payload + */ + public static function fire($event, $payload = array(), $halt = false){ + self::$root->fire($event, $payload, $halt); + } + + /** + * Get all of the listeners for a given event name. + * + * @static + * @param string $eventName + * @return array + */ + public static function getListeners($eventName){ + return self::$root->getListeners($eventName); + } + + /** + * Register an event listener with the dispatcher. + * + * @static + * @param mixed $listener + */ + public static function makeListener($listener){ + self::$root->makeListener($listener); + } + + /** + * Create a class based listener using the IoC container. + * + * @static + * @param mixed $listener + * @return Closure + */ + public static function createClassListener($listener){ + return self::$root->createClassListener($listener); + } + + } +} + +namespace { + class File{ + /** + * @var Illuminate\Filesystem\Filesystem $root + */ + static private $root; + + /** + * Determine if a file exists. + * + * @static + * @param string $path + * @return bool + */ + public static function exists($path){ + return self::$root->exists($path); + } + + /** + * Get the contents of a file. + * + * @static + * @param string $path + * @return string + */ + public static function get($path){ + return self::$root->get($path); + } + + /** + * Get the contents of a remote file. + * + * @static + * @param string $path + * @return string + */ + public static function getRemote($path){ + return self::$root->getRemote($path); + } + + /** + * Get the returned value of a file. + * + * @static + * @param string $path + * @return mixed + */ + public static function getRequire($path){ + return self::$root->getRequire($path); + } + + /** + * Require the given file once. + * + * @static + * @param string $file + */ + public static function requireOnce($file){ + self::$root->requireOnce($file); + } + + /** + * Write the contents of a file. + * + * @static + * @param string $path + * @param string $contents + * @return int + */ + public static function put($path, $contents){ + return self::$root->put($path, $contents); + } + + /** + * Append to a file. + * + * @static + * @param string $path + * @param string $data + * @return int + */ + public static function append($path, $data){ + return self::$root->append($path, $data); + } + + /** + * Delete the file at a given path. + * + * @static + * @param string $path + * @return bool + */ + public static function delete($path){ + return self::$root->delete($path); + } + + /** + * Move a file to a new location. + * + * @static + * @param string $path + * @param string $target + */ + public static function move($path, $target){ + self::$root->move($path, $target); + } + + /** + * Copy a file to a new location. + * + * @static + * @param string $path + * @param string $target + */ + public static function copy($path, $target){ + self::$root->copy($path, $target); + } + + /** + * Extract the file extension from a file path. + * + * @static + * @param string $path + * @return string + */ + public static function extension($path){ + return self::$root->extension($path); + } + + /** + * Get the file type of a given file. + * + * @static + * @param string $path + * @return string + */ + public static function type($path){ + return self::$root->type($path); + } + + /** + * Get the file size of a given file. + * + * @static + * @param string $path + * @return int + */ + public static function size($path){ + return self::$root->size($path); + } + + /** + * Get the file's last modification time. + * + * @static + * @param string $path + * @return int + */ + public static function lastModified($path){ + return self::$root->lastModified($path); + } + + /** + * Determine if the given path is a directory. + * + * @static + * @param string $directory + * @return bool + */ + public static function isDirectory($directory){ + return self::$root->isDirectory($directory); + } + + /** + * Find path names matching a given pattern. + * + * @static + * @param string $pattern + * @param int $flags + * @return array + */ + public static function glob($pattern, $flags = '0'){ + return self::$root->glob($pattern, $flags); + } + + /** + * Get an array of all files in a directory. + * + * @static + * @param string $directory + * @return array + */ + public static function files($directory){ + return self::$root->files($directory); + } + + /** + * Create a directory. + * + * @static + * @param string $path + * @param int $mode + * @param bool $recursive + * @return bool + */ + public static function makeDirectory($path, $mode = '511', $recursive = false){ + return self::$root->makeDirectory($path, $mode, $recursive); + } + + /** + * Copy a directory from one location to another. + * + * @static + * @param string $directory + * @param string $destination + * @param int $options + */ + public static function copyDirectory($directory, $destination, $options = null){ + self::$root->copyDirectory($directory, $destination, $options); + } + + /** + * Recursively delete a directory. + * The directory itself may be optionally preserved. + * + * @static + * @param string $directory + * @param bool $preserve + */ + public static function deleteDirectory($directory, $preserve = false){ + self::$root->deleteDirectory($directory, $preserve); + } + + /** + * Empty the specified directory of all files and folders. + * + * @static + * @param string $directory + */ + public static function cleanDirectory($directory){ + self::$root->cleanDirectory($directory); + } + + } +} + +namespace { + class Form{ + /** + * @var Illuminate\Html\FormBuilder $root + */ + static private $root; + + /** + * Create a new form builder instance. + * + * @static + * @param Illuminate\Routing\UrlGenerator $url + * @param string $csrfToken + */ + public static function __construct($url, $csrfToken){ + self::$root->__construct($url, $csrfToken); + } + + /** + * Open up a new HTML form. + * + * @static + * @param array $options + * @return string + */ + public static function open($options = array()){ + return self::$root->open($options); + } + + /** + * Create a new model based form builder. + * + * @static + * @param mixed $model + * @param array $options + * @return string + */ + public static function model($model, $options = array()){ + return self::$root->model($model, $options); + } + + /** + * Close the current form. + * + * @static + * @return string + */ + public static function close(){ + return self::$root->close(); + } + + /** + * Generate a hidden field with the current CSRF token. + * + * @static + * @return string + */ + public static function token(){ + return self::$root->token(); + } + + /** + * Create a form label element. + * + * @static + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public static function label($name, $value, $options = array()){ + return self::$root->label($name, $value, $options); + } + + /** + * Create a form input field. + * + * @static + * @param string $type + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public static function input($type, $name, $value = null, $options = array()){ + return self::$root->input($type, $name, $value, $options); + } + + /** + * Create a text input field. + * + * @static + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public static function text($name, $value = null, $options = array()){ + return self::$root->text($name, $value, $options); + } + + /** + * Create a password input field. + * + * @static + * @param string $name + * @param array $options + * @return string + */ + public static function password($name, $options = array()){ + return self::$root->password($name, $options); + } + + /** + * Create a hidden input field. + * + * @static + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public static function hidden($name, $value = null, $options = array()){ + return self::$root->hidden($name, $value, $options); + } + + /** + * Create an e-mail input field. + * + * @static + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public static function email($name, $value = null, $options = array()){ + return self::$root->email($name, $value, $options); + } + + /** + * Create a file input field. + * + * @static + * @param string $name + * @param array $options + * @return string + */ + public static function file($name, $options = array()){ + return self::$root->file($name, $options); + } + + /** + * Create a textarea input field. + * + * @static + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public static function textarea($name, $value = null, $options = array()){ + return self::$root->textarea($name, $value, $options); + } + + /** + * Create a select box field. + * + * @static + * @param string $name + * @param array $list + * @param string $selected + * @param array $options + * @return string + */ + public static function select($name, $list = array(), $selected = null, $options = array()){ + return self::$root->select($name, $list, $selected, $options); + } + + /** + * Create a checkbox input field. + * + * @static + * @param string $name + * @param mixed $value + * @param bool $checked + * @param array $options + * @return string + */ + public static function checkbox($name, $value = '1', $checked = null, $options = array()){ + return self::$root->checkbox($name, $value, $checked, $options); + } + + /** + * Create a radio button input field. + * + * @static + * @param string $name + * @param mixed $value + * @param bool $checked + * @param array $options + * @return string + */ + public static function radio($name, $value = null, $checked = null, $options = array()){ + return self::$root->radio($name, $value, $checked, $options); + } + + /** + * Create a submit button element. + * + * @static + * @param string $value + * @param array $options + * @return string + */ + public static function submit($value = null, $options = array()){ + return self::$root->submit($value, $options); + } + + /** + * Create a button element. + * + * @static + * @param string $value + * @param array $options + * @return string + */ + public static function button($value = null, $options = array()){ + return self::$root->button($value, $options); + } + + /** + * Register a custom form macro. + * + * @static + * @param string $name + * @param callable $macro + */ + public static function macro($name, $macro){ + self::$root->macro($name, $macro); + } + + /** + * Get the session store implementation. + * + * @static + * @param Illuminate\Session\Store $session + */ + public static function getSessionStore(){ + self::$root->getSessionStore(); + } + + /** + * Set the session store implementation. + * + * @static + * @param Illuminate\Session\Store $session + */ + public static function setSessionStore($session){ + self::$root->setSessionStore($session); + } + + /** + * Dynamically handle calls to the form builder. + * + * @static + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __call($method, $parameters){ + return self::$root->__call($method, $parameters); + } + + } +} + +namespace { + class Hash{ + /** + * @var Illuminate\Hashing\BcryptHasher $root + */ + static private $root; + + /** + * Hash the given value. + * + * @static + * @param string $value + * @return string + */ + public static function make($value, $options = array()){ + return self::$root->make($value, $options); + } + + /** + * Check the given plain value against a hash. + * + * @static + * @param string $value + * @param string $hashedValue + * @param array $options + * @return bool + */ + public static function check($value, $hashedValue, $options = array()){ + return self::$root->check($value, $hashedValue, $options); + } + + } +} + +namespace { + class Html{ + /** + * @var Illuminate\Html\HtmlBuilder $root + */ + static private $root; + + /** + * Convert an HTML string to entities. + * + * @static + * @param string $value + * @return string + */ + public static function entities($value){ + return self::$root->entities($value); + } + + /** + * Convert entities to HTML characters. + * + * @static + * @param string $value + * @return string + */ + public static function decode($value){ + return self::$root->decode($value); + } + + /** + * Generate an ordered list of items. + * + * @static + * @param array $list + * @param array $attributes + * @return string + */ + public static function ol($list, $attributes = array()){ + return self::$root->ol($list, $attributes); + } + + /** + * Generate an un-ordered list of items. + * + * @static + * @param array $list + * @param array $attributes + * @return string + */ + public static function ul($list, $attributes = array()){ + return self::$root->ul($list, $attributes); + } + + /** + * Build an HTML attribute string from an array. + * + * @static + * @param array $attributes + * @return string + */ + public static function attributes($attributes){ + return self::$root->attributes($attributes); + } + + } +} + +namespace { + class Input{ + /** + * @var Illuminate\Http\Request $root + */ + static private $root; /** * Return the Request instance. @@ -5844,7 +4301,7 @@ namespace { * @return Illuminate\Http\Request */ public static function instance(){ - return self::$realClass->instance(); + return self::$root->instance(); } /** @@ -5854,7 +4311,7 @@ namespace { * @return string */ public static function root(){ - return self::$realClass->root(); + return self::$root->root(); } /** @@ -5864,7 +4321,7 @@ namespace { * @return string */ public static function url(){ - return self::$realClass->url(); + return self::$root->url(); } /** @@ -5874,7 +4331,7 @@ namespace { * @return string */ public static function fullUrl(){ - return self::$realClass->fullUrl(); + return self::$root->fullUrl(); } /** @@ -5884,7 +4341,7 @@ namespace { * @return string */ public static function path(){ - return self::$realClass->path(); + return self::$root->path(); } /** @@ -5896,7 +4353,7 @@ namespace { * @return string */ public static function segment($index, $default = null){ - return self::$realClass->segment($index, $default); + return self::$root->segment($index, $default); } /** @@ -5906,7 +4363,7 @@ namespace { * @return array */ public static function segments(){ - return self::$realClass->segments(); + return self::$root->segments(); } /** @@ -5917,7 +4374,7 @@ namespace { * @return bool */ public static function is($pattern){ - return self::$realClass->is($pattern); + return self::$root->is($pattern); } /** @@ -5927,7 +4384,7 @@ namespace { * @return bool */ public static function ajax(){ - return self::$realClass->ajax(); + return self::$root->ajax(); } /** @@ -5937,7 +4394,7 @@ namespace { * @return bool */ public static function secure(){ - return self::$realClass->secure(); + return self::$root->secure(); } /** @@ -5948,7 +4405,7 @@ namespace { * @return bool */ public static function has($key){ - return self::$realClass->has($key); + return self::$root->has($key); } /** @@ -5958,7 +4415,7 @@ namespace { * @return array */ public static function all(){ - return self::$realClass->all(); + return self::$root->all(); } /** @@ -5970,7 +4427,7 @@ namespace { * @return string */ public static function input($key = null, $default = null){ - return self::$realClass->input($key, $default); + return self::$root->input($key, $default); } /** @@ -5981,7 +4438,7 @@ namespace { * @return array */ public static function only($keys){ - return self::$realClass->only($keys); + return self::$root->only($keys); } /** @@ -5992,7 +4449,7 @@ namespace { * @return array */ public static function except($keys){ - return self::$realClass->except($keys); + return self::$root->except($keys); } /** @@ -6004,7 +4461,7 @@ namespace { * @return string */ public static function query($key = null, $default = null){ - return self::$realClass->query($key, $default); + return self::$root->query($key, $default); } /** @@ -6016,7 +4473,7 @@ namespace { * @return string */ public static function cookie($key = null, $default = null){ - return self::$realClass->cookie($key, $default); + return self::$root->cookie($key, $default); } /** @@ -6028,7 +4485,7 @@ namespace { * @return Symfony\Component\HttpFoundation\File\UploadedFile */ public static function file($key = null, $default = null){ - return self::$realClass->file($key, $default); + return self::$root->file($key, $default); } /** @@ -6039,7 +4496,7 @@ namespace { * @return bool */ public static function hasFile($key){ - return self::$realClass->hasFile($key); + return self::$root->hasFile($key); } /** @@ -6051,7 +4508,7 @@ namespace { * @return string */ public static function header($key = null, $default = null){ - return self::$realClass->header($key, $default); + return self::$root->header($key, $default); } /** @@ -6063,7 +4520,7 @@ namespace { * @return string */ public static function server($key = null, $default = null){ - return self::$realClass->server($key, $default); + return self::$root->server($key, $default); } /** @@ -6075,7 +4532,7 @@ namespace { * @return string */ public static function old($key = null, $default = null){ - return self::$realClass->old($key, $default); + return self::$root->old($key, $default); } /** @@ -6086,7 +4543,7 @@ namespace { * @param array $keys */ public static function flash($filter = null, $keys = array()){ - self::$realClass->flash($filter, $keys); + self::$root->flash($filter, $keys); } /** @@ -6096,7 +4553,7 @@ namespace { * @param dynamic string */ public static function flashOnly($keys){ - self::$realClass->flashOnly($keys); + self::$root->flashOnly($keys); } /** @@ -6106,7 +4563,7 @@ namespace { * @param dynamic string */ public static function flashExcept($keys){ - self::$realClass->flashExcept($keys); + self::$root->flashExcept($keys); } /** @@ -6115,7 +4572,7 @@ namespace { * @static */ public static function flush(){ - self::$realClass->flush(); + self::$root->flush(); } /** @@ -6125,7 +4582,7 @@ namespace { * @param array $input */ public static function merge($input){ - self::$realClass->merge($input); + self::$root->merge($input); } /** @@ -6135,7 +4592,7 @@ namespace { * @param array $input */ public static function replace($input){ - self::$realClass->replace($input); + self::$root->replace($input); } /** @@ -6147,7 +4604,7 @@ namespace { * @return mixed */ public static function json($key = null, $default = null){ - return self::$realClass->json($key, $default); + return self::$root->json($key, $default); } /** @@ -6157,7 +4614,7 @@ namespace { * @return Illuminate\Session\Store */ public static function getSessionStore(){ - return self::$realClass->getSessionStore(); + return self::$root->getSessionStore(); } /** @@ -6167,7 +4624,7 @@ namespace { * @param Illuminate\Session\Store $session */ public static function setSessionStore($session){ - self::$realClass->setSessionStore($session); + self::$root->setSessionStore($session); } /** @@ -6177,7 +4634,7 @@ namespace { * @return bool */ public static function hasSessionStore(){ - return self::$realClass->hasSessionStore(); + return self::$root->hasSessionStore(); } /** @@ -6193,7 +4650,7 @@ namespace { * @param string $content The raw body data */ public static function __construct($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - self::$realClass->__construct($query, $request, $attributes, $cookies, $files, $server, $content); + self::$root->__construct($query, $request, $attributes, $cookies, $files, $server, $content); } /** @@ -6210,7 +4667,7 @@ namespace { * @param string $content The raw body data */ public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - self::$realClass->initialize($query, $request, $attributes, $cookies, $files, $server, $content); + self::$root->initialize($query, $request, $attributes, $cookies, $files, $server, $content); } /** @@ -6220,7 +4677,7 @@ namespace { * @return Request A new request */ public static function createFromGlobals(){ - return self::$realClass->createFromGlobals(); + return self::$root->createFromGlobals(); } /** @@ -6239,7 +4696,7 @@ namespace { * @return Request A Request instance */ public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - return self::$realClass->create($uri, $method, $parameters, $cookies, $files, $server, $content); + return self::$root->create($uri, $method, $parameters, $cookies, $files, $server, $content); } /** @@ -6255,7 +4712,7 @@ namespace { * @return Request The duplicated request */ public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){ - return self::$realClass->duplicate($query, $request, $attributes, $cookies, $files, $server); + return self::$root->duplicate($query, $request, $attributes, $cookies, $files, $server); } /** @@ -6266,7 +4723,7 @@ namespace { * @static */ public static function __clone(){ - self::$realClass->__clone(); + self::$root->__clone(); } /** @@ -6276,7 +4733,7 @@ namespace { * @return string The request */ public static function __toString(){ - return self::$realClass->__toString(); + return self::$root->__toString(); } /** @@ -6287,7 +4744,7 @@ namespace { * @static */ public static function overrideGlobals(){ - self::$realClass->overrideGlobals(); + self::$root->overrideGlobals(); } /** @@ -6296,7 +4753,7 @@ namespace { * @static */ public static function trustProxyData(){ - self::$realClass->trustProxyData(); + self::$root->trustProxyData(); } /** @@ -6307,7 +4764,7 @@ namespace { * @param array $proxies A list of trusted proxies */ public static function setTrustedProxies($proxies){ - self::$realClass->setTrustedProxies($proxies); + self::$root->setTrustedProxies($proxies); } /** @@ -6317,7 +4774,7 @@ namespace { * @return array An array of trusted proxies. */ public static function getTrustedProxies(){ - return self::$realClass->getTrustedProxies(); + return self::$root->getTrustedProxies(); } /** @@ -6334,7 +4791,7 @@ namespace { * @param string $value The header name */ public static function setTrustedHeaderName($key, $value){ - self::$realClass->setTrustedHeaderName($key, $value); + self::$root->setTrustedHeaderName($key, $value); } /** @@ -6345,7 +4802,7 @@ namespace { * @return boolean */ public static function isProxyTrusted(){ - return self::$realClass->isProxyTrusted(); + return self::$root->isProxyTrusted(); } /** @@ -6358,7 +4815,7 @@ namespace { * @return string A normalized query string for the Request */ public static function normalizeQueryString($qs){ - return self::$realClass->normalizeQueryString($qs); + return self::$root->normalizeQueryString($qs); } /** @@ -6370,7 +4827,7 @@ namespace { * @static */ public static function enableHttpMethodParameterOverride(){ - self::$realClass->enableHttpMethodParameterOverride(); + self::$root->enableHttpMethodParameterOverride(); } /** @@ -6380,7 +4837,7 @@ namespace { * @return Boolean True when the _method request parameter is enabled, false otherwise */ public static function getHttpMethodParameterOverride(){ - return self::$realClass->getHttpMethodParameterOverride(); + return self::$root->getHttpMethodParameterOverride(); } /** @@ -6400,7 +4857,7 @@ namespace { * @return mixed */ public static function get($key, $default = null, $deep = false){ - return self::$realClass->get($key, $default, $deep); + return self::$root->get($key, $default, $deep); } /** @@ -6410,7 +4867,7 @@ namespace { * @return SessionInterface|null The session */ public static function getSession(){ - return self::$realClass->getSession(); + return self::$root->getSession(); } /** @@ -6421,7 +4878,7 @@ namespace { * @return Boolean */ public static function hasPreviousSession(){ - return self::$realClass->hasPreviousSession(); + return self::$root->hasPreviousSession(); } /** @@ -6434,7 +4891,7 @@ namespace { * @return Boolean true when the Request contains a Session object, false otherwise */ public static function hasSession(){ - return self::$realClass->hasSession(); + return self::$root->hasSession(); } /** @@ -6444,7 +4901,7 @@ namespace { * @param SessionInterface $session The Session */ public static function setSession($session){ - self::$realClass->setSession($session); + self::$root->setSession($session); } /** @@ -6462,7 +4919,7 @@ namespace { * @return string The client IP address */ public static function getClientIp(){ - return self::$realClass->getClientIp(); + return self::$root->getClientIp(); } /** @@ -6472,7 +4929,7 @@ namespace { * @return string */ public static function getScriptName(){ - return self::$realClass->getScriptName(); + return self::$root->getScriptName(); } /** @@ -6488,7 +4945,7 @@ namespace { * @return string The raw path (i.e. not urldecoded) */ public static function getPathInfo(){ - return self::$realClass->getPathInfo(); + return self::$root->getPathInfo(); } /** @@ -6503,7 +4960,7 @@ namespace { * @return string The raw path (i.e. not urldecoded) */ public static function getBasePath(){ - return self::$realClass->getBasePath(); + return self::$root->getBasePath(); } /** @@ -6516,7 +4973,7 @@ namespace { * @return string The raw url (i.e. not urldecoded) */ public static function getBaseUrl(){ - return self::$realClass->getBaseUrl(); + return self::$root->getBaseUrl(); } /** @@ -6526,7 +4983,7 @@ namespace { * @return string */ public static function getScheme(){ - return self::$realClass->getScheme(); + return self::$root->getScheme(); } /** @@ -6541,7 +4998,7 @@ namespace { * @return string */ public static function getPort(){ - return self::$realClass->getPort(); + return self::$root->getPort(); } /** @@ -6551,7 +5008,7 @@ namespace { * @return string|null */ public static function getUser(){ - return self::$realClass->getUser(); + return self::$root->getUser(); } /** @@ -6561,7 +5018,7 @@ namespace { * @return string|null */ public static function getPassword(){ - return self::$realClass->getPassword(); + return self::$root->getPassword(); } /** @@ -6571,7 +5028,7 @@ namespace { * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server */ public static function getUserInfo(){ - return self::$realClass->getUserInfo(); + return self::$root->getUserInfo(); } /** @@ -6582,7 +5039,7 @@ namespace { * @return string */ public static function getHttpHost(){ - return self::$realClass->getHttpHost(); + return self::$root->getHttpHost(); } /** @@ -6592,7 +5049,7 @@ namespace { * @return string The raw URI (i.e. not urldecoded) */ public static function getRequestUri(){ - return self::$realClass->getRequestUri(); + return self::$root->getRequestUri(); } /** @@ -6604,7 +5061,7 @@ namespace { * @return string The scheme and HTTP host */ public static function getSchemeAndHttpHost(){ - return self::$realClass->getSchemeAndHttpHost(); + return self::$root->getSchemeAndHttpHost(); } /** @@ -6614,7 +5071,7 @@ namespace { * @return string A normalized URI for the Request */ public static function getUri(){ - return self::$realClass->getUri(); + return self::$root->getUri(); } /** @@ -6625,7 +5082,7 @@ namespace { * @return string The normalized URI for the path */ public static function getUriForPath($path){ - return self::$realClass->getUriForPath($path); + return self::$root->getUriForPath($path); } /** @@ -6637,7 +5094,7 @@ namespace { * @return string|null A normalized query string for the Request */ public static function getQueryString(){ - return self::$realClass->getQueryString(); + return self::$root->getQueryString(); } /** @@ -6653,7 +5110,7 @@ namespace { * @return Boolean */ public static function isSecure(){ - return self::$realClass->isSecure(); + return self::$root->isSecure(); } /** @@ -6668,7 +5125,7 @@ namespace { * @return string */ public static function getHost(){ - return self::$realClass->getHost(); + return self::$root->getHost(); } /** @@ -6678,7 +5135,7 @@ namespace { * @param string $method */ public static function setMethod($method){ - self::$realClass->setMethod($method); + self::$root->setMethod($method); } /** @@ -6693,7 +5150,7 @@ namespace { * @return string The request method */ public static function getMethod(){ - return self::$realClass->getMethod(); + return self::$root->getMethod(); } /** @@ -6703,7 +5160,7 @@ namespace { * @return string The request method */ public static function getRealMethod(){ - return self::$realClass->getRealMethod(); + return self::$root->getRealMethod(); } /** @@ -6714,7 +5171,7 @@ namespace { * @return string The associated mime type (null if not found) */ public static function getMimeType($format){ - return self::$realClass->getMimeType($format); + return self::$root->getMimeType($format); } /** @@ -6725,7 +5182,7 @@ namespace { * @return string|null The format (null if not found) */ public static function getFormat($mimeType){ - return self::$realClass->getFormat($mimeType); + return self::$root->getFormat($mimeType); } /** @@ -6736,7 +5193,7 @@ namespace { * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) */ public static function setFormat($format, $mimeTypes){ - self::$realClass->setFormat($format, $mimeTypes); + self::$root->setFormat($format, $mimeTypes); } /** @@ -6751,7 +5208,7 @@ namespace { * @return string The request format */ public static function getRequestFormat($default = 'html'){ - return self::$realClass->getRequestFormat($default); + return self::$root->getRequestFormat($default); } /** @@ -6761,7 +5218,7 @@ namespace { * @param string $format The request format. */ public static function setRequestFormat($format){ - self::$realClass->setRequestFormat($format); + self::$root->setRequestFormat($format); } /** @@ -6771,7 +5228,7 @@ namespace { * @return string|null The format (null if no content type is present) */ public static function getContentType(){ - return self::$realClass->getContentType(); + return self::$root->getContentType(); } /** @@ -6781,7 +5238,7 @@ namespace { * @param string $locale */ public static function setDefaultLocale($locale){ - self::$realClass->setDefaultLocale($locale); + self::$root->setDefaultLocale($locale); } /** @@ -6791,7 +5248,7 @@ namespace { * @param string $locale */ public static function setLocale($locale){ - self::$realClass->setLocale($locale); + self::$root->setLocale($locale); } /** @@ -6801,7 +5258,7 @@ namespace { * @return string */ public static function getLocale(){ - return self::$realClass->getLocale(); + return self::$root->getLocale(); } /** @@ -6812,7 +5269,7 @@ namespace { * @return Boolean */ public static function isMethod($method){ - return self::$realClass->isMethod($method); + return self::$root->isMethod($method); } /** @@ -6822,7 +5279,7 @@ namespace { * @return Boolean */ public static function isMethodSafe(){ - return self::$realClass->isMethodSafe(); + return self::$root->isMethodSafe(); } /** @@ -6833,7 +5290,7 @@ namespace { * @return string|resource The request body content or a resource to read the body stream. */ public static function getContent($asResource = false){ - return self::$realClass->getContent($asResource); + return self::$root->getContent($asResource); } /** @@ -6843,7 +5300,7 @@ namespace { * @return array The entity tags */ public static function getETags(){ - return self::$realClass->getETags(); + return self::$root->getETags(); } /** @@ -6853,7 +5310,7 @@ namespace { * @return Boolean */ public static function isNoCache(){ - return self::$realClass->isNoCache(); + return self::$root->isNoCache(); } /** @@ -6864,7 +5321,7 @@ namespace { * @return string|null The preferred locale */ public static function getPreferredLanguage($locales = null){ - return self::$realClass->getPreferredLanguage($locales); + return self::$root->getPreferredLanguage($locales); } /** @@ -6874,7 +5331,7 @@ namespace { * @return array Languages ordered in the user browser preferences */ public static function getLanguages(){ - return self::$realClass->getLanguages(); + return self::$root->getLanguages(); } /** @@ -6884,7 +5341,7 @@ namespace { * @return array List of charsets in preferable order */ public static function getCharsets(){ - return self::$realClass->getCharsets(); + return self::$root->getCharsets(); } /** @@ -6894,7 +5351,7 @@ namespace { * @return array List of content types in preferable order */ public static function getAcceptableContentTypes(){ - return self::$realClass->getAcceptableContentTypes(); + return self::$root->getAcceptableContentTypes(); } /** @@ -6906,7 +5363,7 @@ namespace { * @return Boolean true if the request is an XMLHttpRequest, false otherwise */ public static function isXmlHttpRequest(){ - return self::$realClass->isXmlHttpRequest(); + return self::$root->isXmlHttpRequest(); } /** @@ -6917,7 +5374,1865 @@ namespace { * @return array Array indexed by the values of the Accept-* header in preferred order */ public static function splitHttpAcceptHeader($header){ - return self::$realClass->splitHttpAcceptHeader($header); + return self::$root->splitHttpAcceptHeader($header); + } + + } +} + +namespace { + class Lang{ + /** + * @var Illuminate\Translation\Translator $root + */ + static private $root; + + /** + * Create a new translator instance. + * + * @static + * @param Illuminate\Translation\LoaderInterface $loader + * @param string $locale + */ + public static function __construct($loader, $locale){ + self::$root->__construct($loader, $locale); + } + + /** + * Determine if a translation exists. + * + * @static + * @param string $key + * @param string $locale + * @return bool + */ + public static function has($key, $locale = null){ + return self::$root->has($key, $locale); + } + + /** + * Get the translation for the given key. + * + * @static + * @param string $key + * @param array $replace + * @param string $locale + * @return string + */ + public static function get($key, $replace = array(), $locale = null){ + return self::$root->get($key, $replace, $locale); + } + + /** + * Get a translation according to an integer value. + * + * @static + * @param string $id + * @param int $number + * @param array $replace + * @param string $locale + * @return string + */ + public static function choice($key, $number, $replace = array(), $locale = null){ + return self::$root->choice($key, $number, $replace, $locale); + } + + /** + * Get the translation for a given key. + * + * @static + * @param string $id + * @param array $parameters + * @param string $domain + * @param string $locale + * @return string + */ + public static function trans($id, $parameters = array(), $domain = 'messages', $locale = null){ + return self::$root->trans($id, $parameters, $domain, $locale); + } + + /** + * Get a translation according to an integer value. + * + * @static + * @param string $id + * @param int $number + * @param array $parameters + * @param string $domain + * @param string $locale + * @return string + */ + public static function transChoice($id, $number, $parameters = array(), $domain = 'messages', $locale = null){ + return self::$root->transChoice($id, $number, $parameters, $domain, $locale); + } + + /** + * Load the specified language group. + * + * @static + * @param string $namespace + * @param string $group + * @param string $locale + * @return string + */ + public static function load($namespace, $group, $locale){ + return self::$root->load($namespace, $group, $locale); + } + + /** + * Add a new namespace to the loader. + * + * @static + * @param string $namespace + * @param string $hint + */ + public static function addNamespace($namespace, $hint){ + self::$root->addNamespace($namespace, $hint); + } + + /** + * Parse a key into namespace, group, and item. + * + * @static + * @param string $key + * @return array + */ + public static function parseKey($key){ + return self::$root->parseKey($key); + } + + /** + * Get the message selector instance. + * + * @static + * @return Symfony\Component\Translation\MessageSelector + */ + public static function getSelector(){ + return self::$root->getSelector(); + } + + /** + * Set the message selector instance. + * + * @static + * @param Symfony\Component\Translation\MessageSelector $selector + */ + public static function setSelector($selector){ + self::$root->setSelector($selector); + } + + /** + * Get the language line loader implementation. + * + * @static + * @return Illuminate\Translation\LoaderInterface + */ + public static function getLoader(){ + return self::$root->getLoader(); + } + + /** + * Get the default locale being used. + * + * @static + * @return string + */ + public static function getLocale(){ + return self::$root->getLocale(); + } + + /** + * Set the default locale. + * + * @static + * @param string $locale + */ + public static function setLocale($locale){ + self::$root->setLocale($locale); + } + + /** + * Set the parsed value of a key. + * + * @static + * @param string $key + * @param array $parsed + */ + public static function setParsedKey($key, $parsed){ + self::$root->setParsedKey($key, $parsed); + } + + } +} + +namespace { + class Log{ + /** + * @var Illuminate\Log\Writer $root + */ + static private $root; + + /** + * Create a new log writer instance. + * + * @static + * @param Monolog\Logger $monolog + * @param Illuminate\Events\Dispatcher $dispatcher + */ + public static function __construct($monolog, $dispatcher = null){ + self::$root->__construct($monolog, $dispatcher); + } + + /** + * Register a file log handler. + * + * @static + * @param string $path + * @param string $level + */ + public static function useFiles($path, $level = 'debug'){ + self::$root->useFiles($path, $level); + } + + /** + * Register a daily file log handler. + * + * @static + * @param string $path + * @param int $days + * @param string $level + */ + public static function useDailyFiles($path, $days = '0', $level = 'debug'){ + self::$root->useDailyFiles($path, $days, $level); + } + + /** + * Get the underlying Monolog instance. + * + * @static + * @return Monolog\Logger + */ + public static function getMonolog(){ + return self::$root->getMonolog(); + } + + /** + * Register a new callback handler for when + * a log event is triggered. + * + * @static + * @param Closure $callback + */ + public static function listen($callback){ + self::$root->listen($callback); + } + + /** + * Get the event dispatcher instance. + * + * @static + * @return Illuminate\Events\Dispatcher + */ + public static function getEventDispatcher(){ + return self::$root->getEventDispatcher(); + } + + /** + * Set the event dispatcher instance. + * + * @static + * @param Illuminate\Events\Dispatcher + */ + public static function setEventDispatcher($dispatcher){ + self::$root->setEventDispatcher($dispatcher); + } + + /** + * Dynamically handle error additions. + * + * @static + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __call($method, $parameters){ + return self::$root->__call($method, $parameters); + } + + } +} + +namespace { + class Mail{ + /** + * @var Illuminate\Mail\Mailer $root + */ + static private $root; + + /** + * Create a new Mailer instance. + * + * @static + * @param Illuminate\View\Environment $views + * @param Swift_Mailer $swift + */ + public static function __construct($views, $swift){ + self::$root->__construct($views, $swift); + } + + /** + * Set the global from address and name. + * + * @static + * @param string $address + * @param string $name + */ + public static function alwaysFrom($address, $name = null){ + self::$root->alwaysFrom($address, $name); + } + + /** + * Send a new message when only a plain part. + * + * @static + * @param string $view + * @param array $data + * @param mixed $callback + */ + public static function plain($view, $data, $callback){ + self::$root->plain($view, $data, $callback); + } + + /** + * Send a new message using a view. + * + * @static + * @param string|array $view + * @param array $data + * @param Closure|string $callback + */ + public static function send($view, $data, $callback){ + self::$root->send($view, $data, $callback); + } + + /** + * Tell the mailer to not really send messages. + * + * @static + * @param bool $value + */ + public static function pretend($value = true){ + self::$root->pretend($value); + } + + /** + * Get the view environment instance. + * + * @static + * @return Illuminate\View\Environment + */ + public static function getViewEnvironment(){ + return self::$root->getViewEnvironment(); + } + + /** + * Get the Swift Mailer instance. + * + * @static + * @return Swift_Mailer + */ + public static function getSwiftMailer(){ + return self::$root->getSwiftMailer(); + } + + /** + * Set the Swift Mailer instance. + * + * @static + * @param Swift_Mailer $swift + */ + public static function setSwiftMailer($swift){ + self::$root->setSwiftMailer($swift); + } + + /** + * Set the log writer instance. + * + * @static + * @param Illuminate\Log\Writer $logger + */ + public static function setLogger($logger){ + self::$root->setLogger($logger); + } + + /** + * Set the IoC container instance. + * + * @static + * @param Illuminate\Container $container + */ + public static function setContainer($container){ + self::$root->setContainer($container); + } + + } +} + +namespace { + class Paginator{ + /** + * @var Illuminate\Pagination\Environment $root + */ + static private $root; + + /** + * Create a new pagination environment. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @param Illuminate\View\Environment $view + * @param Illuminate\Translation\TranslatorInterface $trans + */ + public static function __construct($request, $view, $trans){ + self::$root->__construct($request, $view, $trans); + } + + /** + * Get a new paginator instance. + * + * @static + * @param array $items + * @param int $perPage + * @param int $total + * @return Illuminate\Pagination\Paginator + */ + public static function make($items, $total, $perPage){ + return self::$root->make($items, $total, $perPage); + } + + /** + * Get the pagination view. + * + * @static + * @param Illuminate\Pagination\Paginator $paginator + * @return Illuminate\View\View + */ + public static function getPaginationView($paginator){ + return self::$root->getPaginationView($paginator); + } + + /** + * Get the number of the current page. + * + * @static + * @return int + */ + public static function getCurrentPage(){ + return self::$root->getCurrentPage(); + } + + /** + * Set the number of the current page. + * + * @static + * @param int $number + */ + public static function setCurrentPage($number){ + self::$root->setCurrentPage($number); + } + + /** + * Get the root URL for the request. + * + * @static + * @return string + */ + public static function getCurrentUrl(){ + return self::$root->getCurrentUrl(); + } + + /** + * Set the base URL in use by the paginator. + * + * @static + * @param string $baseUrl + */ + public static function setBaseUrl($baseUrl){ + self::$root->setBaseUrl($baseUrl); + } + + /** + * Get the name of the pagination view. + * + * @static + * @return string + */ + public static function getViewName(){ + return self::$root->getViewName(); + } + + /** + * Set the name of the pagination view. + * + * @static + * @param string $viewName + */ + public static function setViewName($viewName){ + self::$root->setViewName($viewName); + } + + /** + * Get the locale of the paginator. + * + * @static + * @return string + */ + public static function getLocale(){ + return self::$root->getLocale(); + } + + /** + * Set the locale of the paginator. + * + * @static + * @param string $locale + */ + public static function setLocale($locale){ + self::$root->setLocale($locale); + } + + /** + * Get the active request instance. + * + * @static + * @return Symfony\Component\HttpFoundation\Request + */ + public static function getRequest(){ + return self::$root->getRequest(); + } + + /** + * Set the active request instance. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + */ + public static function setRequest($request){ + self::$root->setRequest($request); + } + + /** + * Get the current view driver. + * + * @static + * @return Illuminate\View\Environment + */ + public static function getViewDriver(){ + return self::$root->getViewDriver(); + } + + /** + * Set the current view driver. + * + * @static + * @param Illuminate\View\Environment $view + */ + public static function setViewDriver($view){ + self::$root->setViewDriver($view); + } + + /** + * Get the translator instance. + * + * @static + * @return Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator(){ + return self::$root->getTranslator(); + } + + } +} + +namespace { + class Password{ + /** + * @var Illuminate\Auth\Reminders\PasswordBroker $root + */ + static private $root; + + /** + * Create a new password broker instance. + * + * @static + * @param Illuminate\Auth\ReminderRepositoryInterface $reminders + * @param Illuminate\Auth\UserProviderInterface $users + * @param Illuminate\Routing\Redirector $redirector + * @param Illuminate\Mail\Mailer $mailer + * @param string $reminderView + */ + public static function __construct($reminders, $users, $redirect, $mailer, $reminderView){ + self::$root->__construct($reminders, $users, $redirect, $mailer, $reminderView); + } + + /** + * Send a password reminder to a user. + * + * @static + * @param array $credentials + * @param Closure $callback + * @return Illuminate\Http\RedirectResponse + */ + public static function remind($credentials, $callback = null){ + return self::$root->remind($credentials, $callback); + } + + /** + * Send the password reminder e-mail. + * + * @static + * @param Illuminate\Auth\RemindableInterface $user + * @param string $token + * @param Closure $callback + */ + public static function sendReminder($user, $token, $callback = null){ + self::$root->sendReminder($user, $token, $callback); + } + + /** + * Reset the password for the given token. + * + * @static + * @param string $token + * @param string $newPassword + * @param Closure $callback + * @return mixed + */ + public static function reset($credentials, $callback){ + return self::$root->reset($credentials, $callback); + } + + /** + * Get the user for the given credentials. + * + * @static + * @param array $credentials + * @return Illuminate\Auth\RemindableInterface + */ + public static function getUser($credentials){ + return self::$root->getUser($credentials); + } + + } +} + +namespace { + class Redirect{ + /** + * @var Illuminate\Routing\Redirector $root + */ + static private $root; + + /** + * Create a new Redirector instance. + * + * @static + * @param Illuminate\Routing\UrlGenerator $generator + */ + public static function __construct($generator){ + self::$root->__construct($generator); + } + + /** + * Create a new redirect response to the previous location. + * + * @static + * @param int $status + * @param array $headers + * @return Illuminate\Http\RedirectResponse + */ + public static function back($status = '302', $headers = array()){ + return self::$root->back($status, $headers); + } + + /** + * Create a new redirect response to the current URI. + * + * @static + * @param int $status + * @param array $headers + * @return Illuminate\Http\RedirectResponse + */ + public static function refresh($status = '302', $headers = array()){ + return self::$root->refresh($status, $headers); + } + + /** + * Create a new redirect response to the given path. + * + * @static + * @param string $path + * @param int $status + * @param array $headers + * @param bool $secure + * @return Illuminate\Http\RedirectResponse + */ + public static function to($path, $status = '302', $headers = array(), $secure = null){ + return self::$root->to($path, $status, $headers, $secure); + } + + /** + * Create a new redirect response to the given HTTPS path. + * + * @static + * @param string $path + * @param int $status + * @param array $headers + * @return Illuminate\Http\RedirectResponse + */ + public static function secure($path, $status = '302', $headers = array()){ + return self::$root->secure($path, $status, $headers); + } + + /** + * Create a new redirect response to a named route. + * + * @static + * @param string $route + * @param array $parameters + * @param int $status + * @param array $headers + * @return Illuminate\Http\RedirectResponse + */ + public static function route($route, $parameters = array(), $status = '302', $headers = array()){ + return self::$root->route($route, $parameters, $status, $headers); + } + + /** + * Create a new redirect response to a controller action. + * + * @static + * @param string $action + * @param array $parameters + * @param int $status + * @param array $headers + * @return Illuminate\Http\RedirectResponse + */ + public static function action($action, $parameters = array(), $status = '302', $headers = array()){ + return self::$root->action($action, $parameters, $status, $headers); + } + + /** + * Get the URL generator instance. + * + * @static + * @return Illuminate\Routing\UrlGenerator + */ + public static function getUrlGenerator(){ + return self::$root->getUrlGenerator(); + } + + /** + * Set the active session store. + * + * @static + * @param Illuminate\Session\Store $session + */ + public static function setSession($session){ + self::$root->setSession($session); + } + + } +} + +namespace { + class Request{ + /** + * @var Illuminate\Http\Request $root + */ + static private $root; + + /** + * Return the Request instance. + * + * @static + * @return Illuminate\Http\Request + */ + public static function instance(){ + return self::$root->instance(); + } + + /** + * Get the root URL for the application. + * + * @static + * @return string + */ + public static function root(){ + return self::$root->root(); + } + + /** + * Get the URL (no query string) for the request. + * + * @static + * @return string + */ + public static function url(){ + return self::$root->url(); + } + + /** + * Get the full URL for the request. + * + * @static + * @return string + */ + public static function fullUrl(){ + return self::$root->fullUrl(); + } + + /** + * Get the current path info for the request. + * + * @static + * @return string + */ + public static function path(){ + return self::$root->path(); + } + + /** + * Get a segment from the URI (1 based index). + * + * @static + * @param string $index + * @param mixed $default + * @return string + */ + public static function segment($index, $default = null){ + return self::$root->segment($index, $default); + } + + /** + * Get all of the segments for the request path. + * + * @static + * @return array + */ + public static function segments(){ + return self::$root->segments(); + } + + /** + * Determine if the current request URI matches a pattern. + * + * @static + * @param string $pattern + * @return bool + */ + public static function is($pattern){ + return self::$root->is($pattern); + } + + /** + * Determine if the request is the result of an AJAX call. + * + * @static + * @return bool + */ + public static function ajax(){ + return self::$root->ajax(); + } + + /** + * Determine if the request is over HTTPS. + * + * @static + * @return bool + */ + public static function secure(){ + return self::$root->secure(); + } + + /** + * Determine if the request contains a given input item. + * + * @static + * @param string|array $key + * @return bool + */ + public static function has($key){ + return self::$root->has($key); + } + + /** + * Get all of the input and files for the request. + * + * @static + * @return array + */ + public static function all(){ + return self::$root->all(); + } + + /** + * Retrieve an input item from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function input($key = null, $default = null){ + return self::$root->input($key, $default); + } + + /** + * Get a subset of the items from the input data. + * + * @static + * @param array $keys + * @return array + */ + public static function only($keys){ + return self::$root->only($keys); + } + + /** + * Get all of the input except for a specified array of items. + * + * @static + * @param array $keys + * @return array + */ + public static function except($keys){ + return self::$root->except($keys); + } + + /** + * Retrieve a query string item from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function query($key = null, $default = null){ + return self::$root->query($key, $default); + } + + /** + * Retrieve a cookie from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function cookie($key = null, $default = null){ + return self::$root->cookie($key, $default); + } + + /** + * Retrieve a file from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return Symfony\Component\HttpFoundation\File\UploadedFile + */ + public static function file($key = null, $default = null){ + return self::$root->file($key, $default); + } + + /** + * Determine if the uploaded data contains a file. + * + * @static + * @param string $key + * @return bool + */ + public static function hasFile($key){ + return self::$root->hasFile($key); + } + + /** + * Retrieve a header from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function header($key = null, $default = null){ + return self::$root->header($key, $default); + } + + /** + * Retrieve a server variable from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function server($key = null, $default = null){ + return self::$root->server($key, $default); + } + + /** + * Retrieve an old input item. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function old($key = null, $default = null){ + return self::$root->old($key, $default); + } + + /** + * Flash the input for the current request to the session. + * + * @static + * @param string $filter + * @param array $keys + */ + public static function flash($filter = null, $keys = array()){ + self::$root->flash($filter, $keys); + } + + /** + * Flash only some of the input to the session. + * + * @static + * @param dynamic string + */ + public static function flashOnly($keys){ + self::$root->flashOnly($keys); + } + + /** + * Flash only some of the input to the session. + * + * @static + * @param dynamic string + */ + public static function flashExcept($keys){ + self::$root->flashExcept($keys); + } + + /** + * Flush all of the old input from the session. + * + * @static + */ + public static function flush(){ + self::$root->flush(); + } + + /** + * Merge new input into the current request's input array. + * + * @static + * @param array $input + */ + public static function merge($input){ + self::$root->merge($input); + } + + /** + * Replace the input for the current request. + * + * @static + * @param array $input + */ + public static function replace($input){ + self::$root->replace($input); + } + + /** + * Get the JSON payload for the request. + * + * @static + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function json($key = null, $default = null){ + return self::$root->json($key, $default); + } + + /** + * Get the Illuminate session store implementation. + * + * @static + * @return Illuminate\Session\Store + */ + public static function getSessionStore(){ + return self::$root->getSessionStore(); + } + + /** + * Set the Illuminate session store implementation. + * + * @static + * @param Illuminate\Session\Store $session + */ + public static function setSessionStore($session){ + self::$root->setSessionStore($session); + } + + /** + * Determine if the session store has been set. + * + * @static + * @return bool + */ + public static function hasSessionStore(){ + return self::$root->hasSessionStore(); + } + + /** + * Constructor. + * + * @static + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string $content The raw body data + */ + public static function __construct($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ + self::$root->__construct($query, $request, $attributes, $cookies, $files, $server, $content); + } + + /** + * Sets the parameters for this request. + * This method also re-initializes all properties. + * + * @static + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string $content The raw body data + */ + public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ + self::$root->initialize($query, $request, $attributes, $cookies, $files, $server, $content); + } + + /** + * Creates a new request with values from PHP's super globals. + * + * @static + * @return Request A new request + */ + public static function createFromGlobals(){ + return self::$root->createFromGlobals(); + } + + /** + * Creates a Request based on a given URI and configuration. + * The information contained in the URI always take precedence + * over the other information (server and parameters). + * + * @static + * @param string $uri The URI + * @param string $method The HTTP method + * @param array $parameters The query (GET) or request (POST) parameters + * @param array $cookies The request cookies ($_COOKIE) + * @param array $files The request files ($_FILES) + * @param array $server The server parameters ($_SERVER) + * @param string $content The raw body data + * @return Request A Request instance + */ + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ + return self::$root->create($uri, $method, $parameters, $cookies, $files, $server, $content); + } + + /** + * Clones a request and overrides some of its parameters. + * + * @static + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @return Request The duplicated request + */ + public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){ + return self::$root->duplicate($query, $request, $attributes, $cookies, $files, $server); + } + + /** + * Clones the current request. + * Note that the session is not cloned as duplicated requests + * are most of the time sub-requests of the main one. + * + * @static + */ + public static function __clone(){ + self::$root->__clone(); + } + + /** + * Returns the request as a string. + * + * @static + * @return string The request + */ + public static function __toString(){ + return self::$root->__toString(); + } + + /** + * Overrides the PHP global variables according to this request instance. + * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. + * $_FILES is never override, see rfc1867 + * + * @static + */ + public static function overrideGlobals(){ + self::$root->overrideGlobals(); + } + + /** + * Trusts $_SERVER entries coming from proxies. + * + * @static + */ + public static function trustProxyData(){ + self::$root->trustProxyData(); + } + + /** + * Sets a list of trusted proxies. + * You should only list the reverse proxies that you manage directly. + * + * @static + * @param array $proxies A list of trusted proxies + */ + public static function setTrustedProxies($proxies){ + self::$root->setTrustedProxies($proxies); + } + + /** + * Gets the list of trusted proxies. + * + * @static + * @return array An array of trusted proxies. + */ + public static function getTrustedProxies(){ + return self::$root->getTrustedProxies(); + } + + /** + * Sets the name for trusted headers. + * The following header keys are supported: + * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp()) + * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost()) + * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort()) + * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) + * Setting an empty value allows to disable the trusted header for the given key. + * + * @static + * @param string $key The header key + * @param string $value The header name + */ + public static function setTrustedHeaderName($key, $value){ + self::$root->setTrustedHeaderName($key, $value); + } + + /** + * Returns true if $_SERVER entries coming from proxies are trusted, + * false otherwise. + * + * @static + * @return boolean + */ + public static function isProxyTrusted(){ + return self::$root->isProxyTrusted(); + } + + /** + * Normalizes a query string. + * It builds a normalized query string, where keys/value pairs are alphabetized, + * have consistent escaping and unneeded delimiters are removed. + * + * @static + * @param string $qs Query string + * @return string A normalized query string for the Request + */ + public static function normalizeQueryString($qs){ + return self::$root->normalizeQueryString($qs); + } + + /** + * Enables support for the _method request parameter to determine the intended HTTP method. + * Be warned that enabling this feature might lead to CSRF issues in your code. + * Check that you are using CSRF tokens when required. + * The HTTP method can only be overridden when the real HTTP method is POST. + * + * @static + */ + public static function enableHttpMethodParameterOverride(){ + self::$root->enableHttpMethodParameterOverride(); + } + + /** + * Checks whether support for the _method request parameter is enabled. + * + * @static + * @return Boolean True when the _method request parameter is enabled, false otherwise + */ + public static function getHttpMethodParameterOverride(){ + return self::$root->getHttpMethodParameterOverride(); + } + + /** + * Gets a "parameter" value. + * This method is mainly useful for libraries that want to provide some flexibility. + * Order of precedence: GET, PATH, POST + * Avoid using this method in controllers: + * * slow + * * prefer to get from a "named" source + * It is better to explicitly get request parameters from the appropriate + * public property instead (query, attributes, request). + * + * @static + * @param string $key the key + * @param mixed $default the default value + * @param Boolean $deep is parameter deep in multidimensional array + * @return mixed + */ + public static function get($key, $default = null, $deep = false){ + return self::$root->get($key, $default, $deep); + } + + /** + * Gets the Session. + * + * @static + * @return SessionInterface|null The session + */ + public static function getSession(){ + return self::$root->getSession(); + } + + /** + * Whether the request contains a Session which was started in one of the + * previous requests. + * + * @static + * @return Boolean + */ + public static function hasPreviousSession(){ + return self::$root->hasPreviousSession(); + } + + /** + * Whether the request contains a Session object. + * This method does not give any information about the state of the session object, + * like whether the session is started or not. It is just a way to check if this Request + * is associated with a Session instance. + * + * @static + * @return Boolean true when the Request contains a Session object, false otherwise + */ + public static function hasSession(){ + return self::$root->hasSession(); + } + + /** + * Sets the Session. + * + * @static + * @param SessionInterface $session The Session + */ + public static function setSession($session){ + self::$root->setSession($session); + } + + /** + * Returns the client IP address. + * This method can read the client IP address from the "X-Forwarded-For" header + * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" + * header value is a comma+space separated list of IP addresses, the left-most + * being the original client, and each successive proxy that passed the request + * adding the IP address where it received the request from. + * If your reverse proxy uses a different header name than "X-Forwarded-For", + * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with + * the "client-ip" key. + * + * @static + * @return string The client IP address + */ + public static function getClientIp(){ + return self::$root->getClientIp(); + } + + /** + * Returns current script name. + * + * @static + * @return string + */ + public static function getScriptName(){ + return self::$root->getScriptName(); + } + + /** + * Returns the path being requested relative to the executed script. + * The path info always starts with a /. + * Suppose this request is instantiated from /mysite on localhost: + * * http://localhost/mysite returns an empty string + * * http://localhost/mysite/about returns '/about' + * * http://localhost/mysite/enco%20ded returns '/enco%20ded' + * * http://localhost/mysite/about?var=1 returns '/about' + * + * @static + * @return string The raw path (i.e. not urldecoded) + */ + public static function getPathInfo(){ + return self::$root->getPathInfo(); + } + + /** + * Returns the root path from which this request is executed. + * Suppose that an index.php file instantiates this request object: + * * http://localhost/index.php returns an empty string + * * http://localhost/index.php/page returns an empty string + * * http://localhost/web/index.php returns '/web' + * * http://localhost/we%20b/index.php returns '/we%20b' + * + * @static + * @return string The raw path (i.e. not urldecoded) + */ + public static function getBasePath(){ + return self::$root->getBasePath(); + } + + /** + * Returns the root url from which this request is executed. + * The base URL never ends with a /. + * This is similar to getBasePath(), except that it also includes the + * script filename (e.g. index.php) if one exists. + * + * @static + * @return string The raw url (i.e. not urldecoded) + */ + public static function getBaseUrl(){ + return self::$root->getBaseUrl(); + } + + /** + * Gets the request's scheme. + * + * @static + * @return string + */ + public static function getScheme(){ + return self::$root->getScheme(); + } + + /** + * Returns the port on which the request is made. + * This method can read the client port from the "X-Forwarded-Port" header + * when trusted proxies were set via "setTrustedProxies()". + * The "X-Forwarded-Port" header must contain the client port. + * If your reverse proxy uses a different header name than "X-Forwarded-Port", + * configure it via "setTrustedHeaderName()" with the "client-port" key. + * + * @static + * @return string + */ + public static function getPort(){ + return self::$root->getPort(); + } + + /** + * Returns the user. + * + * @static + * @return string|null + */ + public static function getUser(){ + return self::$root->getUser(); + } + + /** + * Returns the password. + * + * @static + * @return string|null + */ + public static function getPassword(){ + return self::$root->getPassword(); + } + + /** + * Gets the user info. + * + * @static + * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server + */ + public static function getUserInfo(){ + return self::$root->getUserInfo(); + } + + /** + * Returns the HTTP host being requested. + * The port name will be appended to the host if it's non-standard. + * + * @static + * @return string + */ + public static function getHttpHost(){ + return self::$root->getHttpHost(); + } + + /** + * Returns the requested URI. + * + * @static + * @return string The raw URI (i.e. not urldecoded) + */ + public static function getRequestUri(){ + return self::$root->getRequestUri(); + } + + /** + * Gets the scheme and HTTP host. + * If the URL was called with basic authentication, the user + * and the password are not added to the generated string. + * + * @static + * @return string The scheme and HTTP host + */ + public static function getSchemeAndHttpHost(){ + return self::$root->getSchemeAndHttpHost(); + } + + /** + * Generates a normalized URI for the Request. + * + * @static + * @return string A normalized URI for the Request + */ + public static function getUri(){ + return self::$root->getUri(); + } + + /** + * Generates a normalized URI for the given path. + * + * @static + * @param string $path A path to use instead of the current one + * @return string The normalized URI for the path + */ + public static function getUriForPath($path){ + return self::$root->getUriForPath($path); + } + + /** + * Generates the normalized query string for the Request. + * It builds a normalized query string, where keys/value pairs are alphabetized + * and have consistent escaping. + * + * @static + * @return string|null A normalized query string for the Request + */ + public static function getQueryString(){ + return self::$root->getQueryString(); + } + + /** + * Checks whether the request is secure or not. + * This method can read the client port from the "X-Forwarded-Proto" header + * when trusted proxies were set via "setTrustedProxies()". + * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". + * If your reverse proxy uses a different header name than "X-Forwarded-Proto" + * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with + * the "client-proto" key. + * + * @static + * @return Boolean + */ + public static function isSecure(){ + return self::$root->isSecure(); + } + + /** + * Returns the host name. + * This method can read the client port from the "X-Forwarded-Host" header + * when trusted proxies were set via "setTrustedProxies()". + * The "X-Forwarded-Host" header must contain the client host name. + * If your reverse proxy uses a different header name than "X-Forwarded-Host", + * configure it via "setTrustedHeaderName()" with the "client-host" key. + * + * @static + * @return string + */ + public static function getHost(){ + return self::$root->getHost(); + } + + /** + * Sets the request method. + * + * @static + * @param string $method + */ + public static function setMethod($method){ + self::$root->setMethod($method); + } + + /** + * Gets the request "intended" method. + * If the X-HTTP-Method-Override header is set, and if the method is a POST, + * then it is used to determine the "real" intended HTTP method. + * The _method request parameter can also be used to determine the HTTP method, + * but only if enableHttpMethodParameterOverride() has been called. + * The method is always an uppercased string. + * + * @static + * @return string The request method + */ + public static function getMethod(){ + return self::$root->getMethod(); + } + + /** + * Gets the "real" request method. + * + * @static + * @return string The request method + */ + public static function getRealMethod(){ + return self::$root->getRealMethod(); + } + + /** + * Gets the mime type associated with the format. + * + * @static + * @param string $format The format + * @return string The associated mime type (null if not found) + */ + public static function getMimeType($format){ + return self::$root->getMimeType($format); + } + + /** + * Gets the format associated with the mime type. + * + * @static + * @param string $mimeType The associated mime type + * @return string|null The format (null if not found) + */ + public static function getFormat($mimeType){ + return self::$root->getFormat($mimeType); + } + + /** + * Associates a format with mime types. + * + * @static + * @param string $format The format + * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) + */ + public static function setFormat($format, $mimeTypes){ + self::$root->setFormat($format, $mimeTypes); + } + + /** + * Gets the request format. + * Here is the process to determine the format: + * * format defined by the user (with setRequestFormat()) + * * _format request parameter + * * $default + * + * @static + * @param string $default The default format + * @return string The request format + */ + public static function getRequestFormat($default = 'html'){ + return self::$root->getRequestFormat($default); + } + + /** + * Sets the request format. + * + * @static + * @param string $format The request format. + */ + public static function setRequestFormat($format){ + self::$root->setRequestFormat($format); + } + + /** + * Gets the format associated with the request. + * + * @static + * @return string|null The format (null if no content type is present) + */ + public static function getContentType(){ + return self::$root->getContentType(); + } + + /** + * Sets the default locale. + * + * @static + * @param string $locale + */ + public static function setDefaultLocale($locale){ + self::$root->setDefaultLocale($locale); + } + + /** + * Sets the locale. + * + * @static + * @param string $locale + */ + public static function setLocale($locale){ + self::$root->setLocale($locale); + } + + /** + * Get the locale. + * + * @static + * @return string + */ + public static function getLocale(){ + return self::$root->getLocale(); + } + + /** + * Checks if the request method is of specified type. + * + * @static + * @param string $method Uppercase request method (GET, POST etc). + * @return Boolean + */ + public static function isMethod($method){ + return self::$root->isMethod($method); + } + + /** + * Checks whether the method is safe or not. + * + * @static + * @return Boolean + */ + public static function isMethodSafe(){ + return self::$root->isMethodSafe(); + } + + /** + * Returns the request body content. + * + * @static + * @param Boolean $asResource If true, a resource will be returned + * @return string|resource The request body content or a resource to read the body stream. + */ + public static function getContent($asResource = false){ + return self::$root->getContent($asResource); + } + + /** + * Gets the Etags. + * + * @static + * @return array The entity tags + */ + public static function getETags(){ + return self::$root->getETags(); + } + + /** + * + * + * @static + * @return Boolean + */ + public static function isNoCache(){ + return self::$root->isNoCache(); + } + + /** + * Returns the preferred language. + * + * @static + * @param array $locales An array of ordered available locales + * @return string|null The preferred locale + */ + public static function getPreferredLanguage($locales = null){ + return self::$root->getPreferredLanguage($locales); + } + + /** + * Gets a list of languages acceptable by the client browser. + * + * @static + * @return array Languages ordered in the user browser preferences + */ + public static function getLanguages(){ + return self::$root->getLanguages(); + } + + /** + * Gets a list of charsets acceptable by the client browser. + * + * @static + * @return array List of charsets in preferable order + */ + public static function getCharsets(){ + return self::$root->getCharsets(); + } + + /** + * Gets a list of content types acceptable by the client browser + * + * @static + * @return array List of content types in preferable order + */ + public static function getAcceptableContentTypes(){ + return self::$root->getAcceptableContentTypes(); + } + + /** + * Returns true if the request is a XMLHttpRequest. + * It works if your JavaScript library set an X-Requested-With HTTP header. + * It is known to work with common JavaScript frameworks: + * + * @static + * @return Boolean true if the request is an XMLHttpRequest, false otherwise + */ + public static function isXmlHttpRequest(){ + return self::$root->isXmlHttpRequest(); + } + + /** + * Splits an Accept-* HTTP header. + * + * @static + * @param string $header Header to split + * @return array Array indexed by the values of the Accept-* header in preferred order + */ + public static function splitHttpAcceptHeader($header){ + return self::$root->splitHttpAcceptHeader($header); } } @@ -6926,645 +7241,60 @@ namespace { namespace { class Response{ /** - * @var Illuminate\Http\Response $realClass + * @var Illuminate\Support\Facades\Response $root */ - static private $realClass; + static private $root; /** - * Add a cookie to the response. + * Return a new response from the application. * * @static - * @param Symfony\Component\HttpFoundation\Cookie $cookie - * @return Illuminate\Http\Response + * @param string $content + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\Response */ - public static function withCookie($cookie){ - return self::$realClass->withCookie($cookie); + public static function make($content = '', $status = '200', $headers = array()){ + return self::$root->make($content, $status, $headers); } /** - * Set the content on the response. + * Return a new JSON response from the application. * * @static - * @param mixed $content + * @param string $content + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\JsonResponse */ - public static function setContent($content){ - self::$realClass->setContent($content); + public static function json($data = array(), $status = '200', $headers = array()){ + return self::$root->json($data, $status, $headers); } /** - * Get the original response content. + * Return a new streamed response from the application. * * @static - * @return mixed + * @param Closure $callback + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\StreamedResponse */ - public static function getOriginalContent(){ - return self::$realClass->getOriginalContent(); + public static function stream($callback, $status = '200', $headers = array()){ + return self::$root->stream($callback, $status, $headers); } /** - * Constructor. + * Create a new file download response. * * @static - * @param string $content The response content - * @param integer $status The response status code - * @param array $headers An array of response headers + * @param SplFileInfo|string $file + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\BinaryFileResponse */ - public static function __construct($content = '', $status = '200', $headers = array()){ - self::$realClass->__construct($content, $status, $headers); - } - - /** - * Factory method for chainability - * Example: - * return Response::create($body, 200) - * ->setSharedMaxAge(300); - * - * @static - * @param string $content The response content - * @param integer $status The response status code - * @param array $headers An array of response headers - * @return Response - */ - public static function create($content = '', $status = '200', $headers = array()){ - return self::$realClass->create($content, $status, $headers); - } - - /** - * Returns the Response as an HTTP string. - * The string representation of the Response is the same as the - * one that will be sent to the client only if the prepare() method - * has been called before. - * - * @static - * @return string The Response as an HTTP string - */ - public static function __toString(){ - return self::$realClass->__toString(); - } - - /** - * Clones the current Response instance. - * - * @static - */ - public static function __clone(){ - self::$realClass->__clone(); - } - - /** - * Prepares the Response before it is sent to the client. - * This method tweaks the Response to ensure that it is - * compliant with RFC 2616. Most of the changes are based on - * the Request that is "associated" with this Response. - * - * @static - * @param Request $request A Request instance - * @return Response The current response. - */ - public static function prepare($request){ - return self::$realClass->prepare($request); - } - - /** - * Sends HTTP headers. - * - * @static - * @return Response - */ - public static function sendHeaders(){ - return self::$realClass->sendHeaders(); - } - - /** - * Sends content for the current web response. - * - * @static - * @return Response - */ - public static function sendContent(){ - return self::$realClass->sendContent(); - } - - /** - * Sends HTTP headers and content. - * - * @static - * @return Response - */ - public static function send(){ - return self::$realClass->send(); - } - - /** - * Gets the current response content. - * - * @static - * @return string Content - */ - public static function getContent(){ - return self::$realClass->getContent(); - } - - /** - * Sets the HTTP protocol version (1.0 or 1.1). - * - * @static - * @param string $version The HTTP protocol version - * @return Response - */ - public static function setProtocolVersion($version){ - return self::$realClass->setProtocolVersion($version); - } - - /** - * Gets the HTTP protocol version. - * - * @static - * @return string The HTTP protocol version - */ - public static function getProtocolVersion(){ - return self::$realClass->getProtocolVersion(); - } - - /** - * Sets the response status code. - * - * @static - * @param integer $code HTTP status code - * @param mixed $text HTTP status text -If the status text is null it will be automatically populated for the known -status codes and left empty otherwise. - * @return Response - */ - public static function setStatusCode($code, $text = null){ - return self::$realClass->setStatusCode($code, $text); - } - - /** - * Retrieves the status code for the current web response. - * - * @static - * @return integer Status code - */ - public static function getStatusCode(){ - return self::$realClass->getStatusCode(); - } - - /** - * Sets the response charset. - * - * @static - * @param string $charset Character set - * @return Response - */ - public static function setCharset($charset){ - return self::$realClass->setCharset($charset); - } - - /** - * Retrieves the response charset. - * - * @static - * @return string Character set - */ - public static function getCharset(){ - return self::$realClass->getCharset(); - } - - /** - * Returns true if the response is worth caching under any circumstance. - * Responses marked "private" with an explicit Cache-Control directive are - * considered uncacheable. - * Responses with neither a freshness lifetime (Expires, max-age) nor cache - * validator (Last-Modified, ETag) are considered uncacheable. - * - * @static - * @return Boolean true if the response is worth caching, false otherwise - */ - public static function isCacheable(){ - return self::$realClass->isCacheable(); - } - - /** - * Returns true if the response is "fresh". - * Fresh responses may be served from cache without any interaction with the - * origin. A response is considered fresh when it includes a Cache-Control/max-age - * indicator or Expires header and the calculated age is less than the freshness lifetime. - * - * @static - * @return Boolean true if the response is fresh, false otherwise - */ - public static function isFresh(){ - return self::$realClass->isFresh(); - } - - /** - * Returns true if the response includes headers that can be used to validate - * the response with the origin server using a conditional GET request. - * - * @static - * @return Boolean true if the response is validateable, false otherwise - */ - public static function isValidateable(){ - return self::$realClass->isValidateable(); - } - - /** - * Marks the response as "private". - * It makes the response ineligible for serving other clients. - * - * @static - * @return Response - */ - public static function setPrivate(){ - return self::$realClass->setPrivate(); - } - - /** - * Marks the response as "public". - * It makes the response eligible for serving other clients. - * - * @static - * @return Response - */ - public static function setPublic(){ - return self::$realClass->setPublic(); - } - - /** - * Returns true if the response must be revalidated by caches. - * This method indicates that the response must not be served stale by a - * cache in any circumstance without first revalidating with the origin. - * When present, the TTL of the response should not be overridden to be - * greater than the value provided by the origin. - * - * @static - * @return Boolean true if the response must be revalidated by a cache, false otherwise - */ - public static function mustRevalidate(){ - return self::$realClass->mustRevalidate(); - } - - /** - * Returns the Date header as a DateTime instance. - * - * @static - * @return \DateTime A \DateTime instance - */ - public static function getDate(){ - return self::$realClass->getDate(); - } - - /** - * Sets the Date header. - * - * @static - * @param \DateTime $date A \DateTime instance - * @return Response - */ - public static function setDate($date){ - return self::$realClass->setDate($date); - } - - /** - * Returns the age of the response. - * - * @static - * @return integer The age of the response in seconds - */ - public static function getAge(){ - return self::$realClass->getAge(); - } - - /** - * Marks the response stale by setting the Age header to be equal to the maximum age of the response. - * - * @static - * @return Response - */ - public static function expire(){ - return self::$realClass->expire(); - } - - /** - * Returns the value of the Expires header as a DateTime instance. - * - * @static - * @return \DateTime|null A DateTime instance or null if the header does not exist - */ - public static function getExpires(){ - return self::$realClass->getExpires(); - } - - /** - * Sets the Expires HTTP header with a DateTime instance. - * Passing null as value will remove the header. - * - * @static - * @param \DateTime|null $date A \DateTime instance or null to remove the header - * @return Response - */ - public static function setExpires($date = null){ - return self::$realClass->setExpires($date); - } - - /** - * Returns the number of seconds after the time specified in the response's Date - * header when the the response should no longer be considered fresh. - * First, it checks for a s-maxage directive, then a max-age directive, and then it falls - * back on an expires header. It returns null when no maximum age can be established. - * - * @static - * @return integer|null Number of seconds - */ - public static function getMaxAge(){ - return self::$realClass->getMaxAge(); - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh. - * This methods sets the Cache-Control max-age directive. - * - * @static - * @param integer $value Number of seconds - * @return Response - */ - public static function setMaxAge($value){ - return self::$realClass->setMaxAge($value); - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh by shared caches. - * This methods sets the Cache-Control s-maxage directive. - * - * @static - * @param integer $value Number of seconds - * @return Response - */ - public static function setSharedMaxAge($value){ - return self::$realClass->setSharedMaxAge($value); - } - - /** - * Returns the response's time-to-live in seconds. - * It returns null when no freshness information is present in the response. - * When the responses TTL is <= 0, the response may not be served from cache without first - * revalidating with the origin. - * - * @static - * @return integer|null The TTL in seconds - */ - public static function getTtl(){ - return self::$realClass->getTtl(); - } - - /** - * Sets the response's time-to-live for shared caches. - * This method adjusts the Cache-Control/s-maxage directive. - * - * @static - * @param integer $seconds Number of seconds - * @return Response - */ - public static function setTtl($seconds){ - return self::$realClass->setTtl($seconds); - } - - /** - * Sets the response's time-to-live for private/client caches. - * This method adjusts the Cache-Control/max-age directive. - * - * @static - * @param integer $seconds Number of seconds - * @return Response - */ - public static function setClientTtl($seconds){ - return self::$realClass->setClientTtl($seconds); - } - - /** - * Returns the Last-Modified HTTP header as a DateTime instance. - * - * @static - * @return \DateTime|null A DateTime instance or null if the header does not exist - */ - public static function getLastModified(){ - return self::$realClass->getLastModified(); - } - - /** - * Sets the Last-Modified HTTP header with a DateTime instance. - * Passing null as value will remove the header. - * - * @static - * @param \DateTime|null $date A \DateTime instance or null to remove the header - * @return Response - */ - public static function setLastModified($date = null){ - return self::$realClass->setLastModified($date); - } - - /** - * Returns the literal value of the ETag HTTP header. - * - * @static - * @return string|null The ETag HTTP header or null if it does not exist - */ - public static function getEtag(){ - return self::$realClass->getEtag(); - } - - /** - * Sets the ETag value. - * - * @static - * @param string|null $etag The ETag unique identifier or null to remove the header - * @param Boolean $weak Whether you want a weak ETag or not - * @return Response - */ - public static function setEtag($etag = null, $weak = false){ - return self::$realClass->setEtag($etag, $weak); - } - - /** - * Sets the response's cache headers (validation and/or expiration). - * Available options are: etag, last_modified, max_age, s_maxage, private, and public. - * - * @static - * @param array $options An array of cache options - * @return Response - */ - public static function setCache($options){ - return self::$realClass->setCache($options); - } - - /** - * Modifies the response so that it conforms to the rules defined for a 304 status code. - * This sets the status, removes the body, and discards any headers - * that MUST NOT be included in 304 responses. - * - * @static - * @return Response - */ - public static function setNotModified(){ - return self::$realClass->setNotModified(); - } - - /** - * Returns true if the response includes a Vary header. - * - * @static - * @return Boolean true if the response includes a Vary header, false otherwise - */ - public static function hasVary(){ - return self::$realClass->hasVary(); - } - - /** - * Returns an array of header names given in the Vary header. - * - * @static - * @return array An array of Vary names - */ - public static function getVary(){ - return self::$realClass->getVary(); - } - - /** - * Sets the Vary header. - * - * @static - * @param string|array $headers - * @param Boolean $replace Whether to replace the actual value of not (true by default) - * @return Response - */ - public static function setVary($headers, $replace = true){ - return self::$realClass->setVary($headers, $replace); - } - - /** - * Determines if the Response validators (ETag, Last-Modified) match - * a conditional value specified in the Request. - * If the Response is not modified, it sets the status code to 304 and - * removes the actual content by calling the setNotModified() method. - * - * @static - * @param Request $request A Request instance - * @return Boolean true if the Response validators match the Request, false otherwise - */ - public static function isNotModified($request){ - return self::$realClass->isNotModified($request); - } - - /** - * Is response invalid? - * - * @static - * @return Boolean - */ - public static function isInvalid(){ - return self::$realClass->isInvalid(); - } - - /** - * Is response informative? - * - * @static - * @return Boolean - */ - public static function isInformational(){ - return self::$realClass->isInformational(); - } - - /** - * Is response successful? - * - * @static - * @return Boolean - */ - public static function isSuccessful(){ - return self::$realClass->isSuccessful(); - } - - /** - * Is the response a redirect? - * - * @static - * @return Boolean - */ - public static function isRedirection(){ - return self::$realClass->isRedirection(); - } - - /** - * Is there a client error? - * - * @static - * @return Boolean - */ - public static function isClientError(){ - return self::$realClass->isClientError(); - } - - /** - * Was there a server side error? - * - * @static - * @return Boolean - */ - public static function isServerError(){ - return self::$realClass->isServerError(); - } - - /** - * Is the response OK? - * - * @static - * @return Boolean - */ - public static function isOk(){ - return self::$realClass->isOk(); - } - - /** - * Is the response forbidden? - * - * @static - * @return Boolean - */ - public static function isForbidden(){ - return self::$realClass->isForbidden(); - } - - /** - * Is the response a not found error? - * - * @static - * @return Boolean - */ - public static function isNotFound(){ - return self::$realClass->isNotFound(); - } - - /** - * Is the response a redirect of some form? - * - * @static - * @param string $location - * @return Boolean - */ - public static function isRedirect($location = null){ - return self::$realClass->isRedirect($location); - } - - /** - * Is the response empty? - * - * @static - * @return Boolean - */ - public static function isEmpty(){ - return self::$realClass->isEmpty(); + public static function download($file, $status = '200', $headers = array()){ + return self::$root->download($file, $status, $headers); } } @@ -7573,9 +7303,9 @@ status codes and left empty otherwise. namespace { class Route{ /** - * @var Illuminate\Routing\Router $realClass + * @var Illuminate\Routing\Router $root */ - static private $realClass; + static private $root; /** * Create a new router instance. @@ -7584,7 +7314,7 @@ namespace { * @param Illuminate\Container $container */ public static function __construct($container = null){ - self::$realClass->__construct($container); + self::$root->__construct($container); } /** @@ -7596,7 +7326,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function get($pattern, $action){ - return self::$realClass->get($pattern, $action); + return self::$root->get($pattern, $action); } /** @@ -7608,7 +7338,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function post($pattern, $action){ - return self::$realClass->post($pattern, $action); + return self::$root->post($pattern, $action); } /** @@ -7620,7 +7350,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function put($pattern, $action){ - return self::$realClass->put($pattern, $action); + return self::$root->put($pattern, $action); } /** @@ -7632,7 +7362,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function patch($pattern, $action){ - return self::$realClass->patch($pattern, $action); + return self::$root->patch($pattern, $action); } /** @@ -7644,7 +7374,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function delete($pattern, $action){ - return self::$realClass->delete($pattern, $action); + return self::$root->delete($pattern, $action); } /** @@ -7656,7 +7386,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function options($pattern, $action){ - return self::$realClass->options($pattern, $action); + return self::$root->options($pattern, $action); } /** @@ -7669,7 +7399,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function match($method, $pattern, $action){ - return self::$realClass->match($method, $pattern, $action); + return self::$root->match($method, $pattern, $action); } /** @@ -7681,7 +7411,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function any($pattern, $action){ - return self::$realClass->any($pattern, $action); + return self::$root->any($pattern, $action); } /** @@ -7691,7 +7421,7 @@ namespace { * @param array $controllers */ public static function controllers($controllers){ - self::$realClass->controllers($controllers); + self::$root->controllers($controllers); } /** @@ -7703,7 +7433,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function controller($uri, $controller){ - return self::$realClass->controller($uri, $controller); + return self::$root->controller($uri, $controller); } /** @@ -7715,7 +7445,7 @@ namespace { * @param array $options */ public static function resource($resource, $controller, $options = array()){ - self::$realClass->resource($resource, $controller, $options); + self::$root->resource($resource, $controller, $options); } /** @@ -7726,7 +7456,7 @@ namespace { * @return string */ public static function getResourceUri($resource){ - return self::$realClass->getResourceUri($resource); + return self::$root->getResourceUri($resource); } /** @@ -7737,7 +7467,7 @@ namespace { * @param Closure $callback */ public static function group($attributes, $callback){ - self::$realClass->group($attributes, $callback); + self::$root->group($attributes, $callback); } /** @@ -7748,7 +7478,7 @@ namespace { * @return Symfony\Component\HttpFoundation\Response */ public static function dispatch($request){ - return self::$realClass->dispatch($request); + return self::$root->dispatch($request); } /** @@ -7758,7 +7488,7 @@ namespace { * @param Closure|string $callback */ public static function before($callback){ - self::$realClass->before($callback); + self::$root->before($callback); } /** @@ -7768,7 +7498,7 @@ namespace { * @param Closure|string $callback */ public static function after($callback){ - self::$realClass->after($callback); + self::$root->after($callback); } /** @@ -7778,7 +7508,7 @@ namespace { * @param Closure|string $callback */ public static function close($callback){ - self::$realClass->close($callback); + self::$root->close($callback); } /** @@ -7788,7 +7518,7 @@ namespace { * @param Closure|string $callback */ public static function finish($callback){ - self::$realClass->finish($callback); + self::$root->finish($callback); } /** @@ -7799,7 +7529,7 @@ namespace { * @param Closure|string $callback */ public static function addFilter($name, $callback){ - self::$realClass->addFilter($name, $callback); + self::$root->addFilter($name, $callback); } /** @@ -7810,7 +7540,7 @@ namespace { * @return Closure */ public static function getFilter($name){ - return self::$realClass->getFilter($name); + return self::$root->getFilter($name); } /** @@ -7821,7 +7551,7 @@ namespace { * @param string|array $names */ public static function matchFilter($pattern, $names){ - self::$realClass->matchFilter($pattern, $names); + self::$root->matchFilter($pattern, $names); } /** @@ -7832,7 +7562,7 @@ namespace { * @return array */ public static function findPatternFilters($request){ - return self::$realClass->findPatternFilters($request); + return self::$root->findPatternFilters($request); } /** @@ -7844,7 +7574,7 @@ namespace { * @return mixed */ public static function callFinishFilter($request, $response){ - return self::$realClass->callFinishFilter($request, $response); + return self::$root->callFinishFilter($request, $response); } /** @@ -7855,7 +7585,7 @@ namespace { * @param string $pattern */ public static function pattern($key, $pattern){ - self::$realClass->pattern($key, $pattern); + self::$root->pattern($key, $pattern); } /** @@ -7866,7 +7596,7 @@ namespace { * @param string $class */ public static function model($key, $class){ - self::$realClass->model($key, $class); + self::$root->model($key, $class); } /** @@ -7877,7 +7607,7 @@ namespace { * @param mixed $binder */ public static function bind($key, $binder){ - self::$realClass->bind($key, $binder); + self::$root->bind($key, $binder); } /** @@ -7888,7 +7618,7 @@ namespace { * @return bool */ public static function hasBinder($key){ - return self::$realClass->hasBinder($key); + return self::$root->hasBinder($key); } /** @@ -7901,7 +7631,7 @@ namespace { * @return mixed */ public static function performBinding($key, $value, $route){ - return self::$realClass->performBinding($key, $value, $route); + return self::$root->performBinding($key, $value, $route); } /** @@ -7913,7 +7643,7 @@ namespace { * @return Symfony\Component\HttpFoundation\Response */ public static function prepare($value, $request){ - return self::$realClass->prepare($value, $request); + return self::$root->prepare($value, $request); } /** @@ -7924,7 +7654,7 @@ namespace { * @return bool */ public static function currentRouteNamed($name){ - return self::$realClass->currentRouteNamed($name); + return self::$root->currentRouteNamed($name); } /** @@ -7935,7 +7665,7 @@ namespace { * @return bool */ public static function currentRouteUses($action){ - return self::$realClass->currentRouteUses($action); + return self::$root->currentRouteUses($action); } /** @@ -7945,7 +7675,7 @@ namespace { * @return bool */ public static function filtersEnabled(){ - return self::$realClass->filtersEnabled(); + return self::$root->filtersEnabled(); } /** @@ -7954,7 +7684,7 @@ namespace { * @static */ public static function enableFilters(){ - self::$realClass->enableFilters(); + self::$root->enableFilters(); } /** @@ -7963,7 +7693,7 @@ namespace { * @static */ public static function disableFilters(){ - self::$realClass->disableFilters(); + self::$root->disableFilters(); } /** @@ -7973,7 +7703,7 @@ namespace { * @return Symfony\Component\Routing\RouteCollection */ public static function getRoutes(){ - return self::$realClass->getRoutes(); + return self::$root->getRoutes(); } /** @@ -7983,7 +7713,7 @@ namespace { * @return Symfony\Component\HttpFoundation\Request */ public static function getRequest(){ - return self::$realClass->getRequest(); + return self::$root->getRequest(); } /** @@ -7993,7 +7723,7 @@ namespace { * @return Illuminate\Routing\Route */ public static function getCurrentRoute(){ - return self::$realClass->getCurrentRoute(); + return self::$root->getCurrentRoute(); } /** @@ -8003,7 +7733,7 @@ namespace { * @param Illuminate\Routing\Route $route */ public static function setCurrentRoute($route){ - self::$realClass->setCurrentRoute($route); + self::$root->setCurrentRoute($route); } /** @@ -8013,7 +7743,7 @@ namespace { * @return array */ public static function getFilters(){ - return self::$realClass->getFilters(); + return self::$root->getFilters(); } /** @@ -8023,7 +7753,7 @@ namespace { * @return array */ public static function getGlobalFilters(){ - return self::$realClass->getGlobalFilters(); + return self::$root->getGlobalFilters(); } /** @@ -8033,7 +7763,7 @@ namespace { * @return Illuminate\Routing\Controllers\Inspector */ public static function getInspector(){ - return self::$realClass->getInspector(); + return self::$root->getInspector(); } /** @@ -8043,7 +7773,7 @@ namespace { * @param Illuminate\Routing\Controllers\Inspector $inspector */ public static function setInspector($inspector){ - self::$realClass->setInspector($inspector); + self::$root->setInspector($inspector); } /** @@ -8053,7 +7783,7 @@ namespace { * @return Illuminate\Container\Container */ public static function getContainer(){ - return self::$realClass->getContainer(); + return self::$root->getContainer(); } /** @@ -8063,7 +7793,7 @@ namespace { * @param Illuminate\Container\Container $container */ public static function setContainer($container){ - self::$realClass->setContainer($container); + self::$root->setContainer($container); } } @@ -8072,9 +7802,9 @@ namespace { namespace { class Schema{ /** - * @var Illuminate\Database\Schema\Builder $realClass + * @var Illuminate\Database\Schema\Builder $root */ - static private $realClass; + static private $root; /** * Create a new database Schema manager. @@ -8083,7 +7813,7 @@ namespace { * @param Illuminate\Database\Connection $connection */ public static function __construct($connection){ - self::$realClass->__construct($connection); + self::$root->__construct($connection); } /** @@ -8094,7 +7824,7 @@ namespace { * @return bool */ public static function hasTable($table){ - return self::$realClass->hasTable($table); + return self::$root->hasTable($table); } /** @@ -8106,7 +7836,7 @@ namespace { * @return Illuminate\Database\Schema\Blueprint */ public static function table($table, $callback){ - return self::$realClass->table($table, $callback); + return self::$root->table($table, $callback); } /** @@ -8118,7 +7848,7 @@ namespace { * @return Illuminate\Database\Schema\Blueprint */ public static function create($table, $callback){ - return self::$realClass->create($table, $callback); + return self::$root->create($table, $callback); } /** @@ -8129,7 +7859,7 @@ namespace { * @return Illuminate\Database\Schema\Blueprint */ public static function drop($table){ - return self::$realClass->drop($table); + return self::$root->drop($table); } /** @@ -8140,7 +7870,7 @@ namespace { * @return Illuminate\Database\Schema\Blueprint */ public static function dropIfExists($table){ - return self::$realClass->dropIfExists($table); + return self::$root->dropIfExists($table); } /** @@ -8152,7 +7882,7 @@ namespace { * @return Illuminate\Database\Schema\Blueprint */ public static function rename($from, $to){ - return self::$realClass->rename($from, $to); + return self::$root->rename($from, $to); } /** @@ -8162,7 +7892,7 @@ namespace { * @return Illuminate\Database\Connection */ public static function getConnection(){ - return self::$realClass->getConnection(); + return self::$root->getConnection(); } /** @@ -8173,7 +7903,7 @@ namespace { * @return Illuminate\Database\Schema */ public static function setConnection($connection){ - return self::$realClass->setConnection($connection); + return self::$root->setConnection($connection); } } @@ -8182,9 +7912,9 @@ namespace { namespace { class Seeder{ /** - * @var Illuminate\Database\Seeder $realClass + * @var Illuminate\Database\Seeder $root */ - static private $realClass; + static private $root; /** * Run the database seeds. @@ -8192,7 +7922,7 @@ namespace { * @static */ public static function run(){ - self::$realClass->run(); + self::$root->run(); } /** @@ -8202,7 +7932,7 @@ namespace { * @param string $class */ public static function call($class){ - self::$realClass->call($class); + self::$root->call($class); } /** @@ -8212,7 +7942,7 @@ namespace { * @param Illuminate\Container\Container $container */ public static function setContainer($container){ - self::$realClass->setContainer($container); + self::$root->setContainer($container); } } @@ -8221,80 +7951,432 @@ namespace { namespace { class Session{ /** - * @var Illuminate\Support\Facades\Session $realClass + * @var Illuminate\Session\CookieStore $root */ - static private $realClass; + static private $root; /** - * Hotswap the underlying instance behind the facade. + * Create a new Cookie based session store. * * @static - * @param mixed $instance + * @param Illuminate\CookieJar $cookies + * @param string $payload */ - public static function swap($instance){ - self::$realClass->swap($instance); + public static function __construct($cookies, $payload = 'illuminate_payload'){ + self::$root->__construct($cookies, $payload); } /** - * Initiate a mock expectation on the facade. + * Retrieve a session payload from storage. * * @static - * @param dynamic - * @return Mockery\Expectation + * @param string $id + * @return array|null */ - public static function shouldReceive(){ - return self::$realClass->shouldReceive(); + public static function retrieveSession($id){ + return self::$root->retrieveSession($id); } /** - * Get the root object behind the facade. + * Create a new session in storage. * * @static + * @param string $id + * @param array $session + * @param Symfony\Component\HttpFoundation\Response $response + */ + public static function createSession($id, $session, $response){ + self::$root->createSession($id, $session, $response); + } + + /** + * Update an existing session in storage. + * + * @static + * @param string $id + * @param array $session + * @param Symfony\Component\HttpFoundation\Response $response + */ + public static function updateSession($id, $session, $response){ + self::$root->updateSession($id, $session, $response); + } + + /** + * Set the name of the session payload cookie. + * + * @static + * @param string $name + */ + public static function setPayloadName($name){ + self::$root->setPayloadName($name); + } + + /** + * Get the cookie jar instance. + * + * @static + * @return Illuminate\CookieJar + */ + public static function getCookieJar(){ + return self::$root->getCookieJar(); + } + + /** + * Load the session for the request. + * + * @static + * @param Illuminate\CookieJar $cookies + * @param string $name + */ + public static function start($cookies, $name){ + self::$root->start($cookies, $name); + } + + /** + * Get the full array of session data, including flash data. + * + * @static + * @return array + */ + public static function all(){ + return self::$root->all(); + } + + /** + * Determine if the session contains a given item. + * + * @static + * @param string $key + * @return bool + */ + public static function has($key){ + return self::$root->has($key); + } + + /** + * Get the requested item from the session. + * + * @static + * @param string $key + * @param mixed $default * @return mixed */ - public static function getFacadeRoot(){ - return self::$realClass->getFacadeRoot(); + public static function get($key, $default = null){ + return self::$root->get($key, $default); } /** - * Clear all of the resolved instances. + * Get the request item from the flash data. * * @static - */ - public static function clearResolvedInstances(){ - self::$realClass->clearResolvedInstances(); - } - - /** - * Get the application instance behind the facade. - * - * @static - * @return Illuminate\Foundation\Application - */ - public static function getFacadeApplication(){ - return self::$realClass->getFacadeApplication(); - } - - /** - * Set the application instance. - * - * @static - * @param Illuminate\Foundation\Application $app - */ - public static function setFacadeApplication($app){ - self::$realClass->setFacadeApplication($app); - } - - /** - * Handle dynamic, static calls to the object. - * - * @static - * @param string $method - * @param array $args + * @param string $key + * @param mixed $default * @return mixed */ - public static function __callStatic($method, $args){ - return self::$realClass->__callStatic($method, $args); + public static function getFlash($key, $default = null){ + return self::$root->getFlash($key, $default); + } + + /** + * Determine if the old input contains an item. + * + * @static + * @param string $key + * @return bool + */ + public static function hasOldInput($key){ + return self::$root->hasOldInput($key); + } + + /** + * Get the requested item from the flashed input array. + * + * @static + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function getOldInput($key = null, $default = null){ + return self::$root->getOldInput($key, $default); + } + + /** + * Get the CSRF token value. + * + * @static + * @return string + */ + public static function getToken(){ + return self::$root->getToken(); + } + + /** + * Put a key / value pair in the session. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function put($key, $value){ + self::$root->put($key, $value); + } + + /** + * Flash a key / value pair to the session. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function flash($key, $value){ + self::$root->flash($key, $value); + } + + /** + * Flash an input array to the session. + * + * @static + * @param array $value + */ + public static function flashInput($value){ + self::$root->flashInput($value); + } + + /** + * Keep all of the session flash data from expiring. + * + * @static + */ + public static function reflash(){ + self::$root->reflash(); + } + + /** + * Keep a session flash item from expiring. + * + * @static + * @param string|array $keys + */ + public static function keep($keys){ + self::$root->keep($keys); + } + + /** + * Remove an item from the session. + * + * @static + * @param string $key + */ + public static function forget($key){ + self::$root->forget($key); + } + + /** + * Remove all of the items from the session. + * + * @static + */ + public static function flush(){ + self::$root->flush(); + } + + /** + * Generate a new session identifier. + * + * @static + * @return string + */ + public static function regenerate(){ + return self::$root->regenerate(); + } + + /** + * Finish the session handling for the request. + * + * @static + * @param Symfony\Component\HttpFoundation\Response $response + * @param int $lifetime + */ + public static function finish($response, $lifetime){ + self::$root->finish($response, $lifetime); + } + + /** + * Determine if the request hits the sweeper lottery. + * + * @static + * @return bool + */ + public static function hitsLottery(){ + return self::$root->hitsLottery(); + } + + /** + * Write the session cookie to the response. + * + * @static + * @param Illuminate\Cookie\CookieJar $cookie + * @param string $name + * @param int $lifetime + * @param string $path + * @param string $domain + */ + public static function getCookie($cookie, $name, $lifetime, $path, $domain){ + self::$root->getCookie($cookie, $name, $lifetime, $path, $domain); + } + + /** + * Get the session payload. + * + * @static + */ + public static function getSession(){ + self::$root->getSession(); + } + + /** + * Set the entire session payload. + * + * @static + * @param array $session + */ + public static function setSession($session){ + self::$root->setSession($session); + } + + /** + * Get the current session ID. + * + * @static + * @return string + */ + public static function getSessionID(){ + return self::$root->getSessionID(); + } + + /** + * Get the session's last activity UNIX timestamp. + * + * @static + * @return int + */ + public static function getLastActivity(){ + return self::$root->getLastActivity(); + } + + /** + * Determine if the session exists in storage. + * + * @static + * @return bool + */ + public static function sessionExists(){ + return self::$root->sessionExists(); + } + + /** + * Set the existence of the session. + * + * @static + * @param bool $value + */ + public static function setExists($value){ + self::$root->setExists($value); + } + + /** + * Set the session cookie name. + * + * @static + * @param string $name + */ + public static function setCookieName($name){ + self::$root->setCookieName($name); + } + + /** + * Get the given cookie option. + * + * @static + * @param string $option + * @return mixed + */ + public static function getCookieOption($option){ + return self::$root->getCookieOption($option); + } + + /** + * Set the given cookie option. + * + * @static + * @param string $option + * @param mixed $value + */ + public static function setCookieOption($option, $value){ + self::$root->setCookieOption($option, $value); + } + + /** + * Set the session lifetime. + * + * @static + * @param int $minutes + */ + public static function setLifetime($minutes){ + self::$root->setLifetime($minutes); + } + + /** + * Set the chances of hitting the Sweeper lottery. + * + * @static + * @param array $values + */ + public static function setSweepLottery($values){ + self::$root->setSweepLottery($values); + } + + /** + * Determine if the given offset exists. + * + * @static + * @param string $key + * @return bool + */ + public static function offsetExists($key){ + return self::$root->offsetExists($key); + } + + /** + * Get the value at a given offset. + * + * @static + * @param string $key + * @return mixed + */ + public static function offsetGet($key){ + return self::$root->offsetGet($key); + } + + /** + * Store a value at the given offset. + * + * @static + * @param string $key + * @param mixed $value + */ + public static function offsetSet($key, $value){ + self::$root->offsetSet($key, $value); + } + + /** + * Remove the value at a given offset. + * + * @static + * @param string $key + */ + public static function offsetUnset($key){ + self::$root->offsetUnset($key); } } @@ -8303,9 +8385,9 @@ namespace { namespace { class Str{ /** - * @var Illuminate\Support\Str $realClass + * @var Illuminate\Support\Str $root */ - static private $realClass; + static private $root; /** * Transliterate a UTF-8 value to ASCII. @@ -8315,7 +8397,7 @@ namespace { * @return string */ public static function ascii($value){ - return self::$realClass->ascii($value); + return self::$root->ascii($value); } /** @@ -8326,7 +8408,7 @@ namespace { * @return string */ public static function camel($value){ - return self::$realClass->camel($value); + return self::$root->camel($value); } /** @@ -8338,7 +8420,7 @@ namespace { * @return bool */ public static function contains($haystack, $needle){ - return self::$realClass->contains($haystack, $needle); + return self::$root->contains($haystack, $needle); } /** @@ -8350,7 +8432,7 @@ namespace { * @return bool */ public static function endsWith($haystack, $needle){ - return self::$realClass->endsWith($haystack, $needle); + return self::$root->endsWith($haystack, $needle); } /** @@ -8362,7 +8444,7 @@ namespace { * @return string */ public static function finish($value, $cap){ - return self::$realClass->finish($value, $cap); + return self::$root->finish($value, $cap); } /** @@ -8374,7 +8456,7 @@ namespace { * @return bool */ public static function is($pattern, $value){ - return self::$realClass->is($pattern, $value); + return self::$root->is($pattern, $value); } /** @@ -8387,7 +8469,7 @@ namespace { * @return string */ public static function limit($value, $limit = '100', $end = '...'){ - return self::$realClass->limit($value, $limit, $end); + return self::$root->limit($value, $limit, $end); } /** @@ -8400,7 +8482,7 @@ namespace { * @return string */ public static function words($value, $words = '100', $end = '...'){ - return self::$realClass->words($value, $words, $end); + return self::$root->words($value, $words, $end); } /** @@ -8412,7 +8494,7 @@ namespace { * @return string */ public static function plural($value, $count = '2'){ - return self::$realClass->plural($value, $count); + return self::$root->plural($value, $count); } /** @@ -8423,7 +8505,7 @@ namespace { * @return string */ public static function random($length = '16'){ - return self::$realClass->random($length); + return self::$root->random($length); } /** @@ -8435,7 +8517,7 @@ namespace { * @return string */ public static function quickRandom($length = '16'){ - return self::$realClass->quickRandom($length); + return self::$root->quickRandom($length); } /** @@ -8446,7 +8528,7 @@ namespace { * @return string */ public static function singular($value){ - return self::$realClass->singular($value); + return self::$root->singular($value); } /** @@ -8458,7 +8540,7 @@ namespace { * @return string */ public static function slug($title, $separator = '-'){ - return self::$realClass->slug($title, $separator); + return self::$root->slug($title, $separator); } /** @@ -8470,7 +8552,7 @@ namespace { * @return string */ public static function snake($value, $delimiter = '_'){ - return self::$realClass->snake($value, $delimiter); + return self::$root->snake($value, $delimiter); } /** @@ -8482,7 +8564,7 @@ namespace { * @return bool */ public static function startsWith($haystack, $needles){ - return self::$realClass->startsWith($haystack, $needles); + return self::$root->startsWith($haystack, $needles); } /** @@ -8493,7 +8575,7 @@ namespace { * @return string */ public static function studly($value){ - return self::$realClass->studly($value); + return self::$root->studly($value); } } @@ -8502,9 +8584,9 @@ namespace { namespace { class URL{ /** - * @var Illuminate\Routing\UrlGenerator $realClass + * @var Illuminate\Routing\UrlGenerator $root */ - static private $realClass; + static private $root; /** * Create a new URL Generator instance. @@ -8514,7 +8596,7 @@ namespace { * @param Symfony\Component\HttpFoundation\Request $request */ public static function __construct($routes, $request){ - self::$realClass->__construct($routes, $request); + self::$root->__construct($routes, $request); } /** @@ -8524,7 +8606,7 @@ namespace { * @return string */ public static function current(){ - return self::$realClass->current(); + return self::$root->current(); } /** @@ -8534,7 +8616,7 @@ namespace { * @return string */ public static function previous(){ - return self::$realClass->previous(); + return self::$root->previous(); } /** @@ -8547,7 +8629,7 @@ namespace { * @return string */ public static function to($path, $parameters = array(), $secure = null){ - return self::$realClass->to($path, $parameters, $secure); + return self::$root->to($path, $parameters, $secure); } /** @@ -8558,7 +8640,7 @@ namespace { * @return string */ public static function secure($path, $parameters = array()){ - return self::$realClass->secure($path, $parameters); + return self::$root->secure($path, $parameters); } /** @@ -8570,7 +8652,7 @@ namespace { * @return string */ public static function asset($path, $secure = null){ - return self::$realClass->asset($path, $secure); + return self::$root->asset($path, $secure); } /** @@ -8581,7 +8663,7 @@ namespace { * @return string */ public static function secureAsset($path){ - return self::$realClass->secureAsset($path); + return self::$root->secureAsset($path); } /** @@ -8594,7 +8676,7 @@ namespace { * @return string */ public static function route($name, $parameters = array(), $absolute = true){ - return self::$realClass->route($name, $parameters, $absolute); + return self::$root->route($name, $parameters, $absolute); } /** @@ -8607,7 +8689,7 @@ namespace { * @return string */ public static function action($action, $parameters = array(), $absolute = true){ - return self::$realClass->action($action, $parameters, $absolute); + return self::$root->action($action, $parameters, $absolute); } /** @@ -8618,7 +8700,7 @@ namespace { * @return bool */ public static function isValidUrl($path){ - return self::$realClass->isValidUrl($path); + return self::$root->isValidUrl($path); } /** @@ -8628,7 +8710,7 @@ namespace { * @return Symfony\Component\HttpFoundation\Request */ public static function getRequest(){ - return self::$realClass->getRequest(); + return self::$root->getRequest(); } /** @@ -8638,7 +8720,7 @@ namespace { * @param Symfony\Component\HttpFoundation\Request $request */ public static function setRequest($request){ - self::$realClass->setRequest($request); + self::$root->setRequest($request); } /** @@ -8648,7 +8730,7 @@ namespace { * @return Symfony\Component\Routing\Generator\UrlGenerator */ public static function getGenerator(){ - return self::$realClass->getGenerator(); + return self::$root->getGenerator(); } /** @@ -8658,7 +8740,7 @@ namespace { * @param Symfony\Component\Routing\Generator\UrlGenerator $generator */ public static function setGenerator($generator){ - self::$realClass->setGenerator($generator); + self::$root->setGenerator($generator); } } @@ -8667,9 +8749,9 @@ namespace { namespace { class Validator{ /** - * @var Illuminate\Validation\Factory $realClass + * @var Illuminate\Validation\Factory $root */ - static private $realClass; + static private $root; /** * Create a new Validator factory instance. @@ -8678,7 +8760,7 @@ namespace { * @param Symfony\Component\Translation\TranslatorInterface $translator */ public static function __construct($translator){ - self::$realClass->__construct($translator); + self::$root->__construct($translator); } /** @@ -8691,7 +8773,7 @@ namespace { * @return Illuminate\Validation\Validator */ public static function make($data, $rules, $messages = array()){ - return self::$realClass->make($data, $rules, $messages); + return self::$root->make($data, $rules, $messages); } /** @@ -8702,7 +8784,7 @@ namespace { * @param Closure $extension */ public static function extend($rule, $extension){ - self::$realClass->extend($rule, $extension); + self::$root->extend($rule, $extension); } /** @@ -8713,7 +8795,7 @@ namespace { * @param Closure $extension */ public static function extendImplicit($rule, $extension){ - self::$realClass->extendImplicit($rule, $extension); + self::$root->extendImplicit($rule, $extension); } /** @@ -8723,7 +8805,7 @@ namespace { * @param Closure $resolver */ public static function resolver($resolver){ - self::$realClass->resolver($resolver); + self::$root->resolver($resolver); } /** @@ -8733,7 +8815,7 @@ namespace { * @return Symfony\Component\Translation\TranslatorInterface */ public static function getTranslator(){ - return self::$realClass->getTranslator(); + return self::$root->getTranslator(); } /** @@ -8743,7 +8825,7 @@ namespace { * @return Illuminate\Validation\PresenceVerifierInterface */ public static function getPresenceVerifier(){ - return self::$realClass->getPresenceVerifier(); + return self::$root->getPresenceVerifier(); } /** @@ -8753,7 +8835,7 @@ namespace { * @param Illuminate\Validation\PresenceVerifierInterface $presenceVerifier */ public static function setPresenceVerifier($presenceVerifier){ - self::$realClass->setPresenceVerifier($presenceVerifier); + self::$root->setPresenceVerifier($presenceVerifier); } } @@ -8762,9 +8844,9 @@ namespace { namespace { class View{ /** - * @var Illuminate\View\Environment $realClass + * @var Illuminate\View\Environment $root */ - static private $realClass; + static private $root; /** * Create a new view environment instance. @@ -8775,7 +8857,7 @@ namespace { * @param Illuminate\Events\Dispatcher $events */ public static function __construct($engines, $finder, $events){ - self::$realClass->__construct($engines, $finder, $events); + self::$root->__construct($engines, $finder, $events); } /** @@ -8787,7 +8869,7 @@ namespace { * @return Illuminate\View\View */ public static function make($view, $data = array()){ - return self::$realClass->make($view, $data); + return self::$root->make($view, $data); } /** @@ -8798,7 +8880,7 @@ namespace { * @return bool */ public static function exists($view){ - return self::$realClass->exists($view); + return self::$root->exists($view); } /** @@ -8812,7 +8894,7 @@ namespace { * @return string */ public static function renderEach($view, $data, $iterator, $empty = 'raw|'){ - return self::$realClass->renderEach($view, $data, $iterator, $empty); + return self::$root->renderEach($view, $data, $iterator, $empty); } /** @@ -8823,7 +8905,7 @@ namespace { * @param mixed $value */ public static function share($key, $value){ - self::$realClass->share($key, $value); + self::$root->share($key, $value); } /** @@ -8835,7 +8917,7 @@ namespace { * @return Closure */ public static function composer($views, $callback){ - return self::$realClass->composer($views, $callback); + return self::$root->composer($views, $callback); } /** @@ -8845,7 +8927,7 @@ namespace { * @param Illuminate\View\View $view */ public static function callComposer($view){ - self::$realClass->callComposer($view); + self::$root->callComposer($view); } /** @@ -8856,7 +8938,7 @@ namespace { * @param string $content */ public static function startSection($section, $content = ''){ - self::$realClass->startSection($section, $content); + self::$root->startSection($section, $content); } /** @@ -8867,7 +8949,7 @@ namespace { * @param string $content */ public static function inject($section, $content){ - self::$realClass->inject($section, $content); + self::$root->inject($section, $content); } /** @@ -8877,7 +8959,7 @@ namespace { * @return string */ public static function yieldSection(){ - return self::$realClass->yieldSection(); + return self::$root->yieldSection(); } /** @@ -8887,7 +8969,7 @@ namespace { * @return string */ public static function stopSection(){ - return self::$realClass->stopSection(); + return self::$root->stopSection(); } /** @@ -8898,7 +8980,7 @@ namespace { * @return string */ public static function yieldContent($section){ - return self::$realClass->yieldContent($section); + return self::$root->yieldContent($section); } /** @@ -8907,7 +8989,7 @@ namespace { * @static */ public static function flushSections(){ - self::$realClass->flushSections(); + self::$root->flushSections(); } /** @@ -8916,7 +8998,7 @@ namespace { * @static */ public static function incrementRender(){ - self::$realClass->incrementRender(); + self::$root->incrementRender(); } /** @@ -8925,7 +9007,7 @@ namespace { * @static */ public static function decrementRender(){ - self::$realClass->decrementRender(); + self::$root->decrementRender(); } /** @@ -8935,7 +9017,7 @@ namespace { * @return bool */ public static function doneRendering(){ - return self::$realClass->doneRendering(); + return self::$root->doneRendering(); } /** @@ -8945,7 +9027,7 @@ namespace { * @param string $location */ public static function addLocation($location){ - self::$realClass->addLocation($location); + self::$root->addLocation($location); } /** @@ -8956,7 +9038,7 @@ namespace { * @param string|array $hints */ public static function addNamespace($namespace, $hints){ - self::$realClass->addNamespace($namespace, $hints); + self::$root->addNamespace($namespace, $hints); } /** @@ -8968,7 +9050,7 @@ namespace { * @param Closure $resolver */ public static function addExtension($extension, $engine, $resolver = null){ - self::$realClass->addExtension($extension, $engine, $resolver); + self::$root->addExtension($extension, $engine, $resolver); } /** @@ -8978,7 +9060,7 @@ namespace { * @return array */ public static function getExtensions(){ - return self::$realClass->getExtensions(); + return self::$root->getExtensions(); } /** @@ -8988,7 +9070,7 @@ namespace { * @return Illuminate\View\Engines\EngineResolver */ public static function getEngineResolver(){ - return self::$realClass->getEngineResolver(); + return self::$root->getEngineResolver(); } /** @@ -8998,7 +9080,7 @@ namespace { * @return Illuminate\View\ViewFinder */ public static function getFinder(){ - return self::$realClass->getFinder(); + return self::$root->getFinder(); } /** @@ -9008,7 +9090,7 @@ namespace { * @return Illuminate\Events\Dispatcher */ public static function getDispatcher(){ - return self::$realClass->getDispatcher(); + return self::$root->getDispatcher(); } /** @@ -9018,7 +9100,7 @@ namespace { * @return Illuminate\Container */ public static function getContainer(){ - return self::$realClass->getContainer(); + return self::$root->getContainer(); } /** @@ -9028,7 +9110,7 @@ namespace { * @param Illuminate\Container $container */ public static function setContainer($container){ - self::$realClass->setContainer($container); + self::$root->setContainer($container); } /** @@ -9038,7 +9120,7 @@ namespace { * @return array */ public static function getShared(){ - return self::$realClass->getShared(); + return self::$root->getShared(); } /** @@ -9048,7 +9130,7 @@ namespace { * @return array */ public static function getSections(){ - return self::$realClass->getSections(); + return self::$root->getSections(); } } diff --git a/readme.md b/readme.md index f852264..1530f08 100644 --- a/readme.md +++ b/readme.md @@ -23,9 +23,7 @@ You can also publish the config-file to add extra facades (ie. for bundles). php artisan config:publish barryvdh/laravel-ide-helper -You can just add the Facade and the 'real' class, like the rest of the classes. - - 'Basset' => 'Basset\Basset', +The generator tries to identify the real class, but if it cannot be found, you can define it in the config file. You can choose to include helper files. This is not enabled by default, but you can override this with the --helpers (-H) or --nohelpers (-N) option. The Illuminate/Support/helpers.php is already set-up, but you can add/remove your own files in the config file. diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index 7e543ff..9b691e7 100644 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -30,7 +30,10 @@ class GeneratorCommand extends Command { { $filename = $this->argument('filename'); + $this->setupDefaults(); + $aliases = \Config::get('laravel-ide-helper::aliases'); + $aliases += \Config::get('app.aliases'); if( $this->option('helpers') || (\Config::get('laravel-ide-helper::include_helpers') && ! $this->option('nohelpers'))){ $helpers = \Config::get('laravel-ide-helper::helper_files'); @@ -50,6 +53,12 @@ class GeneratorCommand extends Command { } + protected function setupDefaults(){ + //Create memory database driver, to avoid connection errors on Database facades + \Config::set('database.connections.sqlite.database',':memory'); + \Config::set('database.default', 'sqlite'); + } + /** * Get the console command arguments. * @@ -75,14 +84,20 @@ class GeneratorCommand extends Command { ); } - protected function generateDocs($aliases, $helpers){ + protected function generateDocs($aliases, $helpers = array()){ $d = new Parser(); $d->setAllowInherited(true); $d->setMethodFilter(\ReflectionMethod::IS_PUBLIC); $output = " $className){ + foreach($aliases as $alias => $facade){ + + if(method_exists($facade, 'getFacadeRoot')){ + $root = get_class($facade::getFacadeRoot()); + }else{ + $root = $facade; + } if(strpos($alias, '\\') !== false){ $parts = explode('\\', $alias); @@ -92,10 +107,10 @@ class GeneratorCommand extends Command { $namespace = ''; } - $d->analyze($className); + $d->analyze($root); $output .= "namespace $namespace {\n class $alias{\r\n"; - $output .= "\t/**\n\t * @var $className \$realClass\n\t */\n\t static private \$realClass;\n\n"; + $output .= "\t/**\n\t * @var $root \$root\n\t */\n\t static private \$root;\n\n"; $methods = $d->getMethods(); foreach ($methods as $method) @@ -172,7 +187,7 @@ class GeneratorCommand extends Command { } $output .= implode($paramsWithDefault, ", "); - $output .= "){\r\n\t\t".($returnValue !== "void" ? 'return ' : '')."self::\$realClass->".$method->name."(".implode($params, ", ").");\r\n\t }\n\n"; + $output .= "){\r\n\t\t".($returnValue !== "void" ? 'return ' : '')."self::\$root->".$method->name."(".implode($params, ", ").");\r\n\t }\n\n"; return $output; } diff --git a/src/config/config.php b/src/config/config.php index 25aa0e6..1428cf2 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -31,52 +31,19 @@ return array( /* |-------------------------------------------------------------------------- - | Class Aliases + | Custom Facades |-------------------------------------------------------------------------- | - | This array of class aliases will be parsed and added to the helper file. + | These facades cannot be found directly, because of a Manager class. | */ 'aliases' => array( - - 'App' => 'Illuminate\Foundation\Application', - 'Artisan' => 'Illuminate\Foundation\Artisan', 'Auth' => 'Illuminate\Auth\Guard', - 'Blade' => 'Illuminate\View\Compilers\BladeCompiler', 'Cache' => 'Illuminate\Cache\Store', - 'ClassLoader'=> 'Illuminate\Support\ClassLoader', - 'Config' => 'Illuminate\Config\Repository', - 'Controller'=> 'Illuminate\Routing\Controllers\Controller', - 'Cookie' => 'Illuminate\Cookie\CookieJar', - 'Crypt' => 'Illuminate\Encryption\Encrypter', 'DB' => 'Illuminate\Database\Connection', - 'Eloquent' => 'Illuminate\Database\Eloquent\Model', - 'Event' => 'Illuminate\Events\Event', - 'File' => 'Illuminate\Filesystem\Filesystem', - 'Form' => 'Illuminate\Html\FormBuilder', - 'Hash' => 'Illuminate\Hashing\BcryptHasher', - 'Html' => 'Illuminate\Html\HtmlBuilder', - 'Input' => 'Illuminate\Http\Request', - 'Lang' => 'Illuminate\Translation\Translator', - 'Log' => 'Illuminate\Log\Writer', - 'Mail' => 'Illuminate\Mail\Mailer', - 'Paginator' => 'Illuminate\Pagination\Environment', - 'Password' => 'Illuminate\Auth\Reminders\PasswordBroker', 'Queue' => 'Illuminate\Queue\QueueInterface', - 'Redirect' => 'Illuminate\Routing\Redirector', 'Redis' => 'Illuminate\Redis\Database', - 'Request' => 'Illuminate\Http\Request', - 'Response' => 'Illuminate\Http\Response', - 'Route' => 'Illuminate\Routing\Router', - 'Schema' => 'Illuminate\Database\Schema\Builder', - 'Seeder' => 'Illuminate\Database\Seeder', - 'Session' => 'Illuminate\Support\Facades\Session', - 'Str' => 'Illuminate\Support\Str', - 'URL' => 'Illuminate\Routing\UrlGenerator', - 'Validator' => 'Illuminate\Validation\Factory', - 'View' => 'Illuminate\View\Environment', - ), );