Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
845bdc58
Commit
845bdc58
authored
Oct 07, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved config loading performance.
parent
4edcc321
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
core.php
laravel/bootstrap/core.php
+20
-1
config.php
laravel/config.php
+1
-1
No files found.
laravel/bootstrap/core.php
View file @
845bdc58
...
...
@@ -41,7 +41,26 @@ require SYS_PATH.'arr'.EXT;
*/
if
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
{
Config
::
glance
(
CONFIG_PATH
.
$_SERVER
[
'LARAVEL_ENV'
]
.
'/'
);
define
(
'ENV_CONFIG_PATH'
,
CONFIG_PATH
.
$_SERVER
[
'LARAVEL_ENV'
]
.
'/'
);
Config
::
glance
(
ENV_CONFIG_PATH
);
}
/**
* Load some core configuration files by default so we don't have to
* let them fall through the Config loader. This will allow us to
* load these files faster for each request.
*/
foreach
(
array
(
'application'
,
'session'
,
'aliases'
)
as
$file
)
{
$config
=
require
CONFIG_PATH
.
$file
.
EXT
;
if
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
{
$config
=
array_merge
(
$config
,
require
ENV_CONFIG_PATH
.
$file
.
EXT
);
}
Config
::
$items
[
$file
]
=
$config
;
}
/**
...
...
laravel/config.php
View file @
845bdc58
...
...
@@ -16,7 +16,7 @@ class Config {
*
* @var array
*/
p
rotected
static
$items
=
array
();
p
ublic
static
$items
=
array
();
/**
* Determine if a configuration item or file exists.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment