fixed changes.

This commit is contained in:
Taylor Otwell
2011-09-16 20:01:10 -05:00
parent 77dc8d2014
commit 220c359eee
10 changed files with 1072 additions and 983 deletions

View File

@@ -1,52 +1,52 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| 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.
|
| Aliases make it more convenient to use namespaced classes. Instead of
| referring to the class using its full namespace, you may simply use
| the alias defined here.
|
| We have already aliased common Laravel classes to make your life easier.
|
*/
'Arr' => 'Laravel\\Arr',
'Asset' => 'Laravel\\Facades\\Asset',
'Auth' => 'Laravel\\Facades\\Auth',
'Benchmark' => 'Laravel\\Benchmark',
'Cache' => 'Laravel\\Facades\\Cache',
'Config' => 'Laravel\\Facades\\Config',
'Controller' => 'Laravel\\Controller',
'Cookie' => 'Laravel\\Facades\\Cookie',
'Crypter' => 'Laravel\\Facades\\Crypter',
'DB' => 'Laravel\\Facades\\DB',
'Download' => 'Laravel\\Facades\\Download',
'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
'File' => 'Laravel\\Facades\\File',
'Form' => 'Laravel\\Facades\\Form',
'Hasher' => 'Laravel\\Facades\\Hasher',
'HTML' => 'Laravel\\Facades\\HTML',
'Inflector' => 'Laravel\\Inflector',
'Input' => 'Laravel\\Facades\\Input',
'IoC' => 'Laravel\\IoC',
'Lang' => 'Laravel\\Facades\\Lang',
'Loader' => 'Laravel\\Facades\\Loader',
'Package' => 'Laravel\\Facades\\Package',
'URL' => 'Laravel\\Facades\\URL',
'Redirect' => 'Laravel\\Facades\\Redirect',
'Request' => 'Laravel\\Facades\\Request',
'Response' => 'Laravel\\Facades\\Response',
'Session' => 'Laravel\\Facades\\Session',
'Str' => 'Laravel\\Str',
'Validator' => 'Laravel\\Facades\\Validator',
'View' => 'Laravel\\Facades\\View',
<?php
return array(
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| 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.
|
| Aliases make it more convenient to use namespaced classes. Instead of
| referring to the class using its full namespace, you may simply use
| the alias defined here.
|
| We have already aliased common Laravel classes to make your life easier.
|
*/
'Arr' => 'Laravel\\Arr',
'Asset' => 'Laravel\\Facades\\Asset',
'Auth' => 'Laravel\\Facades\\Auth',
'Benchmark' => 'Laravel\\Benchmark',
'Cache' => 'Laravel\\Facades\\Cache',
'Config' => 'Laravel\\Facades\\Config',
'Controller' => 'Laravel\\Controller',
'Cookie' => 'Laravel\\Facades\\Cookie',
'Crypter' => 'Laravel\\Facades\\Crypter',
'DB' => 'Laravel\\Facades\\DB',
'Download' => 'Laravel\\Facades\\Download',
'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
'File' => 'Laravel\\Facades\\File',
'Form' => 'Laravel\\Facades\\Form',
'Hasher' => 'Laravel\\Facades\\Hasher',
'HTML' => 'Laravel\\Facades\\HTML',
'Inflector' => 'Laravel\\Inflector',
'Input' => 'Laravel\\Facades\\Input',
'IoC' => 'Laravel\\IoC',
'Lang' => 'Laravel\\Facades\\Lang',
'Loader' => 'Laravel\\Facades\\Loader',
'Package' => 'Laravel\\Facades\\Package',
'URL' => 'Laravel\\Facades\\URL',
'Redirect' => 'Laravel\\Facades\\Redirect',
'Request' => 'Laravel\\Facades\\Request',
'Response' => 'Laravel\\Facades\\Response',
'Session' => 'Laravel\\Facades\\Session',
'Str' => 'Laravel\\Str',
'Validator' => 'Laravel\\Facades\\Validator',
'View' => 'Laravel\\Facades\\View',
);

View File

