Permalink
Browse files

merged skunkworks into develop.

  • Loading branch information...
1 parent 610d882 commit b5442c67fc1e46a27939fcc5c78f8a2be57f74df @taylorotwell taylorotwell committed Jan 16, 2012
Showing with 7,223 additions and 3,954 deletions.
  1. +42 −0 application/bundle.php
  2. +0 −47 application/composers.php
  3. +38 −16 application/config/application.php
  4. +18 −36 application/config/auth.php
  5. +29 −12 application/config/cache.php
  6. +0 −54 application/config/container.php
  7. +22 −26 application/config/database.php
  8. +7 −11 application/config/error.php
  9. 0 {laravel → application}/config/mimes.php
  10. +11 −10 application/config/session.php
  11. +119 −0 application/config/strings.php
  12. +3 −3 application/controllers/home.php
  13. +0 −68 application/filters.php
  14. +2 −2 application/language/en/pagination.php
  15. +8 −7 application/language/en/validation.php
  16. 0 application/migrations/.gitignore
  17. +82 −37 application/routes.php
  18. +0 −1 application/storage/cache/.gitignore
  19. +0 −1 application/storage/sessions/.gitignore
  20. +0 −1 application/storage/views/.gitignore
  21. 0 application/tasks/.gitignore
  22. +49 −0 artisan
  23. 0 bundles/.gitignore
  24. +0 −25 changelog.md
  25. +0 −166 laravel/arr.php
  26. +55 −12 laravel/asset.php
  27. +53 −48 laravel/auth.php
  28. +76 −109 laravel/autoloader.php
  29. +0 −49 laravel/benchmark.php
  30. +1 −9 laravel/blade.php
  31. +294 −0 laravel/bundle.php
  32. +17 −22 laravel/{cache/manager.php → cache.php}
  33. +113 −0 laravel/cache/drivers/database.php
  34. +14 −8 laravel/cache/drivers/driver.php
  35. +2 −5 laravel/cache/drivers/file.php
  36. +62 −0 laravel/cli/artisan.php
  37. +109 −0 laravel/cli/command.php
  38. +127 −0 laravel/cli/tasks/bundle/bundler.php
  39. +27 −0 laravel/cli/tasks/bundle/providers/github.php
  40. +13 −0 laravel/cli/tasks/bundle/providers/provider.php
  41. +90 −0 laravel/cli/tasks/bundle/publisher.php
  42. +29 −0 laravel/cli/tasks/bundle/repository.php
  43. +83 −0 laravel/cli/tasks/migrate/database.php
  44. +235 −0 laravel/cli/tasks/migrate/migrator.php
  45. +159 −0 laravel/cli/tasks/migrate/resolver.php
  46. +25 −0 laravel/cli/tasks/migrate/stub.php
  47. +3 −0 laravel/cli/tasks/task.php
  48. +75 −41 laravel/config.php
  49. +0 −73 laravel/config/ascii.php
  50. +67 −59 laravel/cookie.php
  51. +50 −67 laravel/core.php
  52. +18 −26 laravel/crypter.php
  53. +20 −25 laravel/{database/manager.php → database.php}
  54. +112 −79 laravel/database/connection.php
  55. +2 −2 laravel/database/connectors/connector.php
  56. +2 −2 laravel/database/connectors/mysql.php
  57. +2 −2 laravel/database/connectors/postgres.php
  58. +4 −30 laravel/database/connectors/sqlite.php
  59. +38 −0 laravel/database/connectors/sqlserver.php
  60. +0 −212 laravel/database/eloquent/hydrator.php
  61. +0 −538 laravel/database/eloquent/model.php
  62. +108 −0 laravel/database/grammar.php
  63. +196 −42 laravel/database/query.php
  64. +115 −160 laravel/database/{ → query}/grammars/grammar.php
  65. +2 −2 laravel/database/{ → query}/grammars/mysql.php
  66. +139 −0 laravel/database/query/grammars/sqlserver.php
  67. +119 −0 laravel/database/schema.php
  68. +38 −0 laravel/database/schema/grammars/grammar.php
  69. +386 −0 laravel/database/schema/grammars/mysql.php
  70. +381 −0 laravel/database/schema/grammars/postgres.php
  71. +344 −0 laravel/database/schema/grammars/sqlite.php
  72. +402 −0 laravel/database/schema/grammars/sqlserver.php
  73. +371 −0 laravel/database/schema/table.php
  74. +96 −0 laravel/error.php
  75. +73 −0 laravel/event.php
  76. +0 −66 laravel/facades.php
  77. +2 −26 laravel/file.php
  78. +80 −0 laravel/fluent.php
  79. +12 −23 laravel/form.php
  80. +10 −11 laravel/hash.php
  81. +283 −0 laravel/helpers.php
  82. +12 −49 laravel/html.php
  83. +0 −205 laravel/inflector.php
  84. +69 −47 laravel/input.php
  85. +18 −49 laravel/ioc.php
  86. +63 −54 laravel/lang.php
  87. +56 −82 laravel/laravel.php
  88. +65 −0 laravel/log.php
  89. +14 −18 laravel/memcached.php
  90. +9 −11 laravel/messages.php
  91. +11 −6 laravel/paginator.php
  92. +46 −52 laravel/redirect.php
  93. +4 −4 laravel/redis.php
  94. +14 −15 laravel/request.php
  95. +61 −74 laravel/response.php
  96. +116 −77 laravel/routing/controller.php
  97. +156 −80 laravel/routing/filter.php
  98. +0 −120 laravel/routing/loader.php
  99. +104 −121 laravel/routing/route.php
  100. +153 −118 laravel/routing/router.php
  101. +4 −14 laravel/section.php
  102. +117 −0 laravel/session.php
  103. +1 −1 laravel/session/drivers/database.php
  104. +0 −40 laravel/session/drivers/factory.php
  105. +70 −65 laravel/session/payload.php
  106. +146 −52 laravel/str.php
  107. +14 −16 laravel/uri.php
  108. +66 −132 laravel/url.php
  109. +107 −49 laravel/validator.php
  110. +143 −127 laravel/view.php
  111. 0 public/bundles/.gitignore
  112. +20 −5 public/index.php
  113. 0 storage/cache/.gitignore
  114. 0 {application → }/storage/database/.gitignore
  115. 0 storage/logs/.gitignore
  116. 0 storage/sessions/.gitignore
  117. 0 storage/views/.gitignore
View
@@ -0,0 +1,42 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Auto-Loader PSR-0 Directories
+|--------------------------------------------------------------------------
+|
+| The Laravel auto-loader can search directories for files using the PSR-0
+| naming convention. This convention basically organizes classes by using
+| the class namespace to indicate the directory structure.
+|
+| So you don't have to manually map all of your models, we've added the
+| models and libraries directories for you. So, you can model away and
+| the auto-loader will take care of the rest.
+|
+*/
+
+Autoloader::psr(array(
+ APP_PATH.'models',
+ APP_PATH.'libraries',
+));
+
+/*
+|--------------------------------------------------------------------------
+| Auto-Loader Mappings
+|--------------------------------------------------------------------------
+|
+| Laravel uses a simple array of class to path mappings to drive the class
+| auto-loader. This simple approach helps avoid the performance problems
+| of searching through directories by some kind of convention. It also
+| gives you the freedom to organize your application how you want.
+|
+| Registering a mapping couldn't be easier. Just pass an array of class
+| to path maps into the "map" function of Autoloader. Then, when you
+| want to use that class, just use it. It's a piece of cake.
+|
+*/
+
+Autoloader::map(array(
+ //'User' => APP_PATH.'models/user.php',
+ //'Role' => APP_PATH.'models/role.php',
+));
View
@@ -1,47 +0,0 @@
-<?php
-
-return array(
-
- /*
- |--------------------------------------------------------------------------
- | View Names & Composers
- |--------------------------------------------------------------------------
- |
- | Named views give you beautiful syntax when working with your views.
- |
- | Here's how to define a named view:
- |
- | 'home.index' => array('name' => 'home')
- |
- | Now, you can create an instance of that view using the very expressive
- | View::of dynamic method. Take a look at this example:
- |
- | return View::of_home();
- |
- | View composers provide a convenient way to add common elements to a view
- | each time it is created. For example, you may wish to bind a header and
- | footer partial each time the view is created.
- |
- | The composer will receive an instance of the view being created, and is
- | free to modify the view however you wish. Here is how to define one:
- |
- | 'home.index' => function($view)
- | {
- | //
- | }
- |
- | Of course, you may define a view name and a composer for a single view:
- |
- | 'home.index' => array('name' => 'home', function($view)
- | {
- | //
- | })
- |
- */
-
- 'home.index' => array('name' => 'home', function($view)
- {
- // This composer is called for the "home.index" view.
- }),
-
-);
@@ -7,7 +7,9 @@
| Application URL
|--------------------------------------------------------------------------
|
- | The URL used to access your application. No trailing slash.
+ | The URL used to access your application without a trailing slash. The URL
+ | does nto have to be set. If it isn't we'll try our best to guess the URL
+ | of your application.
|
*/
@@ -20,8 +22,8 @@
|
| 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.
+ | However, if you are using mod_rewrite to get cleaner URLs, just set
+ | this option to an empty string and we'll take care of the rest.
|
*/
@@ -32,11 +34,10 @@
| Application Key
|--------------------------------------------------------------------------
|
- | The application key should be a random, 32 character string.
- |
| This key is used by the encryption and cookie classes to generate secure
| encrypted strings and hashes. It is extremely important that this key
- | remain secret and should not be shared with anyone.
+ | remain secret and should not be shared with anyone. Make it about 32
+ | characters of random gibberish.
|
*/
@@ -48,7 +49,8 @@
|--------------------------------------------------------------------------
|
| The default character encoding used by your application. This encoding
- | will be used by the Str, Text, and Form classes.
+ | will be used by the Str, Text, Form, and any other classes that need
+ | to know what type of encoding to use for your awesome application.
|
*/
@@ -89,14 +91,30 @@
|--------------------------------------------------------------------------
|
| 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 or travelling
+ | to a distant star at warp speed.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
+ | Autoloaded Bundles
+ |--------------------------------------------------------------------------
+ |
+ | Bundles can provide a ton of awesome drop-in functionality for your web
+ | application. Everything from Twitter integration to an admin backend.
+ |
+ | Here you may specify the bundles that should be automatically started
+ | on every request to your application.
+ |
+ */
+
+ 'bundles' => array(),
+
+ /*
+ |--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
@@ -112,36 +130,40 @@
*/
'aliases' => array(
- 'Arr' => 'Laravel\\Arr',
- 'Asset' => 'Laravel\\Asset',
'Auth' => 'Laravel\\Auth',
+ 'Asset' => 'Laravel\\Asset',
'Autoloader' => 'Laravel\\Autoloader',
- 'Benchmark' => 'Laravel\\Benchmark',
- 'Cache' => 'Laravel\\Cache\\Manager',
+ 'Bundle' => 'Laravel\\Bundle',
+ 'Cache' => 'Laravel\\Cache',
'Config' => 'Laravel\\Config',
'Controller' => 'Laravel\\Routing\\Controller',
'Cookie' => 'Laravel\\Cookie',
'Crypter' => 'Laravel\\Crypter',
- 'DB' => 'Laravel\\Database\\Manager',
- 'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
+ 'DB' => 'Laravel\\Database',
+ 'Event' => 'Laravel\\Event',
'File' => 'Laravel\\File',
+ 'Filter' => 'Laravel\\Routing\\Filter',
'Form' => 'Laravel\\Form',
'Hash' => 'Laravel\\Hash',
'HTML' => 'Laravel\\HTML',
- 'Inflector' => 'Laravel\\Inflector',
'Input' => 'Laravel\\Input',
'IoC' => 'Laravel\\IoC',
'Lang' => 'Laravel\\Lang',
+ 'Log' => 'Laravel\\Log',
'Memcached' => 'Laravel\\Memcached',
'Paginator' => 'Laravel\\Paginator',
'URL' => 'Laravel\\URL',
'Redirect' => 'Laravel\\Redirect',
'Redis' => 'Laravel\\Redis',
'Request' => 'Laravel\\Request',
'Response' => 'Laravel\\Response',
+ 'Router' => 'Laravel\\Routing\\Router',
+ 'Schema' => 'Laravel\\Database\\Schema',
'Section' => 'Laravel\\Section',
- 'Session' => 'Laravel\\Facades\\Session',
+ 'Session' => 'Laravel\\Session',
'Str' => 'Laravel\\Str',
+ 'Task' => 'Laravel\\CLI\\Tasks\\Task',
+ 'URI' => 'Laravel\\URI',
'Validator' => 'Laravel\\Validator',
'View' => 'Laravel\\View',
),
@@ -4,43 +4,25 @@
/*
|--------------------------------------------------------------------------
- | Authentication Username
- |--------------------------------------------------------------------------
- |
- } This option should be set to the "username" property of your users.
- | Typically, this will be set to "email" or "username".
- |
- | The value of this property will be used by the "attempt" closure when
- | searching for users by their username. It will also be used when the
- | user is set to be "remembered", as the username is embedded into the
- | encrypted cookie and is used to verify the user's identity.
- |
- */
-
- 'username' => 'email',
-
- /*
- |--------------------------------------------------------------------------
| 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.
+ | This closure is called by the Auth class' "user" method when trying to
+ | retrieve a user by the ID that is stored in their session. If you find
+ | the user, just return the user object, but make sure it has an "id"
+ | property. If you can't find the user, just return null.
|
- | 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.
+ | Of course, a simple and elegant authentication solution has already
+ | been provided for you using the query builder and hashing engine.
+ | We love making your life as easy as possible.
|
*/
'user' => function($id)
{
- if ( ! is_null($id) and filter_var($id, FILTER_VALIDATE_INT) !== false)
+ if (filter_var($id, FILTER_VALIDATE_INT) !== false)
{
- return User::find($id);
+ return DB::table('users')->find($id);
}
},
@@ -50,19 +32,19 @@
|--------------------------------------------------------------------------
|
| 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. It's like a
+ | super buff bouncer to 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.
+ | represents the user being authenticated. As long as it has a property
+ | for the "id", any object will work. If the credentials are not valid,
+ | you don't meed to return anything.
|
*/
- 'attempt' => function($username, $password, $config)
+ 'attempt' => function($username, $password)
{
- $user = User::where($config['username'], '=', $username)->first();
+ $user = DB::table('users')->where_username($username)->first();
if ( ! is_null($user) and Hash::check($password, $user->password))
{
@@ -72,12 +54,12 @@
/*
|--------------------------------------------------------------------------
- | Logout
+ | Logout The Current User
|--------------------------------------------------------------------------
|
| 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.
+ | you are using for authentication or anything else you desire.
|
*/
@@ -7,12 +7,15 @@
| 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 by storing any
+ | commonly accessed data in memory, a file, or some other storage.
|
- | Caching can be used to increase the performance of your application
- | by storing commonly accessed data in memory or in a file.
+ | A variety of awesome drivers are available for you to use with Laravel.
+ | Some, like APC, are extremely fast. However, if that isn't an option
+ | in your environment, try file or database caching.
|
- | Supported Drivers: 'file', 'memcached', 'apc', 'redis'.
+ | Drivers: 'file', 'memcached', 'apc', 'redis', 'database'.
|
*/
@@ -23,25 +26,39 @@
| Cache Key
|--------------------------------------------------------------------------
|
- | This key will be prepended to item keys stored using Memcached and APC to
- | prevent collisions with other applications on the server.
+ | This key will be prepended to item keys stored using Memcached and APC
+ | to prevent collisions with other applications on the server. Since the
+ | memory based stores could be shared by other applications, we need to
+ | be polite and use a prefix to uniquely identifier our items.
|
*/
'key' => 'laravel',
/*
|--------------------------------------------------------------------------
- | Memcached Servers
+ | Cache Database
|--------------------------------------------------------------------------
|
- | The Memcached servers used by your application.
+ | When using the database cache driver, this database table will be used
+ | to store the cached item. You may also add a "connection" option to
+ | the array to specify which database connection should be used.
+ |
+ */
+
+ 'database' => array('table' => 'laravel_cache'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Memcached Servers
+ |--------------------------------------------------------------------------
|
- | 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.
+ | The Memcached servers used by your application. Memcached is a free and
+ | open source, high-performance, distributed memory caching system. It is
+ | generic in nature but intended for use in speeding up web applications
+ | by alleviating database load.
|
- | For more information about Memcached, check out: http://memcached.org
+ | For more information, check out: http://memcached.org
|
*/
Oops, something went wrong.

0 comments on commit b5442c6

Please sign in to comment.