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
220c359e
Commit
220c359e
authored
Sep 17, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed changes.
parent
77dc8d20
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1072 additions
and
983 deletions
+1072
-983
aliases.php
application/config/aliases.php
+51
-51
application.php
application/config/application.php
+97
-97
auth.php
application/config/auth.php
+63
-63
cache.php
application/config/cache.php
+51
-51
database.php
application/config/database.php
+81
-81
error.php
application/config/error.php
+30
-30
session.php
application/config/session.php
+93
-93
bootstrap.php
laravel/bootstrap.php
+70
-70
config.php
laravel/config.php
+188
-99
container.php
laravel/config/container.php
+348
-348
No files found.
application/config/aliases.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Class Aliases
| Class Aliases
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Here, you can specify any class aliases that you would like registered
| Here, you can specify any class aliases that you would like registered
| when Laravel loads. Aliases are lazy-loaded, so add as many as you want.
| when Laravel loads. Aliases are lazy-loaded, so add as many as you want.
|
|
| Aliases make it more convenient to use namespaced classes. Instead of
| Aliases make it more convenient to use namespaced classes. Instead of
| referring to the class using its full namespace, you may simply use
| referring to the class using its full namespace, you may simply use
| the alias defined here.
| the alias defined here.
|
|
| We have already aliased common Laravel classes to make your life easier.
| We have already aliased common Laravel classes to make your life easier.
|
|
*/
*/
'Arr'
=>
'Laravel\\Arr'
,
'Arr'
=>
'Laravel\\Arr'
,
'Asset'
=>
'Laravel\\Facades\\Asset'
,
'Asset'
=>
'Laravel\\Facades\\Asset'
,
'Auth'
=>
'Laravel\\Facades\\Auth'
,
'Auth'
=>
'Laravel\\Facades\\Auth'
,
'Benchmark'
=>
'Laravel\\Benchmark'
,
'Benchmark'
=>
'Laravel\\Benchmark'
,
'Cache'
=>
'Laravel\\Facades\\Cache'
,
'Cache'
=>
'Laravel\\Facades\\Cache'
,
'Config'
=>
'Laravel\\Facades\\Config'
,
'Config'
=>
'Laravel\\Facades\\Config'
,
'Controller'
=>
'Laravel\\Controller'
,
'Controller'
=>
'Laravel\\Controller'
,
'Cookie'
=>
'Laravel\\Facades\\Cookie'
,
'Cookie'
=>
'Laravel\\Facades\\Cookie'
,
'Crypter'
=>
'Laravel\\Facades\\Crypter'
,
'Crypter'
=>
'Laravel\\Facades\\Crypter'
,
'DB'
=>
'Laravel\\Facades\\DB'
,
'DB'
=>
'Laravel\\Facades\\DB'
,
'Download'
=>
'Laravel\\Facades\\Download'
,
'Download'
=>
'Laravel\\Facades\\Download'
,
'Eloquent'
=>
'Laravel\\Database\\Eloquent\\Model'
,
'Eloquent'
=>
'Laravel\\Database\\Eloquent\\Model'
,
'File'
=>
'Laravel\\Facades\\File'
,
'File'
=>
'Laravel\\Facades\\File'
,
'Form'
=>
'Laravel\\Facades\\Form'
,
'Form'
=>
'Laravel\\Facades\\Form'
,
'Hasher'
=>
'Laravel\\Facades\\Hasher'
,
'Hasher'
=>
'Laravel\\Facades\\Hasher'
,
'HTML'
=>
'Laravel\\Facades\\HTML'
,
'HTML'
=>
'Laravel\\Facades\\HTML'
,
'Inflector'
=>
'Laravel\\Inflector'
,
'Inflector'
=>
'Laravel\\Inflector'
,
'Input'
=>
'Laravel\\Facades\\Input'
,
'Input'
=>
'Laravel\\Facades\\Input'
,
'IoC'
=>
'Laravel\\IoC'
,
'IoC'
=>
'Laravel\\IoC'
,
'Lang'
=>
'Laravel\\Facades\\Lang'
,
'Lang'
=>
'Laravel\\Facades\\Lang'
,
'Loader'
=>
'Laravel\\Facades\\Loader'
,
'Loader'
=>
'Laravel\\Facades\\Loader'
,
'Package'
=>
'Laravel\\Facades\\Package'
,
'Package'
=>
'Laravel\\Facades\\Package'
,
'URL'
=>
'Laravel\\Facades\\URL'
,
'URL'
=>
'Laravel\\Facades\\URL'
,
'Redirect'
=>
'Laravel\\Facades\\Redirect'
,
'Redirect'
=>
'Laravel\\Facades\\Redirect'
,
'Request'
=>
'Laravel\\Facades\\Request'
,
'Request'
=>
'Laravel\\Facades\\Request'
,
'Response'
=>
'Laravel\\Facades\\Response'
,
'Response'
=>
'Laravel\\Facades\\Response'
,
'Session'
=>
'Laravel\\Facades\\Session'
,
'Session'
=>
'Laravel\\Facades\\Session'
,
'Str'
=>
'Laravel\\Str'
,
'Str'
=>
'Laravel\\Str'
,
'Validator'
=>
'Laravel\\Facades\\Validator'
,
'Validator'
=>
'Laravel\\Facades\\Validator'
,
'View'
=>
'Laravel\\Facades\\View'
,
'View'
=>
'Laravel\\Facades\\View'
,
);
);
\ No newline at end of file
application/config/application.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Application URL
| Application URL
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The URL used to access your application. No trailing slash.
| The URL used to access your application. No trailing slash.
|
|
*/
*/
'url'
=>
'http://localhost'
,
'url'
=>
'http://localhost'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Application Index
| Application Index
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| If you are including the "index.php" in your URLs, you can ignore this.
| If you are including the "index.php" in your URLs, you can ignore this.
|
|
| However, if you are using mod_rewrite or something similar to get
| However, if you are using mod_rewrite or something similar to get
| cleaner URLs, set this option to an empty string.
| cleaner URLs, set this option to an empty string.
|
|
*/
*/
'index'
=>
'index.php'
,
'index'
=>
'index.php'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Application Language
| Application Language
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The default language of your application. This language will be used by
| The default language of your application. This language will be used by
| Lang library as the default language when doing string localization.
| Lang library as the default language when doing string localization.
|
|
*/
*/
'language'
=>
'en'
,
'language'
=>
'en'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Application Character Encoding
| Application Character Encoding
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The default character encoding used by your application. This is the
| The default character encoding used by your application. This is the
| character encoding that will be used by the Str, Text, and Form classes.
| character encoding that will be used by the Str, Text, and Form classes.
|
|
*/
*/
'encoding'
=>
'UTF-8'
,
'encoding'
=>
'UTF-8'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Application Timezone
| Application Timezone
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The default timezone of your application. This timezone will be used when
| The default timezone of your application. This timezone will be used when
| Laravel needs a date, such as when writing to a log file.
| Laravel needs a date, such as when writing to a log file.
|
|
*/
*/
'timezone'
=>
'UTC'
,
'timezone'
=>
'UTC'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Auto-Loaded Packages
| Auto-Loaded Packages
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The packages that should be auto-loaded each time Laravel handles
| The packages that should be auto-loaded each time Laravel handles
| a request. These should generally be packages that you use on almost
| a request. These should generally be packages that you use on almost
| every request to your application.
| every request to your application.
|
|
| Each package specified here will be bootstrapped and can be conveniently
| Each package specified here will be bootstrapped and can be conveniently
| used by your application's routes, models, and libraries.
| used by your application's routes, models, and libraries.
|
|
| Note: The package names in this array should correspond to a package
| Note: The package names in this array should correspond to a package
| directory in application/packages.
| directory in application/packages.
|
|
*/
*/
'packages'
=>
array
(),
'packages'
=>
array
(),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Application Key
| Application Key
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Your application key should be a 32 character string that is totally
| Your application key should be a 32 character string that is totally
| random and secret. This key is used by the encryption class to generate
| random and secret. This key is used by the encryption class to generate
| secure, encrypted strings.
| secure, encrypted strings.
|
|
*/
*/
'key'
=>
''
,
'key'
=>
''
,
);
);
\ No newline at end of file
application/config/auth.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Retrieve The Current User
| Retrieve The Current User
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| This closure is called by the Auth::user() method when attempting to
| This closure is called by the Auth::user() method when attempting to
| retrieve a user by their ID stored in the session.
| retrieve a user by their ID stored in the session.
|
|
| Simply return an object representing the user with the given ID. Or, if
| Simply return an object representing the user with the given ID. Or, if
| no user with the given ID is registered to use your application, you do
| no user with the given ID is registered to use your application, you do
| not need to return anything.
| not need to return anything.
|
|
| Of course, a simple, elegant authentication solution is already provided
| Of course, a simple, elegant authentication solution is already provided
| for you using Eloquent and the default Laravel hashing engine.
| for you using Eloquent and the default Laravel hashing engine.
|
|
*/
*/
'user'
=>
function
(
$id
)
'user'
=>
function
(
$id
)
{
{
if
(
!
is_null
(
$id
))
return
User
::
find
(
$id
);
if
(
!
is_null
(
$id
))
return
User
::
find
(
$id
);
},
},
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Authenticate User Credentials
| Authenticate User Credentials
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| This closure is called by the Auth::attempt() method when attempting to
| This closure is called by the Auth::attempt() method when attempting to
| authenticate a user that is logging into your application.
| authenticate a user that is logging into your application.
|
|
| If the provided credentials are correct, simply return an object that
| If the provided credentials are correct, simply return an object that
| represents the user being authenticated. If the credentials are not
| represents the user being authenticated. If the credentials are not
| valid, don't return anything.
| valid, don't return anything.
|
|
| Note: If a user object is returned, it must have an "id" property.
| Note: If a user object is returned, it must have an "id" property.
|
|
*/
*/
'attempt'
=>
function
(
$username
,
$password
)
'attempt'
=>
function
(
$username
,
$password
)
{
{
if
(
!
is_null
(
$user
=
User
::
where
(
'email'
,
'='
,
$username
)
->
first
()))
if
(
!
is_null
(
$user
=
User
::
where
(
'email'
,
'='
,
$username
)
->
first
()))
{
{
if
(
Hasher
::
check
(
$password
,
$user
->
password
))
return
$user
;
if
(
Hasher
::
check
(
$password
,
$user
->
password
))
return
$user
;
}
}
},
},
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Logout
| Logout
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Here you may do anything that needs to be done when a user logs out of
| Here you may do anything that needs to be done when a user logs out of
| your application, such as call the logout method on a third-party API
| your application, such as call the logout method on a third-party API
| you are using for authentication, or anything else you desire.
| you are using for authentication, or anything else you desire.
|
|
*/
*/
'logout'
=>
function
(
$id
)
{}
'logout'
=>
function
(
$id
)
{}
);
);
\ No newline at end of file
application/config/cache.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Cache Driver
| Cache Driver
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The name of the default cache driver for your application.
| The name of the default cache driver for your application.
|
|
| Caching can be used to increase the performance of your application
| Caching can be used to increase the performance of your application
| by storing commonly accessed data in memory or in a file.
| by storing commonly accessed data in memory or in a file.
|
|
| Supported Drivers: 'file', 'memcached', 'apc'.
| Supported Drivers: 'file', 'memcached', 'apc'.
|
|
*/
*/
'driver'
=>
'file'
,
'driver'
=>
'file'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Cache Key
| Cache Key
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| This key will be prepended to item keys stored using Memcached and APC to
| This key will be prepended to item keys stored using Memcached and APC to
| prevent collisions with other applications on the server.
| prevent collisions with other applications on the server.
|
|
*/
*/
'key'
=>
'laravel'
,
'key'
=>
'laravel'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Memcached Servers
| Memcached Servers
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The Memcached servers used by your application.
| The Memcached servers used by your application.
|
|
| Memcached is a free and open source, high-performance, distributed memory
| Memcached is a free and open source, high-performance, distributed memory
| object caching system, generic in nature, but intended for use in speeding
| object caching system, generic in nature, but intended for use in speeding
| up dynamic web applications by alleviating database load.
| up dynamic web applications by alleviating database load.
|
|
| For more information about Memcached, check out: http://memcached.org
| For more information about Memcached, check out: http://memcached.org
|
|
*/
*/
'servers'
=>
array
(
'servers'
=>
array
(
array
(
'host'
=>
'127.0.0.1'
,
'port'
=>
11211
,
'weight'
=>
100
),
array
(
'host'
=>
'127.0.0.1'
,
'port'
=>
11211
,
'weight'
=>
100
),
),
),
);
);
\ No newline at end of file
application/config/database.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Default Database Connection
| Default Database Connection
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The name of your default database connection.
| The name of your default database connection.
|
|
| This connection will be the default for all database operations unless a
| This connection will be the default for all database operations unless a
| different connection is specified when performing the operation. The name
| different connection is specified when performing the operation. The name
| of the default connection should correspond to the name of a connector
| of the default connection should correspond to the name of a connector
| defined below.
| defined below.
|
|
*/
*/
'default'
=>
'sqlite'
,
'default'
=>
'sqlite'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Database Connectors
| Database Connectors
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| All of the database connectors used by your application.
| All of the database connectors used by your application.
|
|
| Each connector should return a PDO connection. You may connect to any
| Each connector should return a PDO connection. You may connect to any
| database system you wish. Of course, default configurations for the
| database system you wish. Of course, default configurations for the
| systems supported by Laravel are provided for you.
| systems supported by Laravel are provided for you.
|
|
| The entire database configuration array is passed to the connector
| The entire database configuration array is passed to the connector
| closure, so you may convenient use it when connecting to your database.
| closure, so you may convenient use it when connecting to your database.
|
|
| Note: When using an unsupported database, Eloquent and the fluent query
| Note: When using an unsupported database, Eloquent and the fluent query
| builder may not work as expected. Currently, MySQL, Postgres, and
| builder may not work as expected. Currently, MySQL, Postgres, and
| SQLite are fully supported by Laravel.
| SQLite are fully supported by Laravel.
|
|
*/
*/
'connectors'
=>
array
(
'connectors'
=>
array
(
'sqlite'
=>
function
(
$config
)
'sqlite'
=>
function
(
$config
)
{
{
return
new
PDO
(
'sqlite:'
.
DATABASE_PATH
.
'application.sqlite'
,
null
,
null
,
$config
[
'options'
]);
return
new
PDO
(
'sqlite:'
.
DATABASE_PATH
.
'application.sqlite'
,
null
,
null
,
$config
[
'options'
]);
},
},
'mysql'
=>
function
(
$config
)
'mysql'
=>
function
(
$config
)
{
{
return
new
PDO
(
'mysql:host=localhost;dbname=database'
,
'root'
,
'password'
,
$config
[
'options'
]);
return
new
PDO
(
'mysql:host=localhost;dbname=database'
,
'root'
,
'password'
,
$config
[
'options'
]);
},
},
'pgsql'
=>
function
(
$config
)
'pgsql'
=>
function
(
$config
)
{
{
return
new
PDO
(
'pgsql:host=localhost;dbname=database'
,
'root'
,
'password'
,
$config
[
'options'
]);
return
new
PDO
(
'pgsql:host=localhost;dbname=database'
,
'root'
,
'password'
,
$config
[
'options'
]);
},
},
),
),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Database PDO Options
| Database PDO Options
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Here you may specify the PDO options that should be used when connecting
| Here you may specify the PDO options that should be used when connecting
| to a database. The entire database configuration array is passed to the
| to a database. The entire database configuration array is passed to the
| database connector closures, so may convenient access these options from
| database connector closures, so may convenient access these options from
| your connectors.
| your connectors.
|
|
| For a list of options, visit: http://php.net/manual/en/pdo.setattribute.php
| For a list of options, visit: http://php.net/manual/en/pdo.setattribute.php
|
|
*/
*/
'options'
=>
array
(
'options'
=>
array
(
PDO
::
ATTR_CASE
=>
PDO
::
CASE_LOWER
,
PDO
::
ATTR_CASE
=>
PDO
::
CASE_LOWER
,
PDO
::
ATTR_ERRMODE
=>
PDO
::
ERRMODE_EXCEPTION
,
PDO
::
ATTR_ERRMODE
=>
PDO
::
ERRMODE_EXCEPTION
,
PDO
::
ATTR_ORACLE_NULLS
=>
PDO
::
NULL_NATURAL
,
PDO
::
ATTR_ORACLE_NULLS
=>
PDO
::
NULL_NATURAL
,
PDO
::
ATTR_STRINGIFY_FETCHES
=>
false
,
PDO
::
ATTR_STRINGIFY_FETCHES
=>
false
,
PDO
::
ATTR_EMULATE_PREPARES
=>
false
,
PDO
::
ATTR_EMULATE_PREPARES
=>
false
,
),
),
);
);
\ No newline at end of file
application/config/error.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Error Handler
| Error Handler
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Because of the various ways of managing error logging, you get complete
| Because of the various ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit.
| flexibility to manage error logging as you see fit.
|
|
| This function will be called when an error occurs in your application.
| This function will be called when an error occurs in your application.
| You can log the error however you like.
| You can log the error however you like.
|
|
| The error "severity" passed to the method is a human-readable severity
| The error "severity" passed to the method is a human-readable severity
| level such as "Parsing Error" or "Fatal Error".
| level such as "Parsing Error" or "Fatal Error".
|
|
| A simple logging system has been setup for you. By default, all errors
| A simple logging system has been setup for you. By default, all errors
| will be logged to the storage/log.txt file.
| will be logged to the storage/log.txt file.
|
|
*/
*/
'handler'
=>
function
(
$exception
)
'handler'
=>
function
(
$exception
)
{
{
var_dump
(
$exception
);
var_dump
(
$exception
);
exit
(
1
);
exit
(
1
);
},
},
);
);
\ No newline at end of file
application/config/session.php
View file @
220c359e
<?php
<?php
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Driver
| Session Driver
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The name of the session driver for your application.
| The name of the session driver for your application.
|
|
| Since HTTP is stateless, sessions are used to maintain "state" across
| Since HTTP is stateless, sessions are used to maintain "state" across
| multiple requests from the same user of your application.
| multiple requests from the same user of your application.
|
|
| Supported Drivers: 'cookie', 'file', 'database', 'memcached', 'apc'.
| Supported Drivers: 'cookie', 'file', 'database', 'memcached', 'apc'.
|
|
*/
*/
'driver'
=>
''
,
'driver'
=>
''
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Database
| Session Database
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The database table on which the session should be stored.
| The database table on which the session should be stored.
|
|
| This option is only relevant when using the "database" session driver.
| This option is only relevant when using the "database" session driver.
|
|
*/
*/
'table'
=>
'sessions'
,
'table'
=>
'sessions'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Garbage Collection Probability
| Session Garbage Collection Probability
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Some session drivers require the manual clean-up of expired sessions.
| Some session drivers require the manual clean-up of expired sessions.
| This option specifies the probability of session garbage collection
| This option specifies the probability of session garbage collection
| occuring for any given request.
| occuring for any given request.
|
|
| For example, the default value states that garbage collection has about
| For example, the default value states that garbage collection has about
| a 2% (2 / 100) chance of occuring for any given request.
| a 2% (2 / 100) chance of occuring for any given request.
|
|
*/
*/
'sweepage'
=>
array
(
2
,
100
),
'sweepage'
=>
array
(
2
,
100
),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Lifetime
| Session Lifetime
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The number of minutes a session can be idle before expiring.
| The number of minutes a session can be idle before expiring.
|
|
*/
*/
'lifetime'
=>
60
,
'lifetime'
=>
60
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Expiration On Close
| Session Expiration On Close
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Determines if the session should expire when the user's web browser closes.
| Determines if the session should expire when the user's web browser closes.
|
|
*/
*/
'expire_on_close'
=>
false
,
'expire_on_close'
=>
false
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Cookie Path
| Session Cookie Path
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The path for which the session cookie is available.
| The path for which the session cookie is available.
|
|
*/
*/
'path'
=>
'/'
,
'path'
=>
'/'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Cookie Domain
| Session Cookie Domain
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| The domain for which the session cookie is available.
| The domain for which the session cookie is available.
|
|
*/
*/
'domain'
=>
null
,
'domain'
=>
null
,
);
);
\ No newline at end of file
laravel/bootstrap.php
View file @
220c359e
<?php
namespace
Laravel
;
<?php
namespace
Laravel
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// Define the PHP file extension.
// Define the PHP file extension.
// --------------------------------------------------------------
// --------------------------------------------------------------
define
(
'EXT'
,
'.php'
);
define
(
'EXT'
,
'.php'
);
// --------------------------------------------------------------
// --------------------------------------------------------------
// Define the core framework paths.
// Define the core framework paths.
// --------------------------------------------------------------
// --------------------------------------------------------------
define
(
'APP_PATH'
,
realpath
(
$application
)
.
'/'
);
define
(
'APP_PATH'
,
realpath
(
$application
)
.
'/'
);
define
(
'BASE_PATH'
,
realpath
(
str_replace
(
'laravel'
,
''
,
$laravel
))
.
'/'
);
define
(
'BASE_PATH'
,
realpath
(
str_replace
(
'laravel'
,
''
,
$laravel
))
.
'/'
);
define
(
'PACKAGE_PATH'
,
realpath
(
$packages
)
.
'/'
);
define
(
'PACKAGE_PATH'
,
realpath
(
$packages
)
.
'/'
);
define
(
'PUBLIC_PATH'
,
realpath
(
$public
)
.
'/'
);
define
(
'PUBLIC_PATH'
,
realpath
(
$public
)
.
'/'
);
define
(
'STORAGE_PATH'
,
realpath
(
$storage
)
.
'/'
);
define
(
'STORAGE_PATH'
,
realpath
(
$storage
)
.
'/'
);
define
(
'SYS_PATH'
,
realpath
(
$laravel
)
.
'/'
);
define
(
'SYS_PATH'
,
realpath
(
$laravel
)
.
'/'
);
unset
(
$laravel
,
$application
,
$config
,
$packages
,
$public
,
$storage
);
unset
(
$laravel
,
$application
,
$config
,
$packages
,
$public
,
$storage
);
// --------------------------------------------------------------
// --------------------------------------------------------------
// Define various other framework paths.
// Define various other framework paths.
// --------------------------------------------------------------
// --------------------------------------------------------------
define
(
'CACHE_PATH'
,
STORAGE_PATH
.
'cache/'
);
define
(
'CACHE_PATH'
,
STORAGE_PATH
.
'cache/'
);
define
(
'CONFIG_PATH'
,
APP_PATH
.
'config/'
);
define
(
'CONFIG_PATH'
,
APP_PATH
.
'config/'
);
define
(
'CONTROLLER_PATH'
,
APP_PATH
.
'controllers/'
);
define
(
'CONTROLLER_PATH'
,
APP_PATH
.
'controllers/'
);
define
(
'DATABASE_PATH'
,
STORAGE_PATH
.
'database/'
);
define
(
'DATABASE_PATH'
,
STORAGE_PATH
.
'database/'
);
define
(
'LANG_PATH'
,
APP_PATH
.
'language/'
);
define
(
'LANG_PATH'
,
APP_PATH
.
'language/'
);
define
(
'SESSION_PATH'
,
STORAGE_PATH
.
'sessions/'
);
define
(
'SESSION_PATH'
,
STORAGE_PATH
.
'sessions/'
);
define
(
'SYS_CONFIG_PATH'
,
SYS_PATH
.
'config/'
);
define
(
'SYS_CONFIG_PATH'
,
SYS_PATH
.
'config/'
);
define
(
'SYS_LANG_PATH'
,
SYS_PATH
.
'language/'
);
define
(
'SYS_LANG_PATH'
,
SYS_PATH
.
'language/'
);
define
(
'VIEW_PATH'
,
APP_PATH
.
'views/'
);
define
(
'VIEW_PATH'
,
APP_PATH
.
'views/'
);
// --------------------------------------------------------------
// --------------------------------------------------------------
// Load the configuration manager and its dependencies.
// Load the configuration manager and its dependencies.
// --------------------------------------------------------------
// --------------------------------------------------------------
require
SYS_PATH
.
'facades'
.
EXT
;
require
SYS_PATH
.
'facades'
.
EXT
;
require
SYS_PATH
.
'config'
.
EXT
;
require
SYS_PATH
.
'config'
.
EXT
;
require
SYS_PATH
.
'arr'
.
EXT
;
require
SYS_PATH
.
'arr'
.
EXT
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// Bootstrap the IoC container.
// Bootstrap the IoC container.
// --------------------------------------------------------------
// --------------------------------------------------------------
require
SYS_PATH
.
'container'
.
EXT
;
require
SYS_PATH
.
'container'
.
EXT
;
$dependencies
=
require
SYS_CONFIG_PATH
.
'container'
.
EXT
;
$dependencies
=
require
SYS_CONFIG_PATH
.
'container'
.
EXT
;
if
(
file_exists
(
$path
=
CONFIG_PATH
.
'container'
.
EXT
))
if
(
file_exists
(
$path
=
CONFIG_PATH
.
'container'
.
EXT
))
{
{
$dependencies
=
array_merge
(
$dependencies
,
require
$path
);
$dependencies
=
array_merge
(
$dependencies
,
require
$path
);
}
}
$env
=
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
?
$_SERVER
[
'LARAVEL_ENV'
]
:
null
;
$env
=
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
?
$_SERVER
[
'LARAVEL_ENV'
]
:
null
;
if
(
!
is_null
(
$env
)
and
file_exists
(
$path
=
CONFIG_PATH
.
$env
.
'/container'
.
EXT
))
if
(
!
is_null
(
$env
)
and
file_exists
(
$path
=
CONFIG_PATH
.
$env
.
'/container'
.
EXT
))
{
{
$dependencies
=
array_merge
(
$dependencies
,
require
$path
);
$dependencies
=
array_merge
(
$dependencies
,
require
$path
);
}
}
$container
=
new
Container
(
$dependencies
);
$container
=
new
Container
(
$dependencies
);
IoC
::
$container
=
$container
;
IoC
::
$container
=
$container
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// Register the auto-loader on the auto-loader stack.
// Register the auto-loader on the auto-loader stack.
// --------------------------------------------------------------
// --------------------------------------------------------------
spl_autoload_register
(
array
(
$container
->
resolve
(
'laravel.loader'
),
'load'
));
spl_autoload_register
(
array
(
$container
->
resolve
(
'laravel.loader'
),
'load'
));
// --------------------------------------------------------------
// --------------------------------------------------------------
// Set the application environment configuration option.
// Set the application environment configuration option.
// --------------------------------------------------------------
// --------------------------------------------------------------
$container
->
resolve
(
'laravel.config'
)
->
set
(
'application.env'
,
$env
);
$container
->
resolve
(
'laravel.config'
)
->
set
(
'application.env'
,
$env
);
\ No newline at end of file
laravel/config.php
View file @
220c359e
<?php
namespace
Laravel
;
<?php
namespace
Laravel
;
class
Config
{
class
Config
{
/**
/**
* All of the loaded configuration items.
* All of the loaded configuration items.
*
*
* @var array
* The configuration arrays are keyed by their owning file name.
*/
*
protected
$config
=
array
();
* @var array
*/
/**
protected
$items
=
array
();
* Create a new configuration manager instance.
*
/**
* @param array $config
* The paths to the configuration files.
* @return void
*
*/
* @var array
public
function
__construct
(
$config
)
*/
{
protected
$paths
=
array
();
$this
->
config
=
$config
;
}
/**
* Create a new configuration manager instance.
/**
*
* Determine if a configuration item or file exists.
* @param array $paths
*
* @return void
* <code>
*/
* // Determine if the "options" configuration file exists
public
function
__construct
(
$paths
)
* $options = Config::has('options');
{
*
$this
->
paths
=
$paths
;
* // Determine if a specific configuration item exists
}
* $timezone = Config::has('application.timezone');
* </code>
/**
*
* Determine if a configuration item or file exists.
* @param string $key
*
* @return bool
* <code>
*/
* // Determine if the "options" configuration file exists
public
function
has
(
$key
)
* $options = Config::has('options');
{
*
return
!
is_null
(
$this
->
get
(
$key
));
* // Determine if a specific configuration item exists
}
* $timezone = Config::has('application.timezone');
* </code>
/**
*
* Get a configuration item.
* @param string $key
*
* @return bool
* Configuration items are stored in the application/config directory, and provide
*/
* general configuration options for a wide range of Laravel facilities.
public
function
has
(
$key
)
*
{
* The arrays may be accessed using JavaScript style "dot" notation to drill deep
return
!
is_null
(
$this
->
get
(
$key
));
* intot he configuration files. For example, asking for "database.connectors.sqlite"
}
* would return the connector closure for SQLite stored in the database configuration
* file. If no specific item is specfied, the entire configuration array is returned.
/**
*
* Get a configuration item.
* Like most Laravel "get" functions, a default value may be provided, and it will
*
* be returned if the requested file or item doesn't exist.
* Configuration items are stored in the application/config directory, and provide
*
* general configuration options for a wide range of Laravel facilities.
* <code>
*
* // Get the "timezone" option from the application config file
* The arrays may be accessed using JavaScript style "dot" notation to drill deep
* $timezone = Config::get('application.timezone');
* intot he configuration files. For example, asking for "database.connectors.sqlite"
*
* would return the connector closure for SQLite stored in the database configuration
* // Get an option, but return a default value if it doesn't exist
* file. If no specific item is specfied, the entire configuration array is returned.
* $value = Config::get('some.option', 'Default');
*
* </code>
* Like most Laravel "get" functions, a default value may be provided, and it will
*
* be returned if the requested file or item doesn't exist.
* @param string $key
*
* @param string $default
* <code>
* @return array
* // Get the "timezone" option from the application config file
*/
* $timezone = Config::get('application.timezone');
public
function
get
(
$key
,
$default
=
null
)
*
{
* // Get an option, but return a default value if it doesn't exist
return
Arr
::
get
(
$this
->
items
,
$key
,
$default
);
* $value = Config::get('some.option', 'Default');
}
* </code>
*
/**
* @param string $key
* Set a configuration item.
* @param string $default
*
* @return array
* Configuration items are stored in the application/config directory, and provide
*/
* general configuration options for a wide range of Laravel facilities.
public
function
get
(
$key
,
$default
=
null
)
*
{
* Like the "get" method, this method uses JavaScript style "dot" notation to access
list
(
$file
,
$key
)
=
$this
->
parse
(
$key
);
* and manipulate the arrays in the configuration files. Also, like the "get" method,
* if no specific item is specified, the entire configuration array will be set.
if
(
!
$this
->
load
(
$file
))
*
{
* <code>
return
(
$default
instanceof
\Closure
)
?
call_user_func
(
$default
)
:
$default
;
* // Set the "timezone" option in the "application" array
}
* Config::set('application.timezone', 'America/Chicago');
*
if
(
is_null
(
$key
))
* // Set the entire "session" configuration array
{
* Config::set('session', $array);
return
$this
->
items
[
$file
];
* </code>
}
*
* @param string $key
return
Arr
::
get
(
$this
->
items
[
$file
],
$key
,
$default
);
* @param mixed $value
}
* @return void
*/
/**
public
function
set
(
$key
,
$value
)
* Set a configuration item.
{
*
Arr
::
set
(
$this
->
items
,
$key
,
$value
);
* Configuration items are stored in the application/config directory, and provide
}
* general configuration options for a wide range of Laravel facilities.
*
* Like the "get" method, this method uses JavaScript style "dot" notation to access
* and manipulate the arrays in the configuration files. Also, like the "get" method,
* if no specific item is specified, the entire configuration array will be set.
*
* <code>
* // Set the "timezone" option in the "application" array
* Config::set('application.timezone', 'America/Chicago');
*
* // Set the entire "session" configuration array
* Config::set('session', $array);
* </code>
*
* @param string $key
* @param mixed $value
* @return void
*/
public
function
set
(
$key
,
$value
)
{
list
(
$file
,
$key
)
=
$this
->
parse
(
$key
);
$this
->
load
(
$file
);
if
(
is_null
(
$key
))
{
Arr
::
set
(
$this
->
items
,
$file
,
$value
);
}
else
{
Arr
::
set
(
$this
->
items
[
$file
],
$key
,
$value
);
}
}
/**
* Parse a configuration key and return its file and key segments.
*
* Configuration keys follow a {file}.{key} convention. So, for example, the
* "session.driver" option refers to the "driver" option within the "session"
* configuration file.
*
* If no specific item is specified, such as when requested "session", null will
* be returned as the value of the key since the entire file is being requested.
*
* @param string $key
* @return array
*/
protected
function
parse
(
$key
)
{
$segments
=
explode
(
'.'
,
$key
);
$key
=
(
count
(
$segments
)
>
1
)
?
implode
(
'.'
,
array_slice
(
$segments
,
1
))
:
null
;
return
array
(
$segments
[
0
],
$key
);
}
/**
* Load all of the configuration items from a module configuration file.
*
* If the configuration file has already been loaded into the items array, there
* is no need to load it again, so "true" will be returned immediately.
*
* Configuration files cascade across directories. So, for example, if a configuration
* file is in the system directory, its options will be overriden by a matching file
* in the application directory.
*
* @param string $file
* @return bool
*/
protected
function
load
(
$file
)
{
if
(
isset
(
$this
->
items
[
$file
]))
return
true
;
$config
=
array
();
foreach
(
$this
->
paths
as
$directory
)
{
if
(
file_exists
(
$path
=
$directory
.
$file
.
EXT
))
{
$config
=
array_merge
(
$config
,
require
$path
);
}
}
if
(
count
(
$config
)
>
0
)
{
$this
->
items
[
$file
]
=
$config
;
}
return
isset
(
$this
->
items
[
$file
]);
}
}
}
\ No newline at end of file
laravel/config/container.php
View file @
220c359e
<?php
namespace
Laravel
;
<?php
namespace
Laravel
;
return
array
(
return
array
(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel Components
| Laravel Components
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.asset'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.asset'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Asset
(
$container
->
resolve
(
'laravel.html'
));
return
new
Asset
(
$container
->
resolve
(
'laravel.html'
));
}),
}),
'laravel.auth'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.auth'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Security\Auth
(
$container
->
resolve
(
'laravel.config'
),
$container
->
resolve
(
'laravel.session'
));
return
new
Security\Auth
(
$container
->
resolve
(
'laravel.config'
),
$container
->
resolve
(
'laravel.session'
));
}),
}),
'laravel.config'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.config'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
$paths
=
array
(
SYS_CONFIG_PATH
,
CONFIG_PATH
);
$paths
=
array
(
SYS_CONFIG_PATH
,
CONFIG_PATH
);
if
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
if
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
{
{
$paths
[]
=
CONFIG_PATH
.
$_SERVER
[
'LARAVEL_ENV'
]
.
'/'
;
$paths
[]
=
CONFIG_PATH
.
$_SERVER
[
'LARAVEL_ENV'
]
.
'/'
;
}
}
return
new
Config
(
$paths
);
return
new
Config
(
$paths
);
}),
}),
'laravel.crypter'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.crypter'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$key
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.key'
);
$key
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.key'
);
return
new
Security\Crypter
(
MCRYPT_RIJNDAEL_256
,
'cbc'
,
$key
);
return
new
Security\Crypter
(
MCRYPT_RIJNDAEL_256
,
'cbc'
,
$key
);
}),
}),
'laravel.cookie'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
()
'laravel.cookie'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
()
{
{
return
new
Cookie
(
$_COOKIE
);
return
new
Cookie
(
$_COOKIE
);
}),
}),
'laravel.database'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.database'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Database\Manager
(
$container
->
resolve
(
'laravel.config'
)
->
get
(
'database'
));
return
new
Database\Manager
(
$container
->
resolve
(
'laravel.config'
)
->
get
(
'database'
));
}),
}),
'laravel.download'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.download'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Download
(
$container
->
resolve
(
'laravel.file'
));
return
new
Download
(
$container
->
resolve
(
'laravel.file'
));
}),
}),
'laravel.file'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.file'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
File
(
$container
->
resolve
(
'laravel.config'
)
->
get
(
'mimes'
));
return
new
File
(
$container
->
resolve
(
'laravel.config'
)
->
get
(
'mimes'
));
}),
}),
'laravel.form'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.form'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
list
(
$request
,
$html
,
$url
)
=
array
(
list
(
$request
,
$html
,
$url
)
=
array
(
$container
->
resolve
(
'laravel.request'
),
$container
->
resolve
(
'laravel.request'
),
$container
->
resolve
(
'laravel.html'
),
$container
->
resolve
(
'laravel.html'
),
$container
->
resolve
(
'laravel.url'
),
$container
->
resolve
(
'laravel.url'
),
);
);
return
new
Form
(
$request
,
$html
,
$url
);
return
new
Form
(
$request
,
$html
,
$url
);
}),
}),
'laravel.hasher'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.hasher'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Security\Hashing\Bcrypt
(
8
);
return
new
Security\Hashing\Bcrypt
(
8
);
}),
}),
'laravel.html'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.html'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
HTML
(
$container
->
resolve
(
'laravel.url'
),
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.encoding'
));
return
new
HTML
(
$container
->
resolve
(
'laravel.url'
),
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.encoding'
));
}),
}),
'laravel.input'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.input'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
$request
=
$container
->
resolve
(
'laravel.request'
);
$request
=
$container
->
resolve
(
'laravel.request'
);
$input
=
array
();
$input
=
array
();
if
(
$request
->
method
()
==
'GET'
)
if
(
$request
->
method
()
==
'GET'
)
{
{
$input
=
$_GET
;
$input
=
$_GET
;
}
}
elseif
(
$request
->
method
()
==
'POST'
)
elseif
(
$request
->
method
()
==
'POST'
)
{
{
$input
=
$_POST
;
$input
=
$_POST
;
}
}
elseif
(
$request
->
method
()
==
'PUT'
or
$request
->
method
==
'DELETE'
)
elseif
(
$request
->
method
()
==
'PUT'
or
$request
->
method
==
'DELETE'
)
{
{
(
$request
->
spoofed
())
?
$input
=
$_POST
:
parse_str
(
file_get_contents
(
'php://input'
),
$input
);
(
$request
->
spoofed
())
?
$input
=
$_POST
:
parse_str
(
file_get_contents
(
'php://input'
),
$input
);
}
}
unset
(
$input
[
'_REQUEST_METHOD_'
]);
unset
(
$input
[
'_REQUEST_METHOD_'
]);
return
new
Input
(
$container
->
resolve
(
'laravel.file'
),
$container
->
resolve
(
'laravel.cookie'
),
$input
,
$_FILES
);
return
new
Input
(
$container
->
resolve
(
'laravel.file'
),
$container
->
resolve
(
'laravel.cookie'
),
$input
,
$_FILES
);
}),
}),
'laravel.lang'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.lang'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
require_once
SYS_PATH
.
'lang'
.
EXT
;
require_once
SYS_PATH
.
'lang'
.
EXT
;
return
new
Lang_Factory
(
$container
->
resolve
(
'laravel.config'
),
array
(
SYS_LANG_PATH
,
LANG_PATH
));
return
new
Lang_Factory
(
$container
->
resolve
(
'laravel.config'
),
array
(
SYS_LANG_PATH
,
LANG_PATH
));
}),
}),
'laravel.loader'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.loader'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
require_once
SYS_PATH
.
'loader'
.
EXT
;
require_once
SYS_PATH
.
'loader'
.
EXT
;
$aliases
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'aliases'
);
$aliases
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'aliases'
);
return
new
Loader
(
array
(
BASE_PATH
,
APP_PATH
.
'models/'
,
APP_PATH
.
'libraries/'
),
$aliases
);
return
new
Loader
(
array
(
BASE_PATH
,
APP_PATH
.
'models/'
,
APP_PATH
.
'libraries/'
),
$aliases
);
}),
}),
'laravel.package'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
()
'laravel.package'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
()
{
{
return
new
Package
(
PACKAGE_PATH
);
return
new
Package
(
PACKAGE_PATH
);
}),
}),
'laravel.redirect'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.redirect'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Redirect
(
$container
->
resolve
(
'laravel.url'
));
return
new
Redirect
(
$container
->
resolve
(
'laravel.url'
));
}),
}),
'laravel.request'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.request'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Request
(
$_SERVER
,
$_POST
,
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.url'
));
return
new
Request
(
$_SERVER
,
$_POST
,
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.url'
));
}),
}),
'laravel.response'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.response'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
require_once
SYS_PATH
.
'response'
.
EXT
;
require_once
SYS_PATH
.
'response'
.
EXT
;
return
new
Response_Factory
(
$container
->
resolve
(
'laravel.view'
),
$container
->
resolve
(
'laravel.file'
));
return
new
Response_Factory
(
$container
->
resolve
(
'laravel.view'
),
$container
->
resolve
(
'laravel.file'
));
}),
}),
'laravel.routing.router'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.routing.router'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Routing\Router
(
require
APP_PATH
.
'routes'
.
EXT
,
CONTROLLER_PATH
);
return
new
Routing\Router
(
require
APP_PATH
.
'routes'
.
EXT
,
CONTROLLER_PATH
);
}),
}),
'laravel.routing.caller'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.routing.caller'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
return
new
Routing\Caller
(
$container
,
require
APP_PATH
.
'filters'
.
EXT
,
CONTROLLER_PATH
);
return
new
Routing\Caller
(
$container
,
require
APP_PATH
.
'filters'
.
EXT
,
CONTROLLER_PATH
);
}),
}),
'laravel.session.manager'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$c
)
'laravel.session.manager'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$c
)
{
{
$config
=
$c
->
resolve
(
'laravel.config'
);
$config
=
$c
->
resolve
(
'laravel.config'
);
$driver
=
$c
->
resolve
(
'laravel.session.'
.
$config
->
get
(
'session.driver'
));
$driver
=
$c
->
resolve
(
'laravel.session.'
.
$config
->
get
(
'session.driver'
));
return
new
Session\Manager
(
$driver
,
$c
->
resolve
(
'laravel.session.transporter'
),
$config
);
return
new
Session\Manager
(
$driver
,
$c
->
resolve
(
'laravel.session.transporter'
),
$config
);
}),
}),
'laravel.session.transporter'
=>
array
(
'resolver'
=>
function
(
$c
)
'laravel.session.transporter'
=>
array
(
'resolver'
=>
function
(
$c
)
{
{
return
new
Session\Transporters\Cookie
(
$c
->
resolve
(
'laravel.cookie'
));
return
new
Session\Transporters\Cookie
(
$c
->
resolve
(
'laravel.cookie'
));
}),
}),
'laravel.url'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.url'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
list
(
$request
,
$base
,
$index
)
=
array
(
list
(
$request
,
$base
,
$index
)
=
array
(
$container
->
resolve
(
'laravel.request'
),
$container
->
resolve
(
'laravel.request'
),
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.url'
),
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.url'
),
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.index'
),
$container
->
resolve
(
'laravel.config'
)
->
get
(
'application.index'
),
);
);
return
new
URL
(
$container
->
resolve
(
'laravel.routing.router'
),
$base
,
$index
,
$request
->
secure
());
return
new
URL
(
$container
->
resolve
(
'laravel.routing.router'
),
$base
,
$index
,
$request
->
secure
());
}),
}),
'laravel.validator'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.validator'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
require_once
SYS_PATH
.
'validation/validator'
.
EXT
;
require_once
SYS_PATH
.
'validation/validator'
.
EXT
;
return
new
Validation\Validator_Factory
(
$container
->
resolve
(
'laravel.lang'
));
return
new
Validation\Validator_Factory
(
$container
->
resolve
(
'laravel.lang'
));
}),
}),
'laravel.view'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.view'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
require_once
SYS_PATH
.
'view'
.
EXT
;
require_once
SYS_PATH
.
'view'
.
EXT
;
return
new
View_Factory
(
$container
->
resolve
(
'laravel.view.composer'
),
VIEW_PATH
);
return
new
View_Factory
(
$container
->
resolve
(
'laravel.view.composer'
),
VIEW_PATH
);
}),
}),
'laravel.view.composer'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.view.composer'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
return
new
View_Composer
(
require
APP_PATH
.
'composers'
.
EXT
);
return
new
View_Composer
(
require
APP_PATH
.
'composers'
.
EXT
);
}),
}),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel Cookie Session Components
| Laravel Cookie Session Components
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.session.cookie'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.session.cookie'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$cookies
=
$container
->
resolve
(
'laravel.cookie'
);
$cookies
=
$container
->
resolve
(
'laravel.cookie'
);
$config
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session'
);
$config
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session'
);
return
new
Session\Drivers\Cookie
(
$container
->
resolve
(
'laravel.crypter'
),
$cookies
);
return
new
Session\Drivers\Cookie
(
$container
->
resolve
(
'laravel.crypter'
),
$cookies
);
}),
}),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel Database Session Components
| Laravel Database Session Components
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.session.database'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.session.database'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$table
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.table'
);
$table
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.table'
);
return
new
Session\Drivers\Database
(
$container
->
resolve
(
'laravel.database'
)
->
connection
());
return
new
Session\Drivers\Database
(
$container
->
resolve
(
'laravel.database'
)
->
connection
());
}),
}),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel Cache Manager
| Laravel Cache Manager
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.cache'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.cache'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
new
Cache\Manager
(
$container
,
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.driver'
));
return
new
Cache\Manager
(
$container
,
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.driver'
));
}),
}),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel File Cache & Session Components
| Laravel File Cache & Session Components
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.cache.file'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.cache.file'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
return
new
Cache\Drivers\File
(
$container
->
resolve
(
'laravel.file'
),
CACHE_PATH
);
return
new
Cache\Drivers\File
(
$container
->
resolve
(
'laravel.file'
),
CACHE_PATH
);
}),
}),
'laravel.session.file'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.session.file'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
return
new
Session\Drivers\File
(
$container
->
resolve
(
'laravel.file'
),
SESSION_PATH
);
return
new
Session\Drivers\File
(
$container
->
resolve
(
'laravel.file'
),
SESSION_PATH
);
}),
}),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel APC Cache & Session Components
| Laravel APC Cache & Session Components
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.cache.apc'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.cache.apc'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
return
new
Cache\Drivers\APC
(
new
Proxy
,
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.key'
));
return
new
Cache\Drivers\APC
(
new
Proxy
,
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.key'
));
}),
}),
'laravel.session.id'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.session.id'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
return
$container
->
resolve
(
'laravel.cookie'
)
->
get
(
'laravel_session'
);
return
$container
->
resolve
(
'laravel.cookie'
)
->
get
(
'laravel_session'
);
}),
}),
'laravel.session.apc'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.session.apc'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$lifetime
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.lifetime'
);
$lifetime
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.lifetime'
);
return
new
Session\Drivers\APC
(
$container
->
resolve
(
'laravel.cache.apc'
));
return
new
Session\Drivers\APC
(
$container
->
resolve
(
'laravel.cache.apc'
));
}),
}),
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Laravel Memcached Cache & Session Components
| Laravel Memcached Cache & Session Components
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'laravel.cache.memcached'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.cache.memcached'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$connection
=
$container
->
resolve
(
'laravel.cache.memcache.connection'
);
$connection
=
$container
->
resolve
(
'laravel.cache.memcache.connection'
);
$key
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.key'
);
$key
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.key'
);
return
new
Cache\Drivers\Memcached
(
$connection
,
$key
);
return
new
Cache\Drivers\Memcached
(
$connection
,
$key
);
}),
}),
'laravel.session.memcached'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.session.memcached'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$lifetime
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.lifetime'
);
$lifetime
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.lifetime'
);
return
new
Session\Drivers\Memcached
(
$container
->
resolve
(
'laravel.cache.memcached'
));
return
new
Session\Drivers\Memcached
(
$container
->
resolve
(
'laravel.cache.memcached'
));
}),
}),
'laravel.cache.memcache.connection'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
'laravel.cache.memcache.connection'
=>
array
(
'singleton'
=>
true
,
'resolver'
=>
function
(
$container
)
{
{
if
(
!
class_exists
(
'Memcache'
))
if
(
!
class_exists
(
'Memcache'
))
{
{
throw
new
\Exception
(
'Attempting to use Memcached, but the Memcache PHP extension is not installed on this server.'
);
throw
new
\Exception
(
'Attempting to use Memcached, but the Memcache PHP extension is not installed on this server.'
);
}
}
$memcache
=
new
\Memcache
;
$memcache
=
new
\Memcache
;
foreach
(
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.servers'
)
as
$server
)
foreach
(
$container
->
resolve
(
'laravel.config'
)
->
get
(
'cache.servers'
)
as
$server
)
{
{
$memcache
->
addServer
(
$server
[
'host'
],
$server
[
'port'
],
true
,
$server
[
'weight'
]);
$memcache
->
addServer
(
$server
[
'host'
],
$server
[
'port'
],
true
,
$server
[
'weight'
]);
}
}
if
(
$memcache
->
getVersion
()
===
false
)
if
(
$memcache
->
getVersion
()
===
false
)
{
{
throw
new
\Exception
(
'Memcached is configured. However, no connections could be made. Please verify your memcached configuration.'
);
throw
new
\Exception
(
'Memcached is configured. However, no connections could be made. Please verify your memcached configuration.'
);
}
}
return
$memcache
;
return
$memcache
;
}),
}),
);
);
\ No newline at end of file
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