@@ -1,98 +1,98 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application. No trailing slash.
|
*/
'url' => 'http://localhost',
/*
|--------------------------------------------------------------------------
| Application Index
|--------------------------------------------------------------------------
|
| 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
| cleaner URLs, set this option to an empty string.
|
*/
'index' => 'index.php',
/*
|--------------------------------------------------------------------------
| Application Language
|--------------------------------------------------------------------------
|
| The default language of your application. This language will be used by
| Lang library as the default language when doing string localization.
|
*/
'language' => 'en',
/*
|--------------------------------------------------------------------------
| Application Character Encoding
|--------------------------------------------------------------------------
|
| The default character encoding used by your application. This is the
| character encoding that will be used by the Str, Text, and Form classes.
|
*/
'encoding' => 'UTF-8',
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| The default timezone of your application. This timezone will be used when
| Laravel needs a date, such as when writing to a log file.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Auto-Loaded Packages
|--------------------------------------------------------------------------
|
| The packages that should be auto-loaded each time Laravel handles
| a request. These should generally be packages that you use on almost
| every request to your application.
|
| Each package specified here will be bootstrapped and can be conveniently
| used by your application's routes, models, and libraries.
|
| Note: The package names in this array should correspond to a package
| directory in application/packages.
|
*/
'packages' => array(),
/*
|--------------------------------------------------------------------------
| Application Key
|--------------------------------------------------------------------------
|
| 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
| secure, encrypted strings.
|
*/
'key' => '',
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application. No trailing slash.
|
*/
'url' => 'http://localhost',
/*
|--------------------------------------------------------------------------
| Application Index
|--------------------------------------------------------------------------
|
| 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
| cleaner URLs, set this option to an empty string.
|
*/
'index' => 'index.php',
/*
|--------------------------------------------------------------------------
| Application Language
|--------------------------------------------------------------------------
|
| The default language of your application. This language will be used by
| Lang library as the default language when doing string localization.
|
*/
'language' => 'en',
/*
|--------------------------------------------------------------------------
| Application Character Encoding
|--------------------------------------------------------------------------
|
| The default character encoding used by your application. This is the
| character encoding that will be used by the Str, Text, and Form classes.
|
*/
'encoding' => 'UTF-8',
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| The default timezone of your application. This timezone will be used when
| Laravel needs a date, such as when writing to a log file.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Auto-Loaded Packages
|--------------------------------------------------------------------------
|
| The packages that should be auto-loaded each time Laravel handles
| a request. These should generally be packages that you use on almost
| every request to your application.
|
| Each package specified here will be bootstrapped and can be conveniently
| used by your application's routes, models, and libraries.
|
| Note: The package names in this array should correspond to a package
| directory in application/packages.
|
*/
'packages' => array(),
/*
|--------------------------------------------------------------------------
| Application Key
|--------------------------------------------------------------------------
|
| 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
| secure, encrypted strings.
|
*/
'key' => '',
);

View File

@@ -1,64 +1,64 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Retrieve The Current User
|--------------------------------------------------------------------------
|
| This closure is called by the Auth::user() method when attempting to
| retrieve a user by their ID stored in the session.
|
| 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
| not need to return anything.
|
| Of course, a simple, elegant authentication solution is already provided
| for you using Eloquent and the default Laravel hashing engine.
|
*/
'user' => function($id)
{
if ( ! is_null($id)) return User::find($id);
},
/*
|--------------------------------------------------------------------------
| Authenticate User Credentials
|--------------------------------------------------------------------------
|
| This closure is called by the Auth::attempt() method when attempting to
| authenticate a user that is logging into your application.
|
| If the provided credentials are correct, simply return an object that
| represents the user being authenticated. If the credentials are not
| valid, don't return anything.
|
| Note: If a user object is returned, it must have an "id" property.
|
*/
'attempt' => function($username, $password)
{
if ( ! is_null($user = User::where('email', '=', $username)->first()))
{
if (Hasher::check($password, $user->password)) return $user;
}
},
/*
|--------------------------------------------------------------------------
| Logout
|--------------------------------------------------------------------------
|
| 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
| you are using for authentication, or anything else you desire.
|
*/
'logout' => function($id) {}
<?php
return array(
/*
|--------------------------------------------------------------------------
| Retrieve The Current User
|--------------------------------------------------------------------------
|
| This closure is called by the Auth::user() method when attempting to
| retrieve a user by their ID stored in the session.
|
| 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
| not need to return anything.
|
| Of course, a simple, elegant authentication solution is already provided
| for you using Eloquent and the default Laravel hashing engine.
|
*/
'user' => function($id)
{
if ( ! is_null($id)) return User::find($id);
},
/*
|--------------------------------------------------------------------------
| Authenticate User Credentials
|--------------------------------------------------------------------------
|
| This closure is called by the Auth::attempt() method when attempting to
| authenticate a user that is logging into your application.
|
| If the provided credentials are correct, simply return an object that
| represents the user being authenticated. If the credentials are not
| valid, don't return anything.
|
| Note: If a user object is returned, it must have an "id" property.
|
*/
'attempt' => function($username, $password)
{
if ( ! is_null($user = User::where('email', '=', $username)->first()))
{
if (Hasher::check($password, $user->password)) return $user;
}
},
/*
|--------------------------------------------------------------------------
| Logout
|--------------------------------------------------------------------------
|
| 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
| you are using for authentication, or anything else you desire.
|
*/
'logout' => function($id) {}
);

