Skip to content
This repository
Browse code

going lithium

  • Loading branch information...
commit e7f3c3137a4c543223b59f61e41b2f5dedbb7bb0 1 parent 4579838
GWoo gwoo authored

Showing 203 changed files with 28,902 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  .gitignore
  2. +5 0 .htaccess
  3. +5 0 app/.htaccess
  4. +208 0 app/config/bootstrap.php
  5. +78 0 app/config/connections.php
  6. +57 0 app/config/environments.php
  7. +31 0 app/config/environments/development.php
  8. +40 0 app/config/routes.php
  9. 0  app/config/schema/empty
  10. +63 0 app/config/switchboard.php
  11. +22 0 app/controllers/HelloWorldController.php
  12. +30 0 app/controllers/PagesController.php
  13. 0  app/extensions/adapters/empty
  14. 0  app/extensions/behaviors/empty
  15. 0  app/extensions/commands/empty
  16. 0  app/extensions/components/empty
  17. 0  app/extensions/data/sources/empty
  18. 0  app/extensions/g11n/empty
  19. 0  app/extensions/helpers/empty
  20. +15 0 app/index.php
  21. 0  app/libraries/empty
  22. 0  app/models/empty
  23. 0  app/tests/cases/controllers/empty
  24. 0  app/tests/cases/extensions/adapters/empty
  25. 0  app/tests/cases/extensions/behaviors/empty
  26. 0  app/tests/cases/extensions/commands/empty
  27. 0  app/tests/cases/extensions/components/empty
  28. 0  app/tests/cases/extensions/data_sources/empty
  29. 0  app/tests/cases/extensions/helpers/empty
  30. 0  app/tests/cases/models/empty
  31. 0  app/tests/fixtures/empty
  32. 0  app/tests/groups/empty
  33. 0  app/tmp/cache/empty
  34. 0  app/tmp/logs/empty
  35. 0  app/views/elements/empty
  36. +1 0  app/views/hello_world/index.html.php
  37. +15 0 app/views/layouts/default.ajax.php
  38. +22 0 app/views/layouts/default.email.html.php
  39. +15 0 app/views/layouts/default.email.txt.php
  40. +31 0 app/views/layouts/default.html.php
  41. +14 0 app/views/layouts/default.xml.php
  42. +33 0 app/views/layouts/flash.html.php
  43. +27 0 app/views/pages/home.html.php
  44. +7 0 app/webroot/.htaccess
  45. +33 0 app/webroot/css/base.css
  46. +281 0 app/webroot/css/debug.css
  47. BIN  app/webroot/favicon.ico
  48. 0  app/webroot/img/empty
  49. +28 0 app/webroot/index.php
  50. +1 0  app/webroot/js/empty
  51. +139 0 app/webroot/test.php
  52. +25 0 libraries/lithium/LICENSE.txt
  53. +215 0 libraries/lithium/action/Controller.php
  54. +172 0 libraries/lithium/action/Dispatcher.php
  55. +360 0 libraries/lithium/action/Request.php
  56. +133 0 libraries/lithium/action/Response.php
  57. +326 0 libraries/lithium/console/Command.php
  58. +145 0 libraries/lithium/console/Dispatcher.php
  59. +126 0 libraries/lithium/console/Request.php
  60. +107 0 libraries/lithium/console/Response.php
  61. +68 0 libraries/lithium/console/Router.php
  62. +31 0 libraries/lithium/console/commands/Docs.php
  63. +104 0 libraries/lithium/console/commands/G11n.php
  64. +19 0 libraries/lithium/console/commands/Generate.php
  65. +173 0 libraries/lithium/console/commands/Test.php
  66. +53 0 libraries/lithium/console/commands/docs/Generator.php
  67. +80 0 libraries/lithium/console/commands/docs/Todo.php
  68. +19 0 libraries/lithium/console/commands/generate/Component.php
  69. +19 0 libraries/lithium/console/commands/generate/Controller.php
  70. +19 0 libraries/lithium/console/commands/generate/Model.php
  71. +19 0 libraries/lithium/console/commands/generate/View.php
  72. +23 0 libraries/lithium/console/li3
  73. +55 0 libraries/lithium/console/lithium.php
  74. +10 0 libraries/lithium/console/templates/docs/header.txt.php
  75. +97 0 libraries/lithium/core/Adaptable.php
  76. +94 0 libraries/lithium/core/Environment.php
  77. +496 0 libraries/lithium/core/Libraries.php
  78. +183 0 libraries/lithium/core/Object.php
  79. +198 0 libraries/lithium/core/StaticObject.php
  80. +92 0 libraries/lithium/data/Connections.php
  81. +405 0 libraries/lithium/data/Model.php
  82. +65 0 libraries/lithium/data/Source.php
  83. +130 0 libraries/lithium/data/model/Query.php
  84. +49 0 libraries/lithium/data/model/Record.php
  85. +303 0 libraries/lithium/data/model/RecordSet.php
  86. +485 0 libraries/lithium/data/source/Database.php
  87. +246 0 libraries/lithium/data/source/Http.php
  88. +267 0 libraries/lithium/data/source/database/adapter/MySql.php
  89. +29 0 libraries/lithium/data/source/http/adapter/Curl.php
  90. +17 0 libraries/lithium/data/source/http/adapter/Stream.php
  91. +161 0 libraries/lithium/g11n/Catalog.php
  92. +134 0 libraries/lithium/g11n/Locale.php
  93. +103 0 libraries/lithium/g11n/Message.php
  94. +126 0 libraries/lithium/g11n/catalog/adapters/Base.php
  95. +120 0 libraries/lithium/g11n/catalog/adapters/Cldr.php
  96. +144 0 libraries/lithium/g11n/catalog/adapters/Code.php
  97. +355 0 libraries/lithium/g11n/catalog/adapters/Gettext.php
  98. +79 0 libraries/lithium/g11n/catalog/adapters/Memory.php
  99. +95 0 libraries/lithium/http/Base.php
  100. +270 0 libraries/lithium/http/Media.php
  101. +170 0 libraries/lithium/http/Request.php
  102. +201 0 libraries/lithium/http/Response.php
  103. +233 0 libraries/lithium/http/Route.php
  104. +95 0 libraries/lithium/http/Router.php
  105. +953 0 libraries/lithium/http/Socket.php
  106. +174 0 libraries/lithium/storage/Cache.php
  107. +183 0 libraries/lithium/storage/Session.php
  108. +92 0 libraries/lithium/storage/cache/adapters/Apc.php
  109. +100 0 libraries/lithium/storage/cache/adapters/File.php
  110. +124 0 libraries/lithium/storage/cache/adapters/Memcache.php
  111. +83 0 libraries/lithium/storage/cache/adapters/Memory.php
  112. +74 0 libraries/lithium/storage/session/adapters/Cookie.php
  113. +57 0 libraries/lithium/storage/session/adapters/Memory.php
  114. +53 0 libraries/lithium/storage/session/adapters/Php.php
  115. +133 0 libraries/lithium/template/Helper.php
  116. +91 0 libraries/lithium/template/View.php
  117. +151 0 libraries/lithium/template/helpers/Form.php
  118. +343 0 libraries/lithium/template/helpers/Html.php
  119. +302 0 libraries/lithium/template/view/Renderer.php
  120. +100 0 libraries/lithium/template/view/Stream.php
  121. +104 0 libraries/lithium/template/view/adapters/File.php
  122. +61 0 libraries/lithium/template/view/adapters/Simple.php
  123. +177 0 libraries/lithium/test/Dispatcher.php
  124. +79 0 libraries/lithium/test/Group.php
  125. +19 0 libraries/lithium/test/Reporter.php
  126. +618 0 libraries/lithium/test/Unit.php
  127. +291 0 libraries/lithium/test/filters/Coverage.php
  128. +209 0 libraries/lithium/test/filters/Profiler.php
  129. +259 0 libraries/lithium/tests/cases/action/ControllerTest.php
  130. +54 0 libraries/lithium/tests/cases/action/RequestTest.php
  131. +150 0 libraries/lithium/tests/cases/action/ResponseTest.php
  132. +223 0 libraries/lithium/tests/cases/console/CommandTest.php
  133. +95 0 libraries/lithium/tests/cases/console/DispatcherTest.php
  134. +135 0 libraries/lithium/tests/cases/console/RequestTest.php
  135. +112 0 libraries/lithium/tests/cases/console/ResponseTest.php
  136. +81 0 libraries/lithium/tests/cases/console/RouterTest.php
  137. +22 0 libraries/lithium/tests/cases/console/commands/GenerateTest.php
  138. +98 0 libraries/lithium/tests/cases/core/EnvironmentTest.php
  139. +146 0 libraries/lithium/tests/cases/core/LibrariesTest.php
  140. +179 0 libraries/lithium/tests/cases/core/ObjectTest.php
  141. +133 0 libraries/lithium/tests/cases/core/StaticObjectTest.php
  142. +115 0 libraries/lithium/tests/cases/data/ConnectionsTest.php
  143. +149 0 libraries/lithium/tests/cases/data/ModelTest.php
  144. +65 0 libraries/lithium/tests/cases/data/model/QueryTest.php
  145. +63 0 libraries/lithium/tests/cases/data/model/RecordSetTest.php
  146. +68 0 libraries/lithium/tests/cases/data/model/RecordTest.php
  147. +87 0 libraries/lithium/tests/cases/data/source/DatabaseTest.php
  148. +209 0 libraries/lithium/tests/cases/data/source/HttpTest.php
  149. +115 0 libraries/lithium/tests/cases/data/source/database/adapter/MySqlTest.php
  150. +73 0 libraries/lithium/tests/cases/data/source/http/adapter/CurlTest.php
  151. +93 0 libraries/lithium/tests/cases/data/source/http/adapter/StreamTest.php
  152. +461 0 libraries/lithium/tests/cases/g11n/CatalogTest.php
  153. +285 0 libraries/lithium/tests/cases/g11n/LocaleTest.php
  154. +72 0 libraries/lithium/tests/cases/g11n/MessageTest.php
  155. +67 0 libraries/lithium/tests/cases/g11n/catalog/adapters/CldrTest.php
  156. +95 0 libraries/lithium/tests/cases/g11n/catalog/adapters/CodeTest.php
  157. +71 0 libraries/lithium/tests/cases/g11n/catalog/adapters/GettextTest.php
  158. +84 0 libraries/lithium/tests/cases/http/BaseTest.php
  159. +145 0 libraries/lithium/tests/cases/http/RequestTest.php
  160. +96 0 libraries/lithium/tests/cases/http/ResponseTest.php
  161. +321 0 libraries/lithium/tests/cases/http/RouteTest.php
  162. +235 0 libraries/lithium/tests/cases/http/RouterTest.php
  163. +255 0 libraries/lithium/tests/cases/storage/CacheTest.php
  164. +180 0 libraries/lithium/tests/cases/storage/SessionTest.php
  165. +263 0 libraries/lithium/tests/cases/storage/cache/adapters/ApcTest.php
  166. +126 0 libraries/lithium/tests/cases/storage/cache/adapters/FileTest.php
  167. +265 0 libraries/lithium/tests/cases/storage/cache/adapters/MemcacheTest.php
  168. +88 0 libraries/lithium/tests/cases/template/HelperTest.php
  169. +37 0 libraries/lithium/tests/cases/template/ViewTest.php
  170. +130 0 libraries/lithium/tests/cases/template/helpers/FormTest.php
  171. +509 0 libraries/lithium/tests/cases/template/helpers/HtmlTest.php
  172. +155 0 libraries/lithium/tests/cases/template/view/RendererTest.php
  173. +30 0 libraries/lithium/tests/cases/template/view/adapters/SimpleTest.php
  174. +116 0 libraries/lithium/tests/cases/test/GroupTest.php
  175. +21 0 libraries/lithium/tests/cases/test/ReporterTest.php
  176. +100 0 libraries/lithium/tests/cases/test/UnitTest.php
  177. +246 0 libraries/lithium/tests/cases/util/CollectionTest.php
  178. +321 0 libraries/lithium/tests/cases/util/InflectorTest.php
  179. +2,070 0 libraries/lithium/tests/cases/util/SetTest.php
  180. +347 0 libraries/lithium/tests/cases/util/StringTest.php
  181. +840 0 libraries/lithium/tests/cases/util/ValidatorTest.php
  182. +87 0 libraries/lithium/tests/cases/util/audit/LoggerTest.php
  183. +16 0 libraries/lithium/tests/cases/util/audit/adapters/FileTest.php
  184. +182 0 libraries/lithium/tests/cases/util/reflection/InspectorTest.php
  185. +137 0 libraries/lithium/tests/cases/util/reflection/ParserTest.php
  186. +96 0 libraries/lithium/tests/cases/util/socket/CurlTest.php
  187. +93 0 libraries/lithium/tests/cases/util/socket/StreamTest.php
  188. +222 0 libraries/lithium/util/Collection.php
  189. +449 0 libraries/lithium/util/Inflector.php
  190. +898 0 libraries/lithium/util/Set.php
  191. +52 0 libraries/lithium/util/Socket.php
  192. +336 0 libraries/lithium/util/String.php
  193. +831 0 libraries/lithium/util/Validator.php
  194. +100 0 libraries/lithium/util/audit/Debugger.php
  195. +56 0 libraries/lithium/util/audit/Logger.php
  196. +39 0 libraries/lithium/util/audit/logger/adapters/File.php
  197. +52 0 libraries/lithium/util/collection/Filters.php
  198. +27 0 libraries/lithium/util/reflection/Coverage.php
  199. +104 0 libraries/lithium/util/reflection/Docblock.php
  200. +385 0 libraries/lithium/util/reflection/Inspector.php
  201. +273 0 libraries/lithium/util/reflection/Parser.php
  202. +91 0 libraries/lithium/util/socket/Curl.php
  203. +104 0 libraries/lithium/util/socket/Stream.php
2  .gitignore
... ... @@ -0,0 +1,2 @@
  1 +.DS_Store
  2 +app/libraries/plugins/*
5 .htaccess
... ... @@ -0,0 +1,5 @@
  1 +<IfModule mod_rewrite.c>
  2 + RewriteEngine on
  3 + RewriteRule ^$ app/webroot/ [L]
  4 + RewriteRule (.*) app/webroot/$1 [L]
  5 +</IfModule>
5 app/.htaccess
... ... @@ -0,0 +1,5 @@
  1 +<IfModule mod_rewrite.c>
  2 + RewriteEngine on
  3 + RewriteRule ^$ webroot/ [L]
  4 + RewriteRule (.*) webroot/$1 [L]
  5 + </IfModule>
208 app/config/bootstrap.php
... ... @@ -0,0 +1,208 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +namespace lithium;
  14 +
  15 +use \lithium\core\Environment;
  16 +use \lithium\core\Libraries;
  17 +
  18 +/**
  19 + * This is the path to the class libraries used by your application, and must contain a copy of the
  20 + * Lithium core. By default, this directory is named 'libraries', and resides in the same
  21 + * directory as your application. If you use the same libraries in multiple applications, you can
  22 + * set this to a shared path on your server.
  23 + */
  24 +define('LITHIUM_LIBRARY_PATH', dirname(dirname(__DIR__)) . '/libraries');
  25 +
  26 +/**
  27 + * This is the path to your application's directory. It contains all the sub-folders for your
  28 + * application's classes and files. You don't need to change this unless your webroot folder is
  29 + * stored outside of your app folder.
  30 + */
  31 +define('LITHIUM_APP_PATH', dirname(__DIR__));
  32 +
  33 +/**
  34 + * Locate and load Lithium core library files. Throws a fatal error if the core can't be found.
  35 + * If your Lithium core directory is named something other than 'lithium', change the string below.
  36 + */
  37 +if (!include LITHIUM_LIBRARY_PATH . '/lithium/core/Libraries.php') {
  38 + $message = "Lithium core could not be found. Check the value of LITHIUM_LIBRARY_PATH in ";
  39 + $message .= "config/bootstrap.php. It should point to the directory containing your ";
  40 + $message .= "/libraries directory.";
  41 + trigger_error($message, E_USER_ERROR);
  42 +}
  43 +
  44 +/**
  45 + * Add the Lithium core library. This sets default paths and initializes the autoloader. You
  46 + * generally should not need to override any settings.
  47 + */
  48 +Libraries::add('lithium');
  49 +
  50 +/**
  51 + * Optimize default request cycle by loading common classes. If you're implementing custom
  52 + * request/response or dispatch classes, you can safely remove these. Actually, you can safely
  53 + * remove them anyway, they're just there to give slightly you better out-of-the-box performance.
  54 + */
  55 +require LITHIUM_LIBRARY_PATH . '/lithium/core/Object.php';
  56 +require LITHIUM_LIBRARY_PATH . '/lithium/core/StaticObject.php';
  57 +require LITHIUM_LIBRARY_PATH . '/lithium/util/Collection.php';
  58 +require LITHIUM_LIBRARY_PATH . '/lithium/util/collection/Filters.php';
  59 +require LITHIUM_LIBRARY_PATH . '/lithium/util/Inflector.php';
  60 +require LITHIUM_LIBRARY_PATH . '/lithium/util/Set.php';
  61 +require LITHIUM_LIBRARY_PATH . '/lithium/util/String.php';
  62 +require LITHIUM_LIBRARY_PATH . '/lithium/core/Environment.php';
  63 +require LITHIUM_LIBRARY_PATH . '/lithium/http/Base.php';
  64 +require LITHIUM_LIBRARY_PATH . '/lithium/http/Media.php';
  65 +require LITHIUM_LIBRARY_PATH . '/lithium/http/Request.php';
  66 +require LITHIUM_LIBRARY_PATH . '/lithium/http/Response.php';
  67 +require LITHIUM_LIBRARY_PATH . '/lithium/http/Route.php';
  68 +require LITHIUM_LIBRARY_PATH . '/lithium/action/Controller.php';
  69 +require LITHIUM_LIBRARY_PATH . '/lithium/action/Dispatcher.php';
  70 +require LITHIUM_LIBRARY_PATH . '/lithium/action/Request.php';
  71 +require LITHIUM_LIBRARY_PATH . '/lithium/action/Response.php';
  72 +require LITHIUM_LIBRARY_PATH . '/lithium/template/View.php';
  73 +require LITHIUM_LIBRARY_PATH . '/lithium/template/view/Renderer.php';
  74 +
  75 +/**
  76 + * Add the application. You can pass a `'path'` key here if this bootstrap file is outside of
  77 + * your main application, but generally you should not need to change any settings.
  78 + */
  79 +Libraries::add('app');
  80 +
  81 +/**
  82 + * Add some plugins
  83 + */
  84 +// Libraries::add('plugin', 'docs');
  85 +
  86 +/**
  87 + * This configures your session storage. The Cookie storage adapter must be connected first, since
  88 + * it intercepts any writes where the `'expires'` key is set in the options array. When creating a
  89 + * new application, it is suggested that you change the value of `'key'` below.
  90 + */
  91 +
  92 +/**
  93 +* Session configuration
  94 +*/
  95 +// use \lithium\storage\Session;
  96 +//
  97 +// Session::config(array(
  98 +// 'cookie' => array(
  99 +// 'adapter' => 'Cookie',
  100 +// 'name' => 'AppCookieName',
  101 +// 'expires' => '+5 days',
  102 +// 'domain' => '',
  103 +// 'path' => '/',
  104 +// 'filters' => array(
  105 +// // 'Encryption' => array('key' => '0409448a5206980ab15682c3281c1a3b1fb10c55')
  106 +// )
  107 +// ),
  108 +// 'default' => array('adapter' => 'Php', 'filters' => array())
  109 +// ));
  110 +
  111 +/**
  112 + * To enable admin or plugin routing, uncomment the following lines, and see `app/config/routes.php`
  113 + * to enable the admin routing namespace.
  114 + */
  115 +// use \lithium\action\Dispatcher;
  116 +//
  117 +// Dispatcher::config(array('rules' => array(
  118 +// 'admin' => array('action' => 'admin_{:action}'),
  119 +// 'plugin' => array('controller' => '{:plugin}.{:controller}')
  120 +// )));
  121 +
  122 +/**
  123 + * Uncomment to set globalization defaults. A locale consists of a language and
  124 + * an optional territory code i.e. `'en_US'` or `'en'`. For timezone specify
  125 + * a valid timezone identifier i.e. `'America/New_York'` or `'Etc/UTC'`. You may
  126 + * also specify additional sources for retrieving translated and messages and
  127 + * localized data or add rules, formats, messages or lists data right here.
  128 + */
  129 +// use \lithium\g11n\G11n;
  130 +//
  131 +// G11n::locale('en');
  132 +// G11n::timezone('Etc/UTC');
  133 +// G11n::sources(LITHIUM_APP_PATH . '/extensions/g11n');
  134 +// G11n::rules('plural', array('en' => function($n) { return $n != 1 ? 1 : 0; }));
  135 +
  136 +/*
  137 + * Inflector configuration example. If your application has custom singular or plural rules, or
  138 + * extra non-ASCII characters to transliterate, you can configure that by uncommenting the lines
  139 + * below.
  140 + */
  141 +// use lithium\util\Inflector;
  142 +//
  143 +// Inflector::rules("plural", array(
  144 +// '/(s)tatus$/i' => '\1\2tatuses',
  145 +// '/^(ox)$/i' => '\1\2en',
  146 +// '/([m|l])ouse$/i' => '\1ice'
  147 +// ));
  148 +//
  149 +// Inflector::rules("uninflectedPlural", array('.*[nrlm]ese', '.*deer', '.*ois', '.*pox'));
  150 +//
  151 +// Inflector::rules("irregularPlural", array('atlas' => 'atlases', 'brother' => 'brothers'));
  152 +//
  153 +// Inflector::rules("singular", array(
  154 +// '/(s)tatuses$/i' => '\1\2tatus',
  155 +// '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i'
  156 +// ));
  157 +
  158 +/**
  159 + * Globalization (g11n) catalog configuration. The catalog allows for obtaining and
  160 + * writing globalized data. Each configuration can be adjusted through the following settings:
  161 + *
  162 + * - `'adapter' The name of a supported adapter. The builtin adapters are _memory_ (a
  163 + * simple adapter good for runtime data and testing), _gettext_, _cldr_ (for
  164 + * interfacing with Unicode's common locale data repository) and _code_ (used mainly for
  165 + * extracting message templates from source code).
  166 + *
  167 + * - `'path'` All adapters with the exception of the _memory_ adapter require a directory
  168 + * which holds the data.
  169 + *
  170 + * - `'scope'` If you plan on using scoping i.e. for accessing plugin data separately you
  171 + * need to specify a scope for each configuration, except for those using the _memory_ or
  172 + * _gettext_ adapter which handle this internally.
  173 + */
  174 +// use lithium\g11n\Catalog;
  175 +//
  176 +// Catalog::config(array(
  177 +// 'runtime' => array('adapter' => 'Memory'),
  178 +// 'app' => array('adapter' => 'Gettext', 'path' => LITHIUM_APP_PATH . '/resources/po'),
  179 +// 'lithium' => array('adapter' => 'Gettext', 'path' => LITHIUM_LIBRARY_PATH . '/lithium/resources/po')
  180 +// ));
  181 +
  182 +/**
  183 + * Globalization runtime data. You can add globalized data during runtime utilizing a
  184 + * configuration set up to use the _memory_ adapter.
  185 + */
  186 +// $data = array('en' => function($n) { return $n != 1 ? 1 : 0; });
  187 +// Catalog::write('message.plural', $data, array('name' => 'runtime'));
  188 +
  189 +/**
  190 + * Enabling globalization integration. Classes in the framework are designed with
  191 + * globalization in mind. To enable globalization for these classes we just need to pass
  192 + * the needed data into them.
  193 + */
  194 +// use lithium\util\Validator;
  195 +// use lithium\util\Inflector;
  196 +//
  197 +// Validator::add('postalCode',
  198 +// Catalog::read('validation.postalCode', array('en_US'))
  199 +// );
  200 +// Inflector::rules('transliterations',
  201 +// Catalog::read('inflection.transliteration', array('en'))
  202 +// );
  203 +
  204 +/**
  205 + * Your custom code goes here.
  206 + */
  207 +
  208 +?>
78 app/config/connections.php
... ... @@ -0,0 +1,78 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +use \lithium\data\Connections;
  14 +
  15 +/**
  16 + * Database configuration.
  17 + * You can specify multiple configurations for production, development and testing.
  18 + *
  19 + * adapter => The name of a supported driver; valid options are as follows:
  20 + * mysql - MySQL 4 & 5,
  21 + * mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
  22 + * sqlite - SQLite (PHP5 only),
  23 + * postgres - PostgreSQL 7 and higher,
  24 + * mssql - Microsoft SQL Server 2000 and higher,
  25 + * db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2)
  26 + * oracle - Oracle 8 and higher
  27 + * firebird - Firebird/Interbase
  28 + * sybase - Sybase ASE
  29 + *
  30 + * You can add custom database drivers (or override existing drivers) by adding the
  31 + * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php',
  32 + * where 'x' is the name of the database.
  33 + *
  34 + * persistent => true / false
  35 + * Determines whether or not the database should use a persistent connection.
  36 + *
  37 + * host =>
  38 + * the host you connect to the database. To add a socket or port number, use 'port' => #
  39 + *
  40 + * prefix =>
  41 + * Uses the given prefix for all the tables in this database. This setting can be overridden
  42 + * on a per-table basis with the Model::$_meta['prefix'] property.
  43 + *
  44 + * schema =>
  45 + * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres
  46 + * defaults to 'public', DB2 defaults to empty.
  47 + *
  48 + * encoding =>
  49 + * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting
  50 + * to the database. Defaults to 'UTF-8' for DB2. Uses database default for all others.
  51 + */
  52 +Connections::add('default', 'Database', array(
  53 + // 'development' => array(
  54 + 'adapter' => 'MySql',
  55 + 'host' => 'localhost',
  56 + 'login' => 'root',
  57 + 'password' => '',
  58 + 'database' => 'lithium-blog'
  59 + // 'adapter' => 'sqlite',
  60 + // 'database' => LITHIUM_APP_PATH . '/tmp/default.db'
  61 + // ),
  62 + // 'test' => array(
  63 + // 'adapter' => 'mysql',
  64 + // 'host' => 'localhost',
  65 + // 'login' => 'user',
  66 + // 'password' => 'password',
  67 + // 'database' => 'test_database_name'
  68 + // ),
  69 + // 'production' => array(
  70 + // 'adapter' => 'mysql',
  71 + // 'host' => 'localhost',
  72 + // 'login' => 'user',
  73 + // 'password' => 'password',
  74 + // 'database' => 'test_database_name'
  75 + // )
  76 +));
  77 +
  78 +?>
57 app/config/environments.php
... ... @@ -0,0 +1,57 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +use \lithium\core\Libraries;
  14 +use \lithium\core\Environment;
  15 +
  16 +/*
  17 + * Set up the "development" environment
  18 + */
  19 +Environment::set("development", array(
  20 + "Output.varDump" => true, // Writes output from pr() and debug()
  21 + "Output.sqlDump" => true, // Writes SQL log at the bottom of the page
  22 + "Output.timestamp.enabled" => true, // Output the page generation time
  23 + "Output.timestamp.format" => "<!-- %01.4fs -->", // Page generation time output format string
  24 + "Cache.enabled" => true,
  25 + "Cache.expires" => "+10 seconds",
  26 + "Asset.compress" => false,
  27 + "Asset.timestamp" => true
  28 +));
  29 +
  30 +/*
  31 + * Set the current environment to "development"
  32 + */
  33 +
  34 +Environment::set("development");
  35 +
  36 +/*
  37 + * Inflector configuration example
  38 + */
  39 +// Inflector::add("plural", array(
  40 +// '/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice'
  41 +// ));
  42 +// Inflector::add("uninflectedPlural", array(
  43 +// '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox'
  44 +// ));
  45 +// Inflector::add("irregularPlural", array(
  46 +// 'atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers'
  47 +// ));
  48 +// Inflector::add("singular", array(
  49 +// '/(s)tatuses$/i' => '\1\2tatus', '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i'
  50 +// ));
  51 +
  52 +/*
  53 + * Paths configuration example
  54 + */
  55 +// Libraries::addPluginPath("/path/to/more/plugins");
  56 +
  57 +?>
31 app/config/environments/development.php
... ... @@ -0,0 +1,31 @@
  1 +<?php
  2 +
  3 +use \lithium\core\Libraries;
  4 +use \lithium\core\Environment;
  5 +
  6 +/*
  7 + * Set up the "development" environment
  8 + */
  9 +Environment::set("development", array(
  10 + "Output.varDump" => true, // Writes output from pr() and debug()
  11 + "Output.sqlDump" => true, // Writes SQL log at the bottom of the page
  12 + "Output.timestamp.enabled" => true, // Output the page generation time
  13 + "Output.timestamp.format" => "<!-- %01.4fs -->", // Page generation time output format string
  14 + "Cache.enabled" => true,
  15 + "Cache.expires" => "+10 seconds",
  16 + "Asset.compress" => false,
  17 + "Asset.timestamp" => true,
  18 + // "G11n.locale" => "en",
  19 + // "G11n.timezone" => "Etc/UTC",
  20 + // "G11n.currency" => "USD"
  21 +));
  22 +
  23 +/*
  24 + * Set the current environment to "development"
  25 + */
  26 +// switch (true) {
  27 +// case
  28 +// }
  29 +Environment::set("development");
  30 +
  31 +?>
40 app/config/routes.php
... ... @@ -0,0 +1,40 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +use \lithium\http\Router;
  14 +
  15 +/**
  16 + * Uncomment the line below to enable routing for admin actions.
  17 + * @todo Implement me.
  18 + */
  19 +// Router::namespace('/admin', array('admin' => true));
  20 +
  21 +/**
  22 + * Here, we are connecting '/' (base path) to controller called 'Pages',
  23 + * its action called 'view', and we pass a param to select the view file
  24 + * to use (in this case, /app/views/pages/home.html.php)...
  25 + */
  26 +Router::connect('/', array('controller' => 'pages', 'action' => 'view', 'home'));
  27 +
  28 +/**
  29 + * ...and connect the rest of 'Pages' controller's urls.
  30 + */
  31 +Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'view'));
  32 +
  33 +/**
  34 + * Finally, connect the default routes.
  35 + */
  36 +Router::connect('/{:controller}/{:action}/{:id:[0-9]+}.{:type}', array('id' => null));
  37 +Router::connect('/{:controller}/{:action}/{:id:[0-9]+}');
  38 +Router::connect('/{:controller}/{:action}/{:args}');
  39 +
  40 +?>
0  app/config/schema/empty
No changes.
63 app/config/switchboard.php
... ... @@ -0,0 +1,63 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +/**
  14 + * Welcome to the switchboard. This file contains a series of method filters that allow you to
  15 + * intercept different parts of Lithium's request cycle as they happen. You can apply filters to
  16 + * any object method that has a `@filter` flag in its API documentation.
  17 + *
  18 + * When applying a filter, you need the name of the method you want to call, along with a *closure*,
  19 + * that defines what you want the filter to do. All filters take the same 3 parameters: `$self`,
  20 + * `$params`, and `$chain`.
  21 + *
  22 + * - `$self`: If the filter is applied on an object instance, then `$self` will be that instance. If
  23 + * applied to a static class, then `$self` will be a string containing the fully-namespaced class
  24 + * name.
  25 + *
  26 + * - `$params`: Contains an associative array of the parameters that are passed into the method. You
  27 + * can modify or inspect these parameters before allowing the method to continue.
  28 + *
  29 + * - `$chain`: Finally, `$chain` contains the list of filters in line to be executed. At the bottom
  30 + * of `$chain` is the method itself. This is why most filters contain a line that looks like
  31 + * `return $chain->next($self, $params, $chain);`. This passes control to the next filter in the
  32 + * chain, and finally, to the method itself. This allows you to interact with the return value as
  33 + * well as the parameters.
  34 + */
  35 +
  36 +use \lithium\http\Router;
  37 +use \lithium\core\Environment;
  38 +use \lithium\action\Dispatcher;
  39 +
  40 +/**
  41 + * Loads application routes before the request is dispatched. Change this to `include_once` if
  42 + * more than one request cycle is executed per HTTP request.
  43 + *
  44 + * @see lithium\http\Router
  45 + */
  46 +Dispatcher::applyFilter('run', function($self, $params, $chain) {
  47 + include __DIR__ . '/routes.php';
  48 + return $chain->next($self, $params, $chain);
  49 +});
  50 +
  51 +/**
  52 + * Intercepts the `Dispatcher` as it finds a controller object, and passes the `'request'` parameter
  53 + * to the `Environment` class to detect which environment the application is running in.
  54 + *
  55 + * @see lithium\action\Request
  56 + * @see lithium\core\Environment
  57 + */
  58 +Dispatcher::applyFilter('_callable', function($self, $params, $chain) {
  59 + Environment::set($params['request']);
  60 + return $chain->next($self, $params, $chain);
  61 +});
  62 +
  63 +?>
22 app/controllers/HelloWorldController.php
... ... @@ -0,0 +1,22 @@
  1 +<?php
  2 +
  3 +namespace app\controllers;
  4 +
  5 +class HelloWorldController extends \lithium\action\Controller {
  6 +
  7 + public $helpers = array();
  8 +
  9 + public function index() {
  10 + $this->render(array('layout' => false));
  11 + }
  12 +
  13 + public function to_string() {
  14 + return "Hello World";
  15 + }
  16 +
  17 + public function to_json() {
  18 + $this->render(array('json' => 'Hello World'));
  19 + }
  20 +}
  21 +
  22 +?>
30 app/controllers/PagesController.php
... ... @@ -0,0 +1,30 @@
  1 +<?php
  2 +
  3 +namespace App\Controllers;
  4 +
  5 +use \lithium\util\Inflector;
  6 +
  7 +class PagesController extends \lithium\action\Controller {
  8 +
  9 + public $helpers = array('Html');
  10 +
  11 + function view() {
  12 + $path = func_get_args();
  13 +
  14 + if (!count($path)) {
  15 + $path = array('home');
  16 + }
  17 +
  18 + $count = count($path);
  19 + $page = $subpage = $title = null;
  20 +
  21 + $page = (!empty($path[0]) ? $path[0] : $page);
  22 + $subpage = (!empty($path[1]) ? $path[1] : $subpage);
  23 + $title = (!empty($path[$count - 1]) ? Inflector::humanize($path[$count - 1]) : $title);
  24 +
  25 + $this->set(compact('page', 'subpage', 'title'));
  26 + $this->render(join('/', $path));
  27 + }
  28 +}
  29 +
  30 +?>
0  app/extensions/adapters/empty
No changes.
0  app/extensions/behaviors/empty
No changes.
0  app/extensions/commands/empty
No changes.
0  app/extensions/components/empty
No changes.
0  app/extensions/data/sources/empty
No changes.
0  app/extensions/g11n/empty
No changes.
0  app/extensions/helpers/empty
No changes.
15 app/index.php
... ... @@ -0,0 +1,15 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +require 'webroot/index.php';
  14 +
  15 +?>
0  app/libraries/empty
No changes.
0  app/models/empty
No changes.
0  app/tests/cases/controllers/empty
No changes.
0  app/tests/cases/extensions/adapters/empty
No changes.
0  app/tests/cases/extensions/behaviors/empty
No changes.
0  app/tests/cases/extensions/commands/empty
No changes.
0  app/tests/cases/extensions/components/empty
No changes.
0  app/tests/cases/extensions/data_sources/empty
No changes.
0  app/tests/cases/extensions/helpers/empty
No changes.
0  app/tests/cases/models/empty
No changes.
0  app/tests/fixtures/empty
No changes.
0  app/tests/groups/empty
No changes.
0  app/tmp/cache/empty
No changes.
0  app/tmp/logs/empty
No changes.
0  app/views/elements/empty
No changes.
1  app/views/hello_world/index.html.php
... ... @@ -0,0 +1 @@
  1 +Hello World!
15 app/views/layouts/default.ajax.php
... ... @@ -0,0 +1,15 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +echo $content_for_layout;
  14 +
  15 +?>
22 app/views/layouts/default.email.html.php
... ... @@ -0,0 +1,22 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +?>
  13 +<!doctype html>
  14 +
  15 +<html>
  16 +<head>
  17 + <title><?=$this->title; ?></title>
  18 +</head>
  19 +<body>
  20 + <?=@$this->content; ?>
  21 +</body>
  22 +</html>
15 app/views/layouts/default.email.txt.php
... ... @@ -0,0 +1,15 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +echo $content_for_layout;
  14 +
  15 +?>
31 app/views/layouts/default.html.php
... ... @@ -0,0 +1,31 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +?>
  13 +<!doctype html>
  14 +<html>
  15 +<head>
  16 + <?=@$this->html->charset(); ?>
  17 + <title><?=$title; ?></title>
  18 + <?=@$this->html->style('base'); ?>
  19 + <?=@$this->scripts(); ?>
  20 + <?=@$this->html->link('Icon', null, array('type' => 'icon')); ?>
  21 +</head>
  22 +<body>
  23 + <div id="container">
  24 + <div id="header"></div>
  25 + <div id="content">
  26 + <?=@$this->content; ?>
  27 + </div>
  28 + <div id="footer"></div>
  29 + </div>
  30 +</body>
  31 +</html>
14 app/views/layouts/default.xml.php
... ... @@ -0,0 +1,14 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +?>
  13 +<?=@$xml->header(); ?>
  14 +<?=@$content_for_layout; ?>
33 app/views/layouts/flash.html.php
... ... @@ -0,0 +1,33 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +
  13 +use \lithium\core\Environment;
  14 +
  15 +?>
  16 +<!doctype html>
  17 +<html>
  18 +<head>
  19 + <?php echo $this->html->charset(); ?>
  20 + <title><?php echo $page_title; ?></title>
  21 + <?php if (Environment::is('production')) { ?>
  22 + <meta http-equiv="Refresh" content="<?=$pause?>;url=<?=$url?>"/>
  23 + <?php } ?>
  24 + <style>
  25 + p { text-align:center; font:bold 1.1em sans-serif }
  26 + a { color:#444; text-decoration: none }
  27 + a:hover { text-decoration: underline; color: #44E }
  28 + </style>
  29 +</head>
  30 +<body>
  31 + <p><a href="<?=$url; ?>"><?=$message; ?></a></p>
  32 +</body>
  33 +</html>
27 app/views/pages/home.html.php
... ... @@ -0,0 +1,27 @@
  1 +<?php
  2 +/**
  3 + * Lithium: the most rad php framework
  4 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  5 + *
  6 + * Licensed under The BSD License
  7 + * Redistributions of files must retain the above copyright notice.
  8 + *
  9 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  10 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  11 + */
  12 +?>
  13 +<h2>Lithium is coming...</h2>
  14 +
  15 +<p>
  16 + temporary home page that will eventually be filled with configuration checks.
  17 +</p>
  18 +
  19 +<p>
  20 + <a href="http://rad-dev.org/lithium/wiki">Lithium Wiki</a>
  21 +</p>
  22 +<p>
  23 + <a href="http://rad-dev.org/lithium3">Lithium Source</a>
  24 +</p>
  25 +<p>
  26 + <a href="http://groups.google.com/group/lithium">Lithium Google Group</a>
  27 +</p>
7 app/webroot/.htaccess
... ... @@ -0,0 +1,7 @@
  1 +<IfModule mod_rewrite.c>
  2 + RewriteEngine On
  3 + RewriteCond %{REQUEST_FILENAME} !-d
  4 + RewriteCond %{REQUEST_FILENAME} !-f
  5 + RewriteCond %{REQUEST_FILENAME} !favicon.ico$
  6 + RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  7 +</IfModule>
33 app/webroot/css/base.css
... ... @@ -0,0 +1,33 @@
  1 +/**
  2 + * Lithium: the most rad php framework
  3 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  4 + *
  5 + * Licensed under The BSD License
  6 + * Redistributions of files must retain the above copyright notice.
  7 + *
  8 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  9 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  10 + */
  11 +
  12 +* {
  13 + margin: 0;
  14 + padding: 0;
  15 +}
  16 +
  17 +body {
  18 + background-color: #CCC;
  19 + font-family: Helvetica, Arial, sans-serif;
  20 + margin: 2em;
  21 +}
  22 +
  23 +a {
  24 + color: #333;
  25 +}
  26 +
  27 +a:hover {
  28 + text-decoration: none;
  29 +}
  30 +
  31 +p {
  32 + margin-top: 1em;
  33 +}
281 app/webroot/css/debug.css
<
... ... @@ -0,0 +1,281 @@
  1 +/**
  2 + * Lithium: the most rad php framework
  3 + * Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  4 + *
  5 + * Licensed under The BSD License
  6 + * Redistributions of files must retain the above copyright notice.
  7 + *
  8 + * @copyright Copyright 2009, Union of Rad, Inc. (http://union-of-rad.org)
  9 + * @license http://opensource.org/licenses/bsd-license.php The BSD License
  10 + */
  11 +
  12 +h1.test-dashboard {
  13 + padding: 8px 0 4px 14px;
  14 + background: #B5B4A4;
  15 +}
  16 +
  17 +/*--- Benchmarking ---*/
  18 +table.metrics {
  19 + border: 0;
  20 + border-top: 1px solid #ccc;
  21 +}
  22 +
  23 +td.metric-name {
  24 + text-align: left;
  25 + white-space: nowrap;
  26 + padding: 6px 8px;
  27 + background: #f4f4f4;
  28 + width: 35%;
  29 +}
  30 +td.metric {
  31 + border: 0;
  32 + font-family: 'Courier New', Courier;
  33 + font-weight: bold;
  34 + padding: 6px 8px;
  35 + text-align: right;
  36 + width: 65%;
  37 +}
  38 +
  39 +ul.classes, ul.files {
  40 + list-style-type: none;
  41 + font-family: 'Andale Mono';
  42 +}
  43 +
  44 +/*--- Test Results ---*/
  45 +div.test-result {
  46 + margin: 0 0 15px 0;
  47 + padding: 8px 10px;
  48 + color: #FFFFFF;
  49 + border: 2px solid #000000;
  50 + font-family: Helvetica, Arial, sans-serif;
  51 + font-weight: bold;
  52 + font-size: 16px;
  53 +}
  54 +
  55 +div.test-result-success {
  56 + background-color: #33CC66;
  57 + border-color: #009933;
  58 +}
  59 +
  60 +div.test-result-fail {
  61 + background-color: #CC0033;
  62 + border-color: #990000;
  63 +}
  64 +
  65 +div.test-assert, div.test-exception {
  66 + margin: 4px 0;
  67 + padding: 4px 8px;
  68 + color: #000000;
  69 + border: 1px solid #000000;
  70 + font-family: 'Monaco', 'Andale Mono', Helvetica, Arial, sans-serif;
  71 + line-height: 20px;
  72 + font-size: 12px;
  73 +}
  74 +
  75 +div.test-assert-passed {
  76 + border-color: #339966;
  77 + background-color: #D0F9E0;
  78 +}
  79 +
  80 +div.test-assert-failed, div.test-exception {
  81 + border-color: #993366;
  82 + background-color: #F9D0E0;
  83 +}
  84 +
  85 +div.test-assert span.content, div.test-exception span.content, div.test-exception span.trace {
  86 + display: block;
  87 + clear: both;
  88 + white-space: pre;
  89 +}
  90 +
  91 +div.test-exception span.content {
  92 + font-style: italic;
  93 +}
  94 +
  95 +div.test-exception span.trace {
  96 + padding: 0 0 0 5px;
  97 + margin: 2px 0 2px 3px;
  98 + border-left: 1px solid #C09090;
  99 +}
  100 +
  101 +/*--- SQL Dumps ---*/
  102 +.lithium-sql-log table {
  103 + background: #f4f4f4;
  104 +}
  105 +
  106 +.lithium-sql-log td {
  107 + padding: 4px 8px;
  108 + text-align: left;
  109 +}
  110 +
  111 +
  112 +/*--- Debugger Dumps ---*/
  113 +pre {
  114 + color: #000;
  115 + background: #f0f0f0;
  116 + padding: 1em;
  117 +}
  118 +
  119 +pre.lithium-debug {
  120 + background: #ffcc00;
  121 + font-size: 120%;
  122 + line-height: 140%;
  123 + margin-top: 1em;
  124 + overflow: auto;
  125 + position: relative;
  126 +}
  127 +
  128 +div.lithium-stack-trace {
  129 + background: #fff;
  130 + border: 4px dotted #ffcc00;
  131 + color: #333;
  132 + margin: 0px;
  133 + padding: 6px;
  134 + font-size: 120%;
  135 + line-height: 140%;
  136 + overflow: auto;
  137 + position: relative;
  138 +}
  139 +
  140 +/*--- Code Highlighting ---*/
  141 +div.lithium-code-dump pre {
  142 + position: relative;
  143 + overflow: auto;
  144 +}
  145 +
  146 +div.lithium-stack-trace pre, div.lithium-code-dump pre {
  147 + color: #000;
  148 + background-color: #F0F0F0;
  149 + margin: 0px;
  150 + padding: 1em;
  151 + overflow: auto;
  152 +}
  153 +
  154 +div.lithium-code-dump pre, div.lithium-code-dump pre code {
  155 + clear: both;
  156 + font-size: 12px;
  157 + line-height: 15px;
  158 + margin: 4px 2px;
  159 + padding: 4px;
  160 + overflow: auto;
  161 +}
  162 +
  163 +div.lithium-code-dump span.code-highlight {
  164 + background-color: #ff0;
  165 + padding: 4px;
  166 +}
  167 +
  168 +/*--- Code Coverage Analysis ---*/
  169 +span.filters {
  170 + float: right;
  171 + margin-top: -17px;
  172 +}
  173 +
  174 +div.code-coverage-results {
  175 + color: #000000;
  176 + font-size: 11px;
  177 + font-family: 'Andale Mono';
  178 + background-color: #F0F0F0;
  179 + border: 1px solid #CCCCCC;
  180 +}
  181 +
  182 +h4.coverage {
  183 + color: #000000;
  184 + background-color: #FFFFFF;
  185 + font-family: Helvetica, Arial;
  186 + font-weight: bold;
  187 + margin: 6px 0 3px 3px;
  188 + padding: 0;
  189 +}
  190 +
  191 +div.code-coverage-results h4.name {
  192 + color: #666;
  193 + background-color: #F0F0F0;
  194 + border-bottom: 1px solid #999;
  195 + padding: 3px 0;
  196 + font-size: 12px;
  197 +}
  198 +
  199 +div.code-coverage-results div.code-line {
  200 + display: block;
  201 + float: none;