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
79c58652
Commit
79c58652
authored
Sep 26, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on the core bootstrap comments.
parent
d57af216
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
51 deletions
+37
-51
core.php
laravel/bootstrap/core.php
+36
-39
config.php
laravel/config.php
+1
-12
No files found.
laravel/bootstrap/core.php
View file @
79c58652
<?php
namespace
Laravel
;
// --------------------------------------------------------------
// Define the PHP file extensions.
// --------------------------------------------------------------
define
(
'EXT'
,
'.php'
);
define
(
'BLADE_EXT'
,
'.blade.php'
);
// --------------------------------------------------------------
// Define the core framework paths.
// --------------------------------------------------------------
/**
* Define core framework paths and constants.
*/
define
(
'APP_PATH'
,
realpath
(
$application
)
.
'/'
);
define
(
'BASE_PATH'
,
realpath
(
str_replace
(
'laravel'
,
''
,
$laravel
))
.
'/'
);
define
(
'PACKAGE_PATH'
,
realpath
(
$packages
)
.
'/'
);
...
...
@@ -18,9 +12,6 @@ define('SYS_PATH', realpath($laravel).'/');
unset
(
$laravel
,
$application
,
$config
,
$packages
,
$public
,
$storage
);
// --------------------------------------------------------------
// Define various other framework paths.
// --------------------------------------------------------------
define
(
'CACHE_PATH'
,
STORAGE_PATH
.
'cache/'
);
define
(
'CONFIG_PATH'
,
APP_PATH
.
'config/'
);
define
(
'CONTROLLER_PATH'
,
APP_PATH
.
'controllers/'
);
...
...
@@ -32,54 +23,60 @@ define('SYS_CONFIG_PATH', SYS_PATH.'config/');
define
(
'SYS_LANG_PATH'
,
SYS_PATH
.
'language/'
);
define
(
'VIEW_PATH'
,
APP_PATH
.
'views/'
);
// --------------------------------------------------------------
// Load the configuration manager and its dependencies.
// --------------------------------------------------------------
define
(
'EXT'
,
'.php'
);
define
(
'BLADE_EXT'
,
'.blade.php'
);
/**
* Load the classes that can't be resolved through the auto-loader.
* Typically, these are classes that are used by the auto-loader
* or configuration classes.
*/
require
SYS_PATH
.
'facades'
.
EXT
;
require
SYS_PATH
.
'config'
.
EXT
;
require
SYS_PATH
.
'loader'
.
EXT
;
require
SYS_PATH
.
'arr'
.
EXT
;
// --------------------------------------------------------------
// Determine the application environment.
// --------------------------------------------------------------
/**
* Determine the application environment. The environment is typically
* set by an environment variable on the server.
*/
$environment
=
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
?
$_SERVER
[
'LARAVEL_ENV'
]
:
null
;
// --------------------------------------------------------------
// Register the configuration file paths.
// --------------------------------------------------------------
$config
=
array
(
SYS_CONFIG_PATH
,
CONFIG_PATH
);
if
(
!
is_null
(
$environment
))
$config
[]
=
CONFIG_PATH
.
$environment
.
'/'
;
/**
* Register the path to the configuration files.
*/
$configs
=
array
(
SYS_CONFIG_PATH
,
CONFIG_PATH
);
Config
::
paths
(
$config
)
;
if
(
!
is_null
(
$environment
))
$configs
[]
=
CONFIG_PATH
.
$environment
.
'/'
;
// --------------------------------------------------------------
// Set a few core configuration options.
// --------------------------------------------------------------
Config
::
set
(
'view.path'
,
VIEW_PATH
);
Config
::
$paths
=
$configs
;
// --------------------------------------------------------------
// Bootstrap the IoC container.
// --------------------------------------------------------------
/**
* Bootstrap the application inversion of control (IoC) container.
* The container provides the convenient resolution of objects and
* their dependencies, allowing for flexibility and testability
* within the framework.
*/
require
SYS_PATH
.
'container'
.
EXT
;
$container
=
new
Container
(
Config
::
get
(
'container'
));
IoC
::
$container
=
$container
;
// --------------------------------------------------------------
// Register the auto-loader on the auto-loader stack.
// --------------------------------------------------------------
/**
* Register the application auto-loader. The auto-loader is responsible
* for the lazy-loading of all of the Laravel core classes, as well as
* the developer created libraries and models.
*/
spl_autoload_register
(
array
(
'Laravel\\Loader'
,
'load'
));
Loader
::
$paths
=
array
(
BASE_PATH
,
APP_PATH
.
'models/'
,
APP_PATH
);
Loader
::
$paths
=
array
(
BASE_PATH
,
APP_PATH
.
'models/'
,
APP_PATH
.
'libraries/'
,
APP_PATH
);
Loader
::
$aliases
=
Config
::
get
(
'aliases'
);
/
/ --------------------------------------------------------------
// Define some
convenient global functions.
// --------------------------------------------------------------
/
**
* Define a few
convenient global functions.
*/
function
e
(
$value
)
{
return
HTML
::
entities
(
$value
);
...
...
laravel/config.php
View file @
79c58652
...
...
@@ -16,18 +16,7 @@ class Config {
*
* @var array
*/
protected
static
$paths
=
array
();
/**
* Set the paths in which the configuration files are located.
*
* @param array $paths
* @return void
*/
public
static
function
paths
(
$paths
)
{
static
::
$paths
=
$paths
;
}
public
static
$paths
=
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