View File

@@ -1,52 +1,52 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Cache Driver
|--------------------------------------------------------------------------
|
| The name of the default cache driver for your application.
|
| Caching can be used to increase the performance of your application
| by storing commonly accessed data in memory or in a file.
|
| Supported Drivers: 'file', 'memcached', 'apc'.
|
*/
'driver' => 'file',
/*
|--------------------------------------------------------------------------
| Cache Key
|--------------------------------------------------------------------------
|
| This key will be prepended to item keys stored using Memcached and APC to
| prevent collisions with other applications on the server.
|
*/
'key' => 'laravel',
/*
|--------------------------------------------------------------------------
| Memcached Servers
|--------------------------------------------------------------------------
|
| The Memcached servers used by your application.
|
| Memcached is a free and open source, high-performance, distributed memory
| object caching system, generic in nature, but intended for use in speeding
| up dynamic web applications by alleviating database load.
|
| For more information about Memcached, check out: http://memcached.org
|
*/
'servers' => array(
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
),
<?php
return array(
/*
|--------------------------------------------------------------------------
| Cache Driver
|--------------------------------------------------------------------------
|
| The name of the default cache driver for your application.
|
| Caching can be used to increase the performance of your application
| by storing commonly accessed data in memory or in a file.
|
| Supported Drivers: 'file', 'memcached', 'apc'.
|
*/
'driver' => 'file',
/*
|--------------------------------------------------------------------------
| Cache Key
|--------------------------------------------------------------------------
|
| This key will be prepended to item keys stored using Memcached and APC to
| prevent collisions with other applications on the server.
|
*/
'key' => 'laravel',
/*
|--------------------------------------------------------------------------
| Memcached Servers
|--------------------------------------------------------------------------
|
| The Memcached servers used by your application.
|
| Memcached is a free and open source, high-performance, distributed memory
| object caching system, generic in nature, but intended for use in speeding
| up dynamic web applications by alleviating database load.
|
| For more information about Memcached, check out: http://memcached.org
|
*/
'servers' => array(
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
),
);

View File

@@ -1,82 +1,82 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Database Connection
|--------------------------------------------------------------------------
|
| The name of your default database connection.
|
| This connection will be the default for all database operations unless a
| different connection is specified when performing the operation. The name
| of the default connection should correspond to the name of a connector
| defined below.
|
*/
'default' => 'sqlite',
/*
|--------------------------------------------------------------------------
| Database Connectors
|--------------------------------------------------------------------------
|
| All of the database connectors used by your application.
|
| Each connector should return a PDO connection. You may connect to any
| database system you wish. Of course, default configurations for the
| systems supported by Laravel are provided for you.
|
| The entire database configuration array is passed to the connector
| closure, so you may convenient use it when connecting to your database.
|
| Note: When using an unsupported database, Eloquent and the fluent query
| builder may not work as expected. Currently, MySQL, Postgres, and
| SQLite are fully supported by Laravel.
|
*/
'connectors' => array(
'sqlite' => function($config)
{
return new PDO('sqlite:'.DATABASE_PATH.'application.sqlite', null, null, $config['options']);
},
'mysql' => function($config)
{
return new PDO('mysql:host=localhost;dbname=database', 'root', 'password', $config['options']);
},
'pgsql' => function($config)
{
return new PDO('pgsql:host=localhost;dbname=database', 'root', 'password', $config['options']);
},
),
/*
|--------------------------------------------------------------------------
| Database PDO Options
|--------------------------------------------------------------------------
|
| 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
| database connector closures, so may convenient access these options from
| your connectors.
|
| For a list of options, visit: http://php.net/manual/en/pdo.setattribute.php
|
*/
'options' => array(
PDO::ATTR_CASE => PDO::CASE_LOWER,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
),
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Database Connection
|--------------------------------------------------------------------------
|
| The name of your default database connection.
|
| This connection will be the default for all database operations unless a
| different connection is specified when performing the operation. The name
| of the default connection should correspond to the name of a connector
| defined below.
|
*/
'default' => 'sqlite',
/*
|--------------------------------------------------------------------------
| Database Connectors
|--------------------------------------------------------------------------
|
| All of the database connectors used by your application.
|
| Each connector should return a PDO connection. You may connect to any
| database system you wish. Of course, default configurations for the
| systems supported by Laravel are provided for you.
|
| The entire database configuration array is passed to the connector
| closure, so you may convenient use it when connecting to your database.
|
| Note: When using an unsupported database, Eloquent and the fluent query
| builder may not work as expected. Currently, MySQL, Postgres, and
| SQLite are fully supported by Laravel.
|
*/
'connectors' => array(
'sqlite' => function($config)
{
return new PDO('sqlite:'.DATABASE_PATH.'application.sqlite', null, null, $config['options']);
},
'mysql' => function($config)
{
return new PDO('mysql:host=localhost;dbname=database', 'root', 'password', $config['options']);
},
'pgsql' => function($config)
{
return new PDO('pgsql:host=localhost;dbname=database', 'root', 'password', $config['options']);
},
),
/*
|--------------------------------------------------------------------------
| Database PDO Options
|--------------------------------------------------------------------------
|
| 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
| database connector closures, so may convenient access these options from
| your connectors.
|
| For a list of options, visit: http://php.net/manual/en/pdo.setattribute.php
|
*/
'options' => array(
PDO::ATTR_CASE => PDO::CASE_LOWER,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
),
);

