Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
259 changes: 0 additions & 259 deletions src/Illuminate/Config/FileLoader.php

This file was deleted.

52 changes: 0 additions & 52 deletions src/Illuminate/Config/LoaderInterface.php

This file was deleted.

50 changes: 39 additions & 11 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use ReflectionException;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Config\FileLoader;
use Illuminate\Container\Container;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Pipeline;
Expand Down Expand Up @@ -245,6 +244,7 @@ public function setBasePath($basePath)

$this->instance('path.base', $basePath);
$this->instance('path', $basePath.'/app');
$this->instance('path.config', $basePath.'/config');
$this->instance('path.public', $basePath.'/public');
$this->instance('path.storage', $basePath.'/storage');
$this->instance('path.lang', $basePath.'/app/lang');
Expand All @@ -265,6 +265,30 @@ public function useStoragePath($path)
return $this;
}

/**
* Get the path to the application configuration files.
*
* @param string $path
* @return string
*/
public function configPath($path = '')
{
return $this['path.config'].($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
* Set the configuration directory.
*
* @param string $path
* @return $this
*/
public function useConfigPath($path)
{
$this->instance('path.config', $path);

return $this;
}

/**
* Get the path to the resources directory.
*
Expand Down Expand Up @@ -826,6 +850,20 @@ public function booted($callback)
if ($this->isBooted()) $this->fireAppCallbacks(array($callback));
}

/**
* Register a callback to run after a bootstrapper.
*
* The start script fires it for the bootstrapper it runs, LoadConfiguration.
*
* @param string $bootstrapper
* @param \Closure $callback
* @return void
*/
public function afterBootstrapping($bootstrapper, Closure $callback)
{
$this['events']->listen('bootstrapped: '.$bootstrapper, $callback);
}

/**
* Handle the incoming HTTP request and send the response to the browser.
*
Expand Down Expand Up @@ -1054,16 +1092,6 @@ public function abort($code, $message = '', array $headers = array())
throw new HttpException($code, $message, null, $headers);
}

/**
* Get the configuration loader instance.
*
* @return \Illuminate\Config\LoaderInterface
*/
public function getConfigLoader()
{
return new FileLoader(new Filesystem, $this['path'].'/config');
}

/**
* Get the environment variables loader instance.
*
Expand Down
Loading
Loading