예제 #1
0
 /**
  * Reinitialize the global request.
  * 
  * @return void
  */
 protected function restartRequest()
 {
     // FIXME: Ugly hack, but old contents from previous requests seem to
     // trip up the Foundation class.
     $_FILES = array();
     Request::$foundation = RequestFoundation::createFromGlobals();
 }
예제 #2
0
 /**
  * Set this request's URI to the given string
  * 
  * @param string  $uri
  */
 protected function setRequestUri($uri)
 {
     // FIXME: Ugly hack, but old contents from previous requests seem to
     // trip up the Foundation class.
     $_FILES = array();
     $_SERVER['REQUEST_URI'] = $uri;
     Request::$foundation = RequestFoundation::createFromGlobals();
 }
예제 #3
0
    foreach ($magics as &$magic) {
        $magic = array_strip_slashes($magic);
    }
}
/*
|--------------------------------------------------------------------------
| Create The HttpFoundation Request
|--------------------------------------------------------------------------
|
| Laravel uses the HttpFoundation Symfony component to handle the request
| and response functionality for the framework. This allows us to not
| worry about that boilerplate code and focus on what matters.
|
*/
use Symfony\Component\HttpFoundation\LaravelRequest as RequestFoundation;
Request::$foundation = RequestFoundation::createFromGlobals();
/*
|--------------------------------------------------------------------------
| Determine The Application Environment
|--------------------------------------------------------------------------
|
| Next we're ready to determine the application environment. This may be
| set either via the command line options, or, if the request is from
| the web, via the mapping of URIs to environments that lives in
| the "paths.php" file for the application and is parsed.
|
*/
if (Request::cli()) {
    $environment = get_cli_option('env');
} else {
    $root = Request::foundation()->getRootUrl();