View File

@@ -1,31 +1,31 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Error Handler
|--------------------------------------------------------------------------
|
| Because of the various ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit.
|
| This function will be called when an error occurs in your application.
| You can log the error however you like.
|
| The error "severity" passed to the method is a human-readable severity
| level such as "Parsing Error" or "Fatal Error".
|
| A simple logging system has been setup for you. By default, all errors
| will be logged to the storage/log.txt file.
|
*/
'handler' => function($exception)
{
var_dump($exception);
exit(1);
},
<?php
return array(
/*
|--------------------------------------------------------------------------
| Error Handler
|--------------------------------------------------------------------------
|
| Because of the various ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit.
|
| This function will be called when an error occurs in your application.
| You can log the error however you like.
|
| The error "severity" passed to the method is a human-readable severity
| level such as "Parsing Error" or "Fatal Error".
|
| A simple logging system has been setup for you. By default, all errors
| will be logged to the storage/log.txt file.
|
*/
'handler' => function($exception)
{
var_dump($exception);
exit(1);
},
);

View File

@@ -1,94 +1,94 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Session Driver
|--------------------------------------------------------------------------
|
| The name of the session driver for your application.
|
| Since HTTP is stateless, sessions are used to maintain "state" across
| multiple requests from the same user of your application.
|
| Supported Drivers: 'cookie', 'file', 'database', 'memcached', 'apc'.
|
*/
'driver' => '',
/*
|--------------------------------------------------------------------------
| Session Database
|--------------------------------------------------------------------------
|
| The database table on which the session should be stored.
|
| This option is only relevant when using the "database" session driver.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Garbage Collection Probability
|--------------------------------------------------------------------------
|
| Some session drivers require the manual clean-up of expired sessions.
| This option specifies the probability of session garbage collection
| occuring for any given request.
|
| For example, the default value states that garbage collection has about
| a 2% (2 / 100) chance of occuring for any given request.
|
*/
'sweepage' => array(2, 100),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| The number of minutes a session can be idle before expiring.
|
*/
'lifetime' => 60,
/*
|--------------------------------------------------------------------------
| Session Expiration On Close
|--------------------------------------------------------------------------
|
| Determines if the session should expire when the user's web browser closes.
|
*/
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The path for which the session cookie is available.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| The domain for which the session cookie is available.
|
*/
'domain' => null,
<?php
return array(
/*
|--------------------------------------------------------------------------
| Session Driver
|--------------------------------------------------------------------------
|
| The name of the session driver for your application.
|
| Since HTTP is stateless, sessions are used to maintain "state" across
| multiple requests from the same user of your application.
|
| Supported Drivers: 'cookie', 'file', 'database', 'memcached', 'apc'.
|
*/
'driver' => '',
/*
|--------------------------------------------------------------------------
| Session Database
|--------------------------------------------------------------------------
|
| The database table on which the session should be stored.
|
| This option is only relevant when using the "database" session driver.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Garbage Collection Probability
|--------------------------------------------------------------------------
|
| Some session drivers require the manual clean-up of expired sessions.
| This option specifies the probability of session garbage collection
| occuring for any given request.
|
| For example, the default value states that garbage collection has about
| a 2% (2 / 100) chance of occuring for any given request.
|
*/
'sweepage' => array(2, 100),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| The number of minutes a session can be idle before expiring.
|
*/
'lifetime' => 60,
/*
|--------------------------------------------------------------------------
| Session Expiration On Close
|--------------------------------------------------------------------------
|
| Determines if the session should expire when the user's web browser closes.
|
*/
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The path for which the session cookie is available.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| The domain for which the session cookie is available.
|
*/
'domain' => null,
);