Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

3000fc1

  • Loading branch information...
commit f4809737ff6619b772dd8034fc6329d2ddb63433 0 parents
Kris Thom White authored
Showing with 31,832 additions and 0 deletions.
  1. +464 −0 css/base.css
  2. BIN  css/images/checkoutarrow.png
  3. +392 −0 css/skeleton.css
  4. +3 −0  custom/controllers/README.md
  5. +1 −0  custom/extensions/README.md
  6. +6 −0 custom/helpers/README.md
  7. +8 −0 custom/models/AdvancedSearchForm.php
  8. +8 −0 custom/models/CheckoutForm.php
  9. +3 −0  custom/models/README.md
  10. +1 −0  custom/xml/README.md
  11. BIN  favicon.ico
  12. +1 −0  framework/.htaccess
  13. +857 −0 framework/YiiBase.php
  14. +978 −0 framework/base/CApplication.php
  15. +57 −0 framework/base/CApplicationComponent.php
  16. +114 −0 framework/base/CBehavior.php
  17. +683 −0 framework/base/CComponent.php
  18. +53 −0 framework/base/CErrorEvent.php
  19. +578 −0 framework/base/CErrorHandler.php
  20. +21 −0 framework/base/CException.php
  21. +35 −0 framework/base/CExceptionEvent.php
  22. +39 −0 framework/base/CHttpException.php
  23. +618 −0 framework/base/CModel.php
  24. +68 −0 framework/base/CModelBehavior.php
  25. +31 −0 framework/base/CModelEvent.php
  26. +547 −0 framework/base/CModule.php
  27. +328 −0 framework/base/CSecurityManager.php
  28. +107 −0 framework/base/CStatePersister.php
  29. +631 −0 framework/base/interfaces.php
  30. +108 −0 framework/caching/CApcCache.php
  31. +376 −0 framework/caching/CCache.php
  32. +313 −0 framework/caching/CDbCache.php
  33. +163 −0 framework/caching/CDummyCache.php
  34. +106 −0 framework/caching/CEAcceleratorCache.php
  35. +220 −0 framework/caching/CFileCache.php
  36. +281 −0 framework/caching/CMemCache.php
  37. +108 −0 framework/caching/CWinCache.php
  38. +103 −0 framework/caching/CXCache.php
  39. +98 −0 framework/caching/CZendDataCache.php
  40. +112 −0 framework/caching/dependencies/CCacheDependency.php
  41. +97 −0 framework/caching/dependencies/CChainedCacheDependency.php
  42. +111 −0 framework/caching/dependencies/CDbCacheDependency.php
  43. +133 −0 framework/caching/dependencies/CDirectoryCacheDependency.php
  44. +50 −0 framework/caching/dependencies/CExpressionDependency.php
  45. +52 −0 framework/caching/dependencies/CFileCacheDependency.php
  46. +53 −0 framework/caching/dependencies/CGlobalStateCacheDependency.php
  47. +228 −0 framework/cli/commands/MessageCommand.php
  48. +585 −0 framework/cli/commands/MigrateCommand.php
  49. +146 −0 framework/cli/commands/ShellCommand.php
  50. +213 −0 framework/cli/commands/WebAppCommand.php
  51. +175 −0 framework/cli/commands/shell/ControllerCommand.php
  52. +326 −0 framework/cli/commands/shell/CrudCommand.php
  53. +122 −0 framework/cli/commands/shell/FormCommand.php
  54. +78 −0 framework/cli/commands/shell/HelpCommand.php
  55. +487 −0 framework/cli/commands/shell/ModelCommand.php
  56. +93 −0 framework/cli/commands/shell/ModuleCommand.php
  57. +47 −0 framework/cli/views/shell/controller/controller.php
  58. +26 −0 framework/cli/views/shell/controller/view.php
  59. +42 −0 framework/cli/views/shell/crud/_form.php
  60. +35 −0 framework/cli/views/shell/crud/_search.php
  61. +29 −0 framework/cli/views/shell/crud/_view.php
  62. +73 −0 framework/cli/views/shell/crud/admin.php
  63. +190 −0 framework/cli/views/shell/crud/controller.php
  64. +27 −0 framework/cli/views/shell/crud/create.php
  65. +31 −0 framework/cli/views/shell/crud/index.php
  66. +47 −0 framework/cli/views/shell/crud/test.php
  67. +31 −0 framework/cli/views/shell/crud/update.php
  68. +39 −0 framework/cli/views/shell/crud/view.php
  69. +37 −0 framework/cli/views/shell/form/action.php
  70. +39 −0 framework/cli/views/shell/form/form.php
  71. +25 −0 framework/cli/views/shell/model/fixture.php
  72. +113 −0 framework/cli/views/shell/model/model.php
  73. +21 −0 framework/cli/views/shell/model/test.php
  74. +9 −0 framework/cli/views/shell/module/controllers/DefaultController.php
  75. +28 −0 framework/cli/views/shell/module/module.php
  76. +14 −0 framework/cli/views/shell/module/views/default/index.php
  77. +2 −0  framework/cli/views/webapp/assets/git-gitignore
  78. 0  framework/cli/views/webapp/assets/hg-hgkeep
  79. BIN  framework/cli/views/webapp/css/bg.gif
  80. +164 −0 framework/cli/views/webapp/css/form.css
  81. +36 −0 framework/cli/views/webapp/css/ie.css
  82. +229 −0 framework/cli/views/webapp/css/main.css
  83. +29 −0 framework/cli/views/webapp/css/print.css
  84. +238 −0 framework/cli/views/webapp/css/screen.css
  85. +7 −0 framework/cli/views/webapp/hg-hgignore
  86. 0  framework/cli/views/webapp/images/git-gitkeep
  87. 0  framework/cli/views/webapp/images/hg-hgkeep
  88. +15 −0 framework/cli/views/webapp/index-test.php
  89. +13 −0 framework/cli/views/webapp/index.php
  90. +1 −0  framework/cli/views/webapp/protected/.htaccess
  91. 0  framework/cli/views/webapp/protected/commands/shell/git-gitkeep
  92. 0  framework/cli/views/webapp/protected/commands/shell/hg-hgkeep
  93. +23 −0 framework/cli/views/webapp/protected/components/Controller.php
  94. +33 −0 framework/cli/views/webapp/protected/components/UserIdentity.php
  95. +37 −0 framework/cli/views/webapp/protected/config/console.php
  96. +90 −0 framework/cli/views/webapp/protected/config/main.php
  97. +17 −0 framework/cli/views/webapp/protected/config/test.php
  98. +109 −0 framework/cli/views/webapp/protected/controllers/SiteController.php
  99. +28 −0 framework/cli/views/webapp/protected/data/schema.mysql.sql
  100. +28 −0 framework/cli/views/webapp/protected/data/schema.sqlite.sql
  101. BIN  framework/cli/views/webapp/protected/data/testdrive.db
  102. 0  framework/cli/views/webapp/protected/extensions/git-gitkeep
  103. 0  framework/cli/views/webapp/protected/extensions/hg-hgkeep
  104. 0  framework/cli/views/webapp/protected/messages/git-gitkeep
  105. 0  framework/cli/views/webapp/protected/messages/hg-hgkeep
  106. 0  framework/cli/views/webapp/protected/migrations/git-gitkeep
  107. 0  framework/cli/views/webapp/protected/migrations/hg-hgkeep
  108. +42 −0 framework/cli/views/webapp/protected/models/ContactForm.php
  109. +77 −0 framework/cli/views/webapp/protected/models/LoginForm.php
  110. +2 −0  framework/cli/views/webapp/protected/runtime/git-gitignore
  111. 0  framework/cli/views/webapp/protected/runtime/hg-hgkeep
  112. +25 −0 framework/cli/views/webapp/protected/tests/WebTestCase.php
  113. +10 −0 framework/cli/views/webapp/protected/tests/bootstrap.php
  114. 0  framework/cli/views/webapp/protected/tests/fixtures/git-gitkeep
  115. 0  framework/cli/views/webapp/protected/tests/fixtures/hg-hgkeep
  116. +47 −0 framework/cli/views/webapp/protected/tests/functional/SiteTest.php
  117. +13 −0 framework/cli/views/webapp/protected/tests/phpunit.xml
  118. +2 −0  framework/cli/views/webapp/protected/tests/report/git-gitignore
  119. 0  framework/cli/views/webapp/protected/tests/report/hg-hgkeep
  120. 0  framework/cli/views/webapp/protected/tests/unit/git-gitkeep
  121. 0  framework/cli/views/webapp/protected/tests/unit/hg-hgkeep
  122. +6 −0 framework/cli/views/webapp/protected/views/layouts/column1.php
  123. +22 −0 framework/cli/views/webapp/protected/views/layouts/column2.php
  124. +59 −0 framework/cli/views/webapp/protected/views/layouts/main.php
  125. +85 −0 framework/cli/views/webapp/protected/views/site/contact.php
  126. +15 −0 framework/cli/views/webapp/protected/views/site/error.php
  127. +20 −0 framework/cli/views/webapp/protected/views/site/index.php
  128. +53 −0 framework/cli/views/webapp/protected/views/site/login.php
  129. +12 −0 framework/cli/views/webapp/protected/views/site/pages/about.php
  130. +4 −0 framework/cli/views/webapp/protected/yiic
  131. +16 −0 framework/cli/views/webapp/protected/yiic.bat
  132. +7 −0 framework/cli/views/webapp/protected/yiic.php
  133. +1 −0  framework/cli/views/webapp/themes/classic/views/.htaccess
  134. 0  framework/cli/views/webapp/themes/classic/views/layouts/git-gitkeep
  135. 0  framework/cli/views/webapp/themes/classic/views/layouts/hg-hgkeep
  136. 0  framework/cli/views/webapp/themes/classic/views/site/git-gitkeep
  137. 0  framework/cli/views/webapp/themes/classic/views/site/hg-hgkeep
  138. 0  framework/cli/views/webapp/themes/classic/views/system/git-gitkeep
  139. 0  framework/cli/views/webapp/themes/classic/views/system/hg-hgkeep
  140. +213 −0 framework/collections/CAttributeCollection.php
  141. +100 −0 framework/collections/CConfiguration.php
  142. +345 −0 framework/collections/CList.php
  143. +93 −0 framework/collections/CListIterator.php
  144. +342 −0 framework/collections/CMap.php
  145. +93 −0 framework/collections/CMapIterator.php
  146. +171 −0 framework/collections/CQueue.php
  147. +93 −0 framework/collections/CQueueIterator.php
  148. +172 −0 framework/collections/CStack.php
  149. +93 −0 framework/collections/CStackIterator.php
  150. +51 −0 framework/collections/CTypedList.php
  151. +51 −0 framework/collections/CTypedMap.php
  152. +178 −0 framework/console/CConsoleApplication.php
  153. +591 −0 framework/console/CConsoleCommand.php
  154. +53 −0 framework/console/CConsoleCommandBehavior.php
  155. +52 −0 framework/console/CConsoleCommandEvent.php
  156. +155 −0 framework/console/CConsoleCommandRunner.php
  157. +76 −0 framework/console/CHelpCommand.php
  158. +1,606 −0 framework/db/CDbCommand.php
  159. +811 −0 framework/db/CDbConnection.php
  160. +245 −0 framework/db/CDbDataReader.php
  161. +38 −0 framework/db/CDbException.php
  162. +430 −0 framework/db/CDbMigration.php
  163. +110 −0 framework/db/CDbTransaction.php
  164. +1,585 −0 framework/db/ar/CActiveFinder.php
  165. +2,384 −0 framework/db/ar/CActiveRecord.php
  166. +102 −0 framework/db/ar/CActiveRecordBehavior.php
  167. +153 −0 framework/db/schema/CDbColumnSchema.php
  168. +756 −0 framework/db/schema/CDbCommandBuilder.php
  169. +638 −0 framework/db/schema/CDbCriteria.php
  170. +60 −0 framework/db/schema/CDbExpression.php
  171. +597 −0 framework/db/schema/CDbSchema.php
  172. +77 −0 framework/db/schema/CDbTableSchema.php
  173. +88 −0 framework/db/schema/mssql/CMssqlColumnSchema.php
  174. +337 −0 framework/db/schema/mssql/CMssqlCommandBuilder.php
  175. +72 −0 framework/db/schema/mssql/CMssqlPdoAdapter.php
  176. +427 −0 framework/db/schema/mssql/CMssqlSchema.php
  177. +36 −0 framework/db/schema/mssql/CMssqlSqlsrvPdoAdapter.php
  178. +31 −0 framework/db/schema/mssql/CMssqlTableSchema.php
  179. +71 −0 framework/db/schema/mysql/CMysqlColumnSchema.php
  180. +37 −0 framework/db/schema/mysql/CMysqlCommandBuilder.php
  181. +334 −0 framework/db/schema/mysql/CMysqlSchema.php
  182. +25 −0 framework/db/schema/mysql/CMysqlTableSchema.php
  183. +65 −0 framework/db/schema/oci/COciColumnSchema.php
  184. +124 −0 framework/db/schema/oci/COciCommandBuilder.php
  185. +379 −0 framework/db/schema/oci/COciSchema.php
  186. +24 −0 framework/db/schema/oci/COciTableSchema.php
  187. +57 −0 framework/db/schema/pgsql/CPgsqlColumnSchema.php
  188. +425 −0 framework/db/schema/pgsql/CPgsqlSchema.php
  189. +24 −0 framework/db/schema/pgsql/CPgsqlTableSchema.php
  190. +32 −0 framework/db/schema/sqlite/CSqliteColumnSchema.php
  191. +39 −0 framework/db/schema/sqlite/CSqliteCommandBuilder.php
  192. +329 −0 framework/db/schema/sqlite/CSqliteSchema.php
  193. +134 −0 framework/gii/CCodeFile.php
  194. +59 −0 framework/gii/CCodeForm.php
  195. +167 −0 framework/gii/CCodeGenerator.php
  196. +481 −0 framework/gii/CCodeModel.php
  197. +242 −0 framework/gii/GiiModule.php
  198. +35 −0 framework/gii/assets/css/ie.css
  199. +528 −0 framework/gii/assets/css/main.css
  200. +29 −0 framework/gii/assets/css/print.css
  201. +235 −0 framework/gii/assets/css/screen.css
  202. BIN  framework/gii/assets/images/logo.png
  203. BIN  framework/gii/assets/js/fancybox/blank.gif
  204. BIN  framework/gii/assets/js/fancybox/fancy_close.png
  205. BIN  framework/gii/assets/js/fancybox/fancy_loading.png
  206. BIN  framework/gii/assets/js/fancybox/fancy_nav_left.png
  207. BIN  framework/gii/assets/js/fancybox/fancy_nav_right.png
  208. BIN  framework/gii/assets/js/fancybox/fancy_shadow_e.png
  209. BIN  framework/gii/assets/js/fancybox/fancy_shadow_n.png
  210. BIN  framework/gii/assets/js/fancybox/fancy_shadow_ne.png
  211. BIN  framework/gii/assets/js/fancybox/fancy_shadow_nw.png
  212. BIN  framework/gii/assets/js/fancybox/fancy_shadow_s.png
  213. BIN  framework/gii/assets/js/fancybox/fancy_shadow_se.png
  214. BIN  framework/gii/assets/js/fancybox/fancy_shadow_sw.png
  215. BIN  framework/gii/assets/js/fancybox/fancy_shadow_w.png
  216. BIN  framework/gii/assets/js/fancybox/fancy_title_left.png
  217. BIN  framework/gii/assets/js/fancybox/fancy_title_main.png
  218. BIN  framework/gii/assets/js/fancybox/fancy_title_over.png
  219. BIN  framework/gii/assets/js/fancybox/fancy_title_right.png
  220. BIN  framework/gii/assets/js/fancybox/fancybox-x.png
  221. BIN  framework/gii/assets/js/fancybox/fancybox-y.png
  222. BIN  framework/gii/assets/js/fancybox/fancybox.png
  223. +363 −0 framework/gii/assets/js/fancybox/jquery.fancybox-1.3.1.css
Sorry, we could not display the entire diff because too many files (3,238) changed.
464 css/base.css
@@ -0,0 +1,464 @@
+/*
+* Skeleton V1.2
+* Copyright 2011, Dave Gamache
+* www.getskeleton.com
+* Free to use under the MIT license.
+* http://www.opensource.org/licenses/mit-license.php
+* 6/20/2012
+*/
+
+/* Table of Content
+==================================================
+ #Reset & Basics
+ #Basic Styles
+ #Site Styles
+ #Typography
+ #Links
+ #Lists
+ #Images
+ #Buttons
+ #Forms
+ #Misc */
+
+/* #Reset & Basics (Inspired by E. Meyers)
+================================================== */
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+body {
+ line-height: 1;
+}
+
+ol, ul {
+ /*list-style: none;*/
+}
+
+blockquote, q {
+ quotes: none;
+}
+
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+/* #Basic Styles
+================================================== */
+body {
+ background: #fff;
+ font: 14px/21px "Proxima Nova", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color: #444;
+ -webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
+ -webkit-text-size-adjust: 100%;
+}
+
+/* #Typography
+================================================== */
+h1, h2, h3, h4, h5, h6 {
+ color: #181818;
+ font-family: "Proxima Nova", "Georgia", "Times New Roman", serif;
+ font-weight: normal;
+}
+
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+ font-weight: inherit;
+}
+
+h1 {
+ font-size: 28px;
+ line-height: 50px;
+ margin-bottom: 14px;
+}
+
+h2 {
+ font-size: 24px;
+ line-height: 40px;
+ margin-bottom: 10px;
+}
+
+h3 {
+ font-size: 18px;
+ line-height: 34px;
+ margin-bottom: 8px;
+}
+
+h4 {
+ font-size: 16px;
+ line-height: 30px;
+ margin-bottom: 4px;
+}
+
+h5 {
+ font-size: 15px;
+ line-height: 24px;
+}
+
+h6 {
+ font-size: 14px;
+ line-height: 21px;
+}
+
+.subheader {
+ color: #777;
+}
+
+p {
+ margin: 0 0 20px 0;
+}
+
+p img {
+ margin: 0;
+}
+
+p.lead {
+ font-size: 21px;
+ line-height: 27px;
+ color: #777;
+}
+
+em {
+ font-style: italic;
+}
+
+strong {
+ font-weight: bold;
+ color: #333;
+}
+
+small {
+ font-size: 80%;
+}
+
+/* Blockquotes */
+blockquote, blockquote p {
+ font-size: 17px;
+ line-height: 24px;
+ color: #777;
+ font-style: italic;
+}
+
+blockquote {
+ margin: 0 0 20px;
+ padding: 9px 20px 0 19px;
+ border-left: 1px solid #ddd;
+}
+
+blockquote cite {
+ display: block;
+ font-size: 12px;
+ color: #555;
+}
+
+blockquote cite:before {
+ content: "\2014 \0020";
+}
+
+blockquote cite a, blockquote cite a:visited, blockquote cite a:visited {
+ color: #555;
+}
+
+hr {
+ border: solid #ddd;
+ border-width: 1px 0 0;
+ clear: both;
+ margin: 10px 0 30px;
+ height: 0;
+}
+
+/* #Links
+================================================== */
+a, a:visited {
+ color: #333;
+ text-decoration: underline;
+ outline: 0;
+}
+
+a:hover, a:focus {
+ color: #000;
+}
+
+p a, p a:visited {
+ line-height: inherit;
+}
+
+/* #Lists
+================================================== */
+ul, ol {
+ margin-bottom: 20px;
+ margin-left: 25px;
+ margin-top: 20px;
+}
+
+ul {
+ /*list-style: none outside;*/
+
+}
+
+ol {
+ list-style: decimal;
+}
+
+ol, ul.square, ul.circle, ul.disc {
+ margin-left: 30px;
+}
+
+ul.square {
+ list-style: square outside;
+}
+
+ul.circle {
+ list-style: circle outside;
+}
+
+ul.disc {
+ list-style: disc outside;
+}
+
+ul ul, ul ol,
+ol ol, ol ul {
+ margin: 4px 0 5px 30px;
+ font-size: 90%;
+}
+
+ul ul li, ul ol li,
+ol ol li, ol ul li {
+ margin-bottom: 6px;
+}
+
+li {
+ line-height: 18px;
+ margin-bottom: 12px;
+}
+
+ul.large li {
+ line-height: 21px;
+}
+
+li p {
+ line-height: 21px;
+}
+
+/* #Images
+================================================== */
+
+img.scale-with-grid {
+ max-width: 100%;
+ height: auto;
+}
+
+/* #Buttons
+================================================== */
+
+.button,
+button,
+input[type="submit"],
+input[type="reset"],
+input[type="button"] {
+ background: #eee; /* Old browsers */
+ background: #eee -moz-linear-gradient(top, rgba(255, 255, 255, .2) 0%, rgba(0, 0, 0, .2) 100%); /* FF3.6+ */
+ background: #eee -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, .2)), color-stop(100%, rgba(0, 0, 0, .2))); /* Chrome,Safari4+ */
+ background: #eee -webkit-linear-gradient(top, rgba(255, 255, 255, .2) 0%, rgba(0, 0, 0, .2) 100%); /* Chrome10+,Safari5.1+ */
+ background: #eee -o-linear-gradient(top, rgba(255, 255, 255, .2) 0%, rgba(0, 0, 0, .2) 100%); /* Opera11.10+ */
+ background: #eee -ms-linear-gradient(top, rgba(255, 255, 255, .2) 0%, rgba(0, 0, 0, .2) 100%); /* IE10+ */
+ background: #eee linear-gradient(top, rgba(255, 255, 255, .2) 0%, rgba(0, 0, 0, .2) 100%); /* W3C */
+ border: 1px solid #aaa;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ color: #444;
+ display: inline-block;
+ font-size: 11px;
+ font-weight: bold;
+ text-decoration: none;
+ text-shadow: 0 1px rgba(255, 255, 255, .75);
+ cursor: pointer;
+ margin-bottom: 20px;
+ line-height: normal;
+ padding: 8px 10px;
+ font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+.button:hover,
+button:hover,
+input[type="submit"]:hover,
+input[type="reset"]:hover,
+input[type="button"]:hover {
+ color: #222;
+ background: #ddd; /* Old browsers */
+ background: #ddd -moz-linear-gradient(top, rgba(255, 255, 255, .3) 0%, rgba(0, 0, 0, .3) 100%); /* FF3.6+ */
+ background: #ddd -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, .3)), color-stop(100%, rgba(0, 0, 0, .3))); /* Chrome,Safari4+ */
+ background: #ddd -webkit-linear-gradient(top, rgba(255, 255, 255, .3) 0%, rgba(0, 0, 0, .3) 100%); /* Chrome10+,Safari5.1+ */
+ background: #ddd -o-linear-gradient(top, rgba(255, 255, 255, .3) 0%, rgba(0, 0, 0, .3) 100%); /* Opera11.10+ */
+ background: #ddd -ms-linear-gradient(top, rgba(255, 255, 255, .3) 0%, rgba(0, 0, 0, .3) 100%); /* IE10+ */
+ background: #ddd linear-gradient(top, rgba(255, 255, 255, .3) 0%, rgba(0, 0, 0, .3) 100%); /* W3C */
+ border: 1px solid #888;
+ border-top: 1px solid #aaa;
+ border-left: 1px solid #aaa;
+}
+
+.button:active,
+button:active,
+input[type="submit"]:active,
+input[type="reset"]:active,
+input[type="button"]:active {
+ border: 1px solid #666;
+ background: #ccc; /* Old browsers */
+ background: #ccc -moz-linear-gradient(top, rgba(255, 255, 255, .35) 0%, rgba(10, 10, 10, .4) 100%); /* FF3.6+ */
+ background: #ccc -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, .35)), color-stop(100%, rgba(10, 10, 10, .4))); /* Chrome,Safari4+ */
+ background: #ccc -webkit-linear-gradient(top, rgba(255, 255, 255, .35) 0%, rgba(10, 10, 10, .4) 100%); /* Chrome10+,Safari5.1+ */
+ background: #ccc -o-linear-gradient(top, rgba(255, 255, 255, .35) 0%, rgba(10, 10, 10, .4) 100%); /* Opera11.10+ */
+ background: #ccc -ms-linear-gradient(top, rgba(255, 255, 255, .35) 0%, rgba(10, 10, 10, .4) 100%); /* IE10+ */
+ background: #ccc linear-gradient(top, rgba(255, 255, 255, .35) 0%, rgba(10, 10, 10, .4) 100%); /* W3C */
+}
+
+.button.full-width,
+button.full-width,
+input[type="submit"].full-width,
+input[type="reset"].full-width,
+input[type="button"].full-width {
+ width: 100%;
+ padding-left: 0 !important;
+ padding-right: 0 !important;
+ text-align: center;
+}
+
+/* Fix for odd Mozilla border & padding issues */
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/* #Forms
+================================================== */
+
+form {
+ margin-bottom: 20px;
+}
+
+fieldset {
+ margin-bottom: 20px;
+}
+
+input[type="text"],
+input[type="password"],
+input[type="email"],
+textarea,
+select {
+ border: 1px solid #ccc;
+ padding: 6px 4px;
+ outline: none;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+ font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color: #777;
+ margin: 0;
+ width: 210px;
+ max-width: 100%;
+ display: block;
+ margin-bottom: 20px;
+ background: #fff;
+}
+
+select {
+ padding: 0;
+}
+
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="email"]:focus,
+textarea:focus {
+ border: 1px solid #aaa;
+ color: #444;
+ -moz-box-shadow: 0 0 3px rgba(0, 0, 0, .2);
+ -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .2);
+ box-shadow: 0 0 3px rgba(0, 0, 0, .2);
+}
+
+textarea {
+ min-height: 60px;
+}
+
+label,
+legend {
+ display: block;
+ font-weight: bold;
+ font-size: 13px;
+}
+
+select {
+ width: 220px;
+}
+
+input[type="checkbox"] {
+ display: inline;
+}
+
+label span,
+legend span {
+ font-weight: normal;
+ font-size: 13px;
+ color: #444;
+}
+
+/* #Misc
+================================================== */
+.remove-bottom {
+ margin-bottom: 0 !important;
+}
+
+.half-bottom {
+ margin-bottom: 10px !important;
+}
+
+.add-bottom {
+ margin-bottom: 20px !important;
+}
+
+
+/* Image Zoomer */
+.magnifyarea { /* CSS to add shadow to magnified image. Optional */
+box-shadow: 5px 5px 7px #ffffff;
+-webkit-box-shadow: 5px 5px 7px #ffffff;
+-moz-box-shadow: 5px 5px 7px #ffffff;
+filter: progid:DXImageTransform.Microsoft.dropShadow(color=#ffffff, offX=5, offY=5, positive=true);
+background: white;
+ }
+
+.targetarea { /* CSS for container div(s) of the zoomable image */
+ width: 265px; /* wide or wider than the widest zoomable image */
+ height: 275px; /* high or higher than the tallest zoomable image */
+ margin-top:3px;
+ position: relative;
+ background-color: #ffffff;
+ border:0px;
+ text-decoration: none;
+
+}
+.thumbs { /* divs holding the trigger links - styles optional, used here to center their links below their respective zoomable image */
+ padding-top: 5px;
+ width: 250px;
+ text-align: left;
+ background-color: white;
+ border:0px;
+
+}
BIN  css/images/checkoutarrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
392 css/skeleton.css
@@ -0,0 +1,392 @@
+/*
+* Skeleton V1.2
+* Copyright 2011, Dave Gamache
+* www.getskeleton.com
+* Free to use under the MIT license.
+* http://www.opensource.org/licenses/mit-license.php
+* 6/20/2012
+*/
+
+/* Table of Contents
+==================================================
+ #Base 978 Grid
+ #Tablet (Portrait)
+ #Mobile (Portrait)
+ #Mobile (Landscape)
+ #Clearing */
+
+
+/* #Base 978 Grid
+================================================== */
+
+/* Note, this file has been modified by LightSpeed from the original
+version. The overall width was expanded to 978 instead of 960. Some
+half columns have been added for special formatting. The original
+for comparison is skeleton_original.css
+*/
+
+.container { position: relative; width: 978px; margin: 0 auto; padding: 0; }
+.container .column,
+.container .columns { float: left; display: inline; margin-left: 5px; margin-right: 5px;
+/* hint: for development, uncomment the following line to see where your columns are falling. May cause wrapping on some elements while turned on. */
+ /*border: 1px solid blue;*/
+}
+.row { margin-bottom: 20px; margin-left: 0px; }
+
+/* Nested Column Classes */
+.column.alpha, .columns.alpha { margin-left: 0; }
+.column.omega, .columns.omega { margin-right: 0; }
+
+/* Base Grid */
+.container .one.column,
+.container .one.columns { width: 51px; }
+.container .two.columns { width: 112px; }
+.container .twohalf.columns { width: 137px; }
+.container .three.columns { width: 176px; }
+.container .four.columns { width: 234px; }
+.container .five.columns { width: 295px; }
+.container .six.columns { width: 356px; }
+.container .seven.columns { width: 417px; }
+.container .eight.columns { width: 478px; }
+.container .nine.columns { width: 539px; }
+.container .ten.columns { width: 600px; }
+.container .eleven.columns { width: 661px; }
+.container .twelve.columns { width: 722px; }
+.container .thirteen.columns { width: 783px; }
+.container .fourteen.columns { width: 844px; }
+.container .fifteen.columns { width: 905px; }
+.container .sixteen.columns { width: 966px; }
+
+.container .one-third.column { width: 322px; }
+.container .two-thirds.column { width: 644px; }
+
+/* Offsets */
+.container .offset-by-one { padding-left: 61px; }
+.container .offset-by-two { padding-left: 122px; }
+.container .offset-by-three { padding-left: 183px; }
+.container .offset-by-four { padding-left: 244px; }
+.container .offset-by-five { padding-left: 305px; }
+.container .offset-by-six { padding-left: 366px; }
+.container .offset-by-seven { padding-left: 427px; }
+.container .offset-by-eight { padding-left: 488px; }
+.container .offset-by-nine { padding-left: 549px; }
+.container .offset-by-ten { padding-left: 610px; }
+.container .offset-by-eleven { padding-left: 671px; }
+.container .offset-by-twelve { padding-left: 732px; }
+.container .offset-by-thirteen { padding-left: 793px; }
+.container .offset-by-fourteen { padding-left: 854px; }
+.container .offset-by-fifteen { padding-left: 915px; }
+
+/* #Tablet (Portrait)
+================================================== */
+
+/* Note: Design for a width of 768px */
+
+@media only screen and (min-width: 768px) and (max-width: 959px) {
+ .container {
+ width: 768px;
+ }
+
+ .container .column,
+ .container .columns {
+ margin-left: 5px;
+ margin-right: 5px;
+ }
+
+ .column.alpha, .columns.alpha {
+ margin-left: 0;
+ margin-right: 5px;
+ }
+
+ .column.omega, .columns.omega {
+ margin-right: 0;
+ margin-left: 5px;
+ }
+
+ .alpha.omega {
+ margin-left: 0;
+ margin-right: 0;
+ }
+
+ .container .one.column,
+ .container .one.columns {
+ width: 28px;
+ }
+
+ .container .two.columns {
+ width: 76px;
+ }
+
+ .container .twohalf.columns {
+ width: 106px;
+ }
+
+ .container .three.columns {
+ width: 124px;
+ }
+
+ .container .four.columns {
+ width: 172px;
+ }
+
+ .container .five.columns {
+ width: 220px;
+ }
+
+ .container .six.columns {
+ width: 268px;
+ }
+
+ .container .seven.columns {
+ width: 316px;
+ }
+
+ .container .eight.columns {
+ width: 364px;
+ }
+
+ .container .nine.columns {
+ width: 412px;
+ }
+
+ .container .ten.columns {
+ width: 460px;
+ }
+
+ .container .eleven.columns {
+ width: 508px;
+ }
+
+ .container .twelve.columns {
+ width: 556px;
+ }
+
+ .container .thirteen.columns {
+ width: 604px;
+ }
+
+ .container .fourteen.columns {
+ width: 652px;
+ }
+
+ .container .fifteen.columns {
+ width: 700px;
+ }
+
+ .container .sixteen.columns {
+ width: 748px;
+ }
+
+ .container .one-third.column {
+ width: 236px;
+ }
+
+ .container .two-thirds.column {
+ width: 492px;
+ }
+
+ /* Offsets */
+ .container .offset-by-one {
+ padding-left: 48px;
+ }
+
+ .container .offset-by-two {
+ padding-left: 96px;
+ }
+
+ .container .offset-by-three {
+ padding-left: 144px;
+ }
+
+ .container .offset-by-four {
+ padding-left: 192px;
+ }
+
+ .container .offset-by-five {
+ padding-left: 240px;
+ }
+
+ .container .offset-by-six {
+ padding-left: 288px;
+ }
+
+ .container .offset-by-seven {
+ padding-left: 336px;
+ }
+
+ .container .offset-by-eight {
+ padding-left: 384px;
+ }
+
+ .container .offset-by-nine {
+ padding-left: 432px;
+ }
+
+ .container .offset-by-ten {
+ padding-left: 480px;
+ }
+
+ .container .offset-by-eleven {
+ padding-left: 528px;
+ }
+
+ .container .offset-by-twelve {
+ padding-left: 576px;
+ }
+
+ .container .offset-by-thirteen {
+ padding-left: 624px;
+ }
+
+ .container .offset-by-fourteen {
+ padding-left: 672px;
+ }
+
+ .container .offset-by-fifteen {
+ padding-left: 720px;
+ }
+}
+
+/* #Mobile (Portrait)
+================================================== */
+
+/* Note: Design for a width of 320px */
+
+@media only screen and (max-width: 767px) {
+ .container {
+ width: 300px;
+ }
+
+ .container .columns,
+ .container .column {
+ margin: 0;
+ }
+
+ .container .one.column,
+ .container .one.columns,
+ .container .two.columns,
+ .container .twohalf.columns,
+ .container .three.columns,
+ .container .four.columns,
+ .container .five.columns,
+ .container .six.columns,
+ .container .seven.columns,
+ .container .eight.columns,
+ .container .nine.columns,
+ .container .ten.columns,
+ .container .eleven.columns,
+ .container .twelve.columns,
+ .container .thirteen.columns,
+ .container .fourteen.columns,
+ .container .fifteen.columns,
+ .container .sixteen.columns,
+ .container .one-third.column,
+ .container .two-thirds.column {
+ width: 300px;
+ }
+
+ /* Offsets */
+ .container .offset-by-one,
+ .container .offset-by-two,
+ .container .offset-by-three,
+ .container .offset-by-four,
+ .container .offset-by-five,
+ .container .offset-by-six,
+ .container .offset-by-seven,
+ .container .offset-by-eight,
+ .container .offset-by-nine,
+ .container .offset-by-ten,
+ .container .offset-by-eleven,
+ .container .offset-by-twelve,
+ .container .offset-by-thirteen,
+ .container .offset-by-fourteen,
+ .container .offset-by-fifteen {
+ padding-left: 0;
+ }
+
+}
+
+/* #Mobile (Landscape)
+================================================== */
+
+/* Note: Design for a width of 480px */
+
+@media only screen and (min-width: 480px) and (max-width: 767px) {
+ .container {
+ width: 420px;
+ }
+
+ .container .columns,
+ .container .column {
+ margin: 0;
+ }
+
+ .container .one.column,
+ .container .one.columns,
+ .container .two.columns,
+ .container .twohalf.columns,
+ .container .three.columns,
+ .container .four.columns,
+ .container .five.columns,
+ .container .six.columns,
+ .container .seven.columns,
+ .container .eight.columns,
+ .container .nine.columns,
+ .container .ten.columns,
+ .container .eleven.columns,
+ .container .twelve.columns,
+ .container .thirteen.columns,
+ .container .fourteen.columns,
+ .container .fifteen.columns,
+ .container .sixteen.columns,
+ .container .one-third.column,
+ .container .two-thirds.column {
+ width: 420px;
+ }
+}
+
+/* #Clearing
+================================================== */
+
+/* Self Clearing Goodness */
+.container:after {
+ content: "\0020";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+/* Use clearfix class on parent to clear nested columns,
+ or wrap each row of columns in a <div class="row"> */
+.clearfix:before,
+.clearfix:after,
+.row:before,
+.row:after {
+ content: '\0020';
+ display: block;
+ overflow: hidden;
+ visibility: hidden;
+ width: 0;
+ height: 0;
+}
+
+.row:after,
+.clearfix:after {
+ clear: both;
+}
+
+.row,
+.clearfix {
+ zoom: 1;
+}
+
+/* You can also use a <br class="clear" /> to clear columns */
+.clear {
+ clear: both;
+ display: block;
+ overflow: hidden;
+ visibility: hidden;
+ width: 0;
+ height: 0;
+}
3  custom/controllers/README.md
@@ -0,0 +1,3 @@
+This directory is for custom controllers as well as overriding controllers (though we don't recommend overriding existing controllers).
+
+For documentation on how to do this, see our online Web Store programming help under Creating a custom controller
1  custom/extensions/README.md
@@ -0,0 +1 @@
+This directory is for custom extensions. If you want to use third party extensions for your Web Store customization, such as ones you have downloaded from http://www.yiiframework.com/extension/, you can place them here. Web Store has been set up to look both here and the Web Store program folder.
6 custom/helpers/README.md
@@ -0,0 +1,6 @@
+This directory is for custom helpers (PHP classes). Note that the filename should match the class name, so Yii will automatically find the class file. For example, a file that begins:
+
+class MyImageManager {
+
+should have a file name of MyImageManager.php
+
8 custom/models/AdvancedSearchForm.php
@@ -0,0 +1,8 @@
+<?php
+
+//For extending advanced search if necessary
+
+class AdvancedSearchForm extends BaseAdvancedSearchForm
+{
+
+}
8 custom/models/CheckoutForm.php
@@ -0,0 +1,8 @@
+<?php
+
+//For extending checkout model if necessary
+
+class CheckoutForm extends BaseCheckoutForm
+{
+
+}
3  custom/models/README.md
@@ -0,0 +1,3 @@
+This directory is for custom models. If you have added tables to your database, you will need to run giix to generate the model files and you can place them here.
+
+See our online developer help on how to perform that process.
1  custom/xml/README.md
@@ -0,0 +1 @@
+This directory is for custom xml feeds. These are "actions" which are loaded by the XmlController automatically. Please see our online documentation on the proper way to build a custom XML feed.
BIN  favicon.ico
Binary file not shown
1  framework/.htaccess
@@ -0,0 +1 @@
+deny from all
857 framework/YiiBase.php
@@ -0,0 +1,857 @@
+<?php
+/**
+ * YiiBase class file.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.yiiframework.com/
+ * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @license http://www.yiiframework.com/license/
+ * @package system
+ * @since 1.0
+ */
+
+/**
+ * Gets the application start timestamp.
+ */
+defined('YII_BEGIN_TIME') or define('YII_BEGIN_TIME',microtime(true));
+/**
+ * This constant defines whether the application should be in debug mode or not. Defaults to false.
+ */
+defined('YII_DEBUG') or define('YII_DEBUG',false);
+/**
+ * This constant defines how much call stack information (file name and line number) should be logged by Yii::trace().
+ * Defaults to 0, meaning no backtrace information. If it is greater than 0,
+ * at most that number of call stacks will be logged. Note, only user application call stacks are considered.
+ */
+defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',0);
+/**
+ * This constant defines whether exception handling should be enabled. Defaults to true.
+ */
+defined('YII_ENABLE_EXCEPTION_HANDLER') or define('YII_ENABLE_EXCEPTION_HANDLER',true);
+/**
+ * This constant defines whether error handling should be enabled. Defaults to true.
+ */
+defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER',true);
+/**
+ * Defines the Yii framework installation path.
+ */
+defined('YII_PATH') or define('YII_PATH',dirname(__FILE__));
+/**
+ * Defines the Zii library installation path.
+ */
+defined('YII_ZII_PATH') or define('YII_ZII_PATH',YII_PATH.DIRECTORY_SEPARATOR.'zii');
+
+/**
+ * YiiBase is a helper class serving common framework functionalities.
+ *
+ * Do not use YiiBase directly. Instead, use its child class {@link Yii} where
+ * you can customize methods of YiiBase.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package system
+ * @since 1.0
+ */
+class YiiBase
+{
+ /**
+ * @var array class map used by the Yii autoloading mechanism.
+ * The array keys are the class names and the array values are the corresponding class file paths.
+ * @since 1.1.5
+ */
+ public static $classMap=array();
+ /**
+ * @var boolean whether to rely on PHP include path to autoload class files. Defaults to true.
+ * You may set this to be false if your hosting environment doesn't allow changing the PHP
+ * include path, or if you want to append additional autoloaders to the default Yii autoloader.
+ * @since 1.1.8
+ */
+ public static $enableIncludePath=true;
+
+ private static $_aliases=array('system'=>YII_PATH,'zii'=>YII_ZII_PATH); // alias => path
+ private static $_imports=array(); // alias => class name or directory
+ private static $_includePaths; // list of include paths
+ private static $_app;
+ private static $_logger;
+
+
+
+ /**
+ * @return string the version of Yii framework
+ */
+ public static function getVersion()
+ {
+ return '1.1.13';
+ }
+
+ /**
+ * Creates a Web application instance.
+ * @param mixed $config application configuration.
+ * If a string, it is treated as the path of the file that contains the configuration;
+ * If an array, it is the actual configuration information.
+ * Please make sure you specify the {@link CApplication::basePath basePath} property in the configuration,
+ * which should point to the directory containing all application logic, template and data.
+ * If not, the directory will be defaulted to 'protected'.
+ * @return CWebApplication
+ */
+ public static function createWebApplication($config=null)
+ {
+ return self::createApplication('CWebApplication',$config);
+ }
+
+ /**
+ * Creates a console application instance.
+ * @param mixed $config application configuration.
+ * If a string, it is treated as the path of the file that contains the configuration;
+ * If an array, it is the actual configuration information.
+ * Please make sure you specify the {@link CApplication::basePath basePath} property in the configuration,
+ * which should point to the directory containing all application logic, template and data.
+ * If not, the directory will be defaulted to 'protected'.
+ * @return CConsoleApplication
+ */
+ public static function createConsoleApplication($config=null)
+ {
+ return self::createApplication('CConsoleApplication',$config);
+ }
+
+ /**
+ * Creates an application of the specified class.
+ * @param string $class the application class name
+ * @param mixed $config application configuration. This parameter will be passed as the parameter
+ * to the constructor of the application class.
+ * @return mixed the application instance
+ */
+ public static function createApplication($class,$config=null)
+ {
+ return new $class($config);
+ }
+
+ /**
+ * Returns the application singleton or null if the singleton has not been created yet.
+ * @return CApplication the application singleton, null if the singleton has not been created yet.
+ */
+ public static function app()
+ {
+ return self::$_app;
+ }
+
+ /**
+ * Stores the application instance in the class static member.
+ * This method helps implement a singleton pattern for CApplication.
+ * Repeated invocation of this method or the CApplication constructor
+ * will cause the throw of an exception.
+ * To retrieve the application instance, use {@link app()}.
+ * @param CApplication $app the application instance. If this is null, the existing
+ * application singleton will be removed.
+ * @throws CException if multiple application instances are registered.
+ */
+ public static function setApplication($app)
+ {
+ if(self::$_app===null || $app===null)
+ self::$_app=$app;
+ else
+ throw new CException(Yii::t('yii','Yii application can only be created once.'));
+ }
+
+ /**
+ * @return string the path of the framework
+ */
+ public static function getFrameworkPath()
+ {
+ return YII_PATH;
+ }
+
+ /**
+ * Creates an object and initializes it based on the given configuration.
+ *
+ * The specified configuration can be either a string or an array.
+ * If the former, the string is treated as the object type which can
+ * be either the class name or {@link YiiBase::getPathOfAlias class path alias}.
+ * If the latter, the 'class' element is treated as the object type,
+ * and the rest of the name-value pairs in the array are used to initialize
+ * the corresponding object properties.
+ *
+ * Any additional parameters passed to this method will be
+ * passed to the constructor of the object being created.
+ *
+ * @param mixed $config the configuration. It can be either a string or an array.
+ * @return mixed the created object
+ * @throws CException if the configuration does not have a 'class' element.
+ */
+ public static function createComponent($config)
+ {
+ if(is_string($config))
+ {
+ $type=$config;
+ $config=array();
+ }
+ elseif(isset($config['class']))
+ {
+ $type=$config['class'];
+ unset($config['class']);
+ }
+ else
+ throw new CException(Yii::t('yii','Object configuration must be an array containing a "class" element.'));
+
+ if(!class_exists($type,false))
+ $type=Yii::import($type,true);
+
+ if(($n=func_num_args())>1)
+ {
+ $args=func_get_args();
+ if($n===2)
+ $object=new $type($args[1]);
+ elseif($n===3)
+ $object=new $type($args[1],$args[2]);
+ elseif($n===4)
+ $object=new $type($args[1],$args[2],$args[3]);
+ else
+ {
+ unset($args[0]);
+ $class=new ReflectionClass($type);
+ // Note: ReflectionClass::newInstanceArgs() is available for PHP 5.1.3+
+ // $object=$class->newInstanceArgs($args);
+ $object=call_user_func_array(array($class,'newInstance'),$args);
+ }
+ }
+ else
+ $object=new $type;
+
+ foreach($config as $key=>$value)
+ $object->$key=$value;
+
+ return $object;
+ }
+
+ /**
+ * Imports a class or a directory.
+ *
+ * Importing a class is like including the corresponding class file.
+ * The main difference is that importing a class is much lighter because it only
+ * includes the class file when the class is referenced the first time.
+ *
+ * Importing a directory is equivalent to adding a directory into the PHP include path.
+ * If multiple directories are imported, the directories imported later will take
+ * precedence in class file searching (i.e., they are added to the front of the PHP include path).
+ *
+ * Path aliases are used to import a class or directory. For example,
+ * <ul>
+ * <li><code>application.components.GoogleMap</code>: import the <code>GoogleMap</code> class.</li>
+ * <li><code>application.components.*</code>: import the <code>components</code> directory.</li>
+ * </ul>
+ *
+ * The same path alias can be imported multiple times, but only the first time is effective.
+ * Importing a directory does not import any of its subdirectories.
+ *
+ * Starting from version 1.1.5, this method can also be used to import a class in namespace format
+ * (available for PHP 5.3 or above only). It is similar to importing a class in path alias format,
+ * except that the dot separator is replaced by the backslash separator. For example, importing
+ * <code>application\components\GoogleMap</code> is similar to importing <code>application.components.GoogleMap</code>.
+ * The difference is that the former class is using qualified name, while the latter unqualified.
+ *
+ * Note, importing a class in namespace format requires that the namespace corresponds to
+ * a valid path alias once backslash characters are replaced with dot characters.
+ * For example, the namespace <code>application\components</code> must correspond to a valid
+ * path alias <code>application.components</code>.
+ *
+ * @param string $alias path alias to be imported
+ * @param boolean $forceInclude whether to include the class file immediately. If false, the class file
+ * will be included only when the class is being used. This parameter is used only when
+ * the path alias refers to a class.
+ * @return string the class name or the directory that this alias refers to
+ * @throws CException if the alias is invalid
+ */
+ public static function import($alias,$forceInclude=false)
+ {
+ if(isset(self::$_imports[$alias])) // previously imported
+ return self::$_imports[$alias];
+
+ if(class_exists($alias,false) || interface_exists($alias,false))
+ return self::$_imports[$alias]=$alias;
+
+ if(($pos=strrpos($alias,'\\'))!==false) // a class name in PHP 5.3 namespace format
+ {
+ $namespace=str_replace('\\','.',ltrim(substr($alias,0,$pos),'\\'));
+ if(($path=self::getPathOfAlias($namespace))!==false)
+ {
+ $classFile=$path.DIRECTORY_SEPARATOR.substr($alias,$pos+1).'.php';
+ if($forceInclude)
+ {
+ if(is_file($classFile))
+ require($classFile);
+ else
+ throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file and the file is readable.',array('{alias}'=>$alias)));
+ self::$_imports[$alias]=$alias;
+ }
+ else
+ self::$classMap[$alias]=$classFile;
+ return $alias;
+ }
+ else
+ throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory.',
+ array('{alias}'=>$namespace)));
+ }
+
+ if(($pos=strrpos($alias,'.'))===false) // a simple class name
+ {
+ if($forceInclude && self::autoload($alias))
+ self::$_imports[$alias]=$alias;
+ return $alias;
+ }
+
+ $className=(string)substr($alias,$pos+1);
+ $isClass=$className!=='*';
+
+ if($isClass && (class_exists($className,false) || interface_exists($className,false)))
+ return self::$_imports[$alias]=$className;
+
+ if(($path=self::getPathOfAlias($alias))!==false)
+ {
+ if($isClass)
+ {
+ if($forceInclude)
+ {
+ if(is_file($path.'.php'))
+ require($path.'.php');
+ else
+ throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file and the file is readable.',array('{alias}'=>$alias)));
+ self::$_imports[$alias]=$className;
+ }
+ else
+ self::$classMap[$className]=$path.'.php';
+ return $className;
+ }
+ else // a directory
+ {
+ if(self::$_includePaths===null)
+ {
+ self::$_includePaths=array_unique(explode(PATH_SEPARATOR,get_include_path()));
+ if(($pos=array_search('.',self::$_includePaths,true))!==false)
+ unset(self::$_includePaths[$pos]);
+ }
+
+ array_unshift(self::$_includePaths,$path);
+
+ if(self::$enableIncludePath && set_include_path('.'.PATH_SEPARATOR.implode(PATH_SEPARATOR,self::$_includePaths))===false)
+ self::$enableIncludePath=false;
+
+ return self::$_imports[$alias]=$path;
+ }
+ }
+ else
+ throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory or file.',
+ array('{alias}'=>$alias)));
+ }
+
+ /**
+ * Translates an alias into a file path.
+ * Note, this method does not ensure the existence of the resulting file path.
+ * It only checks if the root alias is valid or not.
+ * @param string $alias alias (e.g. system.web.CController)
+ * @return mixed file path corresponding to the alias, false if the alias is invalid.
+ */
+ public static function getPathOfAlias($alias)
+ {
+ if(isset(self::$_aliases[$alias]))
+ return self::$_aliases[$alias];
+ elseif(($pos=strpos($alias,'.'))!==false)
+ {
+ $rootAlias=substr($alias,0,$pos);
+ if(isset(self::$_aliases[$rootAlias]))
+ return self::$_aliases[$alias]=rtrim(self::$_aliases[$rootAlias].DIRECTORY_SEPARATOR.str_replace('.',DIRECTORY_SEPARATOR,substr($alias,$pos+1)),'*'.DIRECTORY_SEPARATOR);
+ elseif(self::$_app instanceof CWebApplication)
+ {
+ if(self::$_app->findModule($rootAlias)!==null)
+ return self::getPathOfAlias($alias);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Create a path alias.
+ * Note, this method neither checks the existence of the path nor normalizes the path.
+ * @param string $alias alias to the path
+ * @param string $path the path corresponding to the alias. If this is null, the corresponding
+ * path alias will be removed.
+ */
+ public static function setPathOfAlias($alias,$path)
+ {
+ if(empty($path))
+ unset(self::$_aliases[$alias]);
+ else
+ self::$_aliases[$alias]=rtrim($path,'\\/');
+ }
+
+ /**
+ * Class autoload loader.
+ * This method is provided to be invoked within an __autoload() magic method.
+ * @param string $className class name
+ * @return boolean whether the class has been loaded successfully
+ */
+ public static function autoload($className)
+ {
+ // use include so that the error PHP file may appear
+ if(isset(self::$classMap[$className]))
+ include(self::$classMap[$className]);
+ elseif(isset(self::$_coreClasses[$className]))
+ include(YII_PATH.self::$_coreClasses[$className]);
+ else
+ {
+ // include class file relying on include_path
+ if(strpos($className,'\\')===false) // class without namespace
+ {
+ if(self::$enableIncludePath===false)
+ {
+ foreach(self::$_includePaths as $path)
+ {
+ $classFile=$path.DIRECTORY_SEPARATOR.$className.'.php';
+ if(is_file($classFile))
+ {
+ include($classFile);
+ if(YII_DEBUG && basename(realpath($classFile))!==$className.'.php')
+ throw new CException(Yii::t('yii','Class name "{class}" does not match class file "{file}".', array(
+ '{class}'=>$className,
+ '{file}'=>$classFile,
+ )));
+ break;
+ }
+ }
+ }
+ else
+ include($className.'.php');
+ }
+ else // class name with namespace in PHP 5.3
+ {
+ $namespace=str_replace('\\','.',ltrim($className,'\\'));
+ if(($path=self::getPathOfAlias($namespace))!==false)
+ include($path.'.php');
+ else
+ return false;
+ }
+ return class_exists($className,false) || interface_exists($className,false);
+ }
+ return true;
+ }
+
+ /**
+ * Writes a trace message.
+ * This method will only log a message when the application is in debug mode.
+ * @param string $msg message to be logged
+ * @param string $category category of the message
+ * @see log
+ */
+ public static function trace($msg,$category='application')
+ {
+ if(YII_DEBUG)
+ self::log($msg,CLogger::LEVEL_TRACE,$category);
+ }
+
+ /**
+ * Logs a message.
+ * Messages logged by this method may be retrieved via {@link CLogger::getLogs}
+ * and may be recorded in different media, such as file, email, database, using
+ * {@link CLogRouter}.
+ * @param string $msg message to be logged
+ * @param string $level level of the message (e.g. 'trace', 'warning', 'error'). It is case-insensitive.
+ * @param string $category category of the message (e.g. 'system.web'). It is case-insensitive.
+ */
+ public static function log($msg,$level=CLogger::LEVEL_INFO,$category='application')
+ {
+ if(self::$_logger===null)
+ self::$_logger=new CLogger;
+ if(YII_DEBUG && YII_TRACE_LEVEL>0 && $level!==CLogger::LEVEL_PROFILE)
+ {
+ $traces=debug_backtrace();
+ $count=0;
+ foreach($traces as $trace)
+ {
+ if(isset($trace['file'],$trace['line']) && strpos($trace['file'],YII_PATH)!==0)
+ {
+ $msg.="\nin ".$trace['file'].' ('.$trace['line'].')';
+ if(++$count>=YII_TRACE_LEVEL)
+ break;
+ }
+ }
+ }
+ self::$_logger->log($msg,$level,$category);
+ }
+
+ /**
+ * Marks the beginning of a code block for profiling.
+ * This has to be matched with a call to {@link endProfile()} with the same token.
+ * The begin- and end- calls must also be properly nested, e.g.,
+ * <pre>
+ * Yii::beginProfile('block1');
+ * Yii::beginProfile('block2');
+ * Yii::endProfile('block2');
+ * Yii::endProfile('block1');
+ * </pre>
+ * The following sequence is not valid:
+ * <pre>
+ * Yii::beginProfile('block1');
+ * Yii::beginProfile('block2');
+ * Yii::endProfile('block1');
+ * Yii::endProfile('block2');
+ * </pre>
+ * @param string $token token for the code block
+ * @param string $category the category of this log message
+ * @see endProfile
+ */
+ public static function beginProfile($token,$category='application')
+ {
+ self::log('begin:'.$token,CLogger::LEVEL_PROFILE,$category);
+ }
+
+ /**
+ * Marks the end of a code block for profiling.
+ * This has to be matched with a previous call to {@link beginProfile()} with the same token.
+ * @param string $token token for the code block
+ * @param string $category the category of this log message
+ * @see beginProfile
+ */
+ public static function endProfile($token,$category='application')
+ {
+ self::log('end:'.$token,CLogger::LEVEL_PROFILE,$category);
+ }
+
+ /**
+ * @return CLogger message logger
+ */
+ public static function getLogger()
+ {
+ if(self::$_logger!==null)
+ return self::$_logger;
+ else
+ return self::$_logger=new CLogger;
+ }
+
+ /**
+ * Sets the logger object.
+ * @param CLogger $logger the logger object.
+ * @since 1.1.8
+ */
+ public static function setLogger($logger)
+ {
+ self::$_logger=$logger;
+ }
+
+ /**
+ * Returns a string that can be displayed on your Web page showing Powered-by-Yii information
+ * @return string a string that can be displayed on your Web page showing Powered-by-Yii information
+ */
+ public static function powered()
+ {
+ return Yii::t('yii','Powered by {yii}.', array('{yii}'=>'<a href="http://www.yiiframework.com/" rel="external">Yii Framework</a>'));
+ }
+
+ /**
+ * Translates a message to the specified language.
+ * This method supports choice format (see {@link CChoiceFormat}),
+ * i.e., the message returned will be chosen from a few candidates according to the given
+ * number value. This feature is mainly used to solve plural format issue in case
+ * a message has different plural forms in some languages.
+ * @param string $category message category. Please use only word letters. Note, category 'yii' is
+ * reserved for Yii framework core code use. See {@link CPhpMessageSource} for
+ * more interpretation about message category.
+ * @param string $message the original message
+ * @param array $params parameters to be applied to the message using <code>strtr</code>.
+ * The first parameter can be a number without key.
+ * And in this case, the method will call {@link CChoiceFormat::format} to choose
+ * an appropriate message translation.
+ * Starting from version 1.1.6 you can pass parameter for {@link CChoiceFormat::format}
+ * or plural forms format without wrapping it with array.
+ * This parameter is then available as <code>{n}</code> in the message translation string.
+ * @param string $source which message source application component to use.
+ * Defaults to null, meaning using 'coreMessages' for messages belonging to
+ * the 'yii' category and using 'messages' for the rest messages.
+ * @param string $language the target language. If null (default), the {@link CApplication::getLanguage application language} will be used.
+ * @return string the translated message
+ * @see CMessageSource
+ */
+ public static function t($category,$message,$params=array(),$source=null,$language=null)
+ {
+ if(self::$_app!==null)
+ {
+ if($source===null)
+ $source=($category==='yii'||$category==='zii')?'coreMessages':'messages';
+ if(($source=self::$_app->getComponent($source))!==null)
+ $message=$source->translate($category,$message,$language);
+ }
+ if($params===array())
+ return $message;
+ if(!is_array($params))
+ $params=array($params);
+ if(isset($params[0])) // number choice
+ {
+ if(strpos($message,'|')!==false)
+ {
+ if(strpos($message,'#')===false)
+ {
+ $chunks=explode('|',$message);
+ $expressions=self::$_app->getLocale($language)->getPluralRules();
+ if($n=min(count($chunks),count($expressions)))
+ {
+ for($i=0;$i<$n;$i++)
+ $chunks[$i]=$expressions[$i].'#'.$chunks[$i];
+
+ $message=implode('|',$chunks);
+ }
+ }
+ $message=CChoiceFormat::format($message,$params[0]);
+ }
+ if(!isset($params['{n}']))
+ $params['{n}']=$params[0];
+ unset($params[0]);
+ }
+ return $params!==array() ? strtr($message,$params) : $message;
+ }
+
+ /**
+ * Registers a new class autoloader.
+ * The new autoloader will be placed before {@link autoload} and after
+ * any other existing autoloaders.
+ * @param callback $callback a valid PHP callback (function name or array($className,$methodName)).
+ * @param boolean $append whether to append the new autoloader after the default Yii autoloader.
+ */
+ public static function registerAutoloader($callback, $append=false)
+ {
+ if($append)
+ {
+ self::$enableIncludePath=false;
+ spl_autoload_register($callback);
+ }
+ else
+ {
+ spl_autoload_unregister(array('YiiBase','autoload'));
+ spl_autoload_register($callback);
+ spl_autoload_register(array('YiiBase','autoload'));
+ }
+ }
+
+ /**
+ * @var array class map for core Yii classes.
+ * NOTE, DO NOT MODIFY THIS ARRAY MANUALLY. IF YOU CHANGE OR ADD SOME CORE CLASSES,
+ * PLEASE RUN 'build autoload' COMMAND TO UPDATE THIS ARRAY.
+ */
+ private static $_coreClasses=array(
+ 'CApplication' => '/base/CApplication.php',
+ 'CApplicationComponent' => '/base/CApplicationComponent.php',
+ 'CBehavior' => '/base/CBehavior.php',
+ 'CComponent' => '/base/CComponent.php',
+ 'CErrorEvent' => '/base/CErrorEvent.php',
+ 'CErrorHandler' => '/base/CErrorHandler.php',
+ 'CException' => '/base/CException.php',
+ 'CExceptionEvent' => '/base/CExceptionEvent.php',
+ 'CHttpException' => '/base/CHttpException.php',
+ 'CModel' => '/base/CModel.php',
+ 'CModelBehavior' => '/base/CModelBehavior.php',
+ 'CModelEvent' => '/base/CModelEvent.php',
+ 'CModule' => '/base/CModule.php',
+ 'CSecurityManager' => '/base/CSecurityManager.php',
+ 'CStatePersister' => '/base/CStatePersister.php',
+ 'CApcCache' => '/caching/CApcCache.php',
+ 'CCache' => '/caching/CCache.php',
+ 'CDbCache' => '/caching/CDbCache.php',
+ 'CDummyCache' => '/caching/CDummyCache.php',
+ 'CEAcceleratorCache' => '/caching/CEAcceleratorCache.php',
+ 'CFileCache' => '/caching/CFileCache.php',
+ 'CMemCache' => '/caching/CMemCache.php',
+ 'CWinCache' => '/caching/CWinCache.php',
+ 'CXCache' => '/caching/CXCache.php',
+ 'CZendDataCache' => '/caching/CZendDataCache.php',
+ 'CCacheDependency' => '/caching/dependencies/CCacheDependency.php',
+ 'CChainedCacheDependency' => '/caching/dependencies/CChainedCacheDependency.php',
+ 'CDbCacheDependency' => '/caching/dependencies/CDbCacheDependency.php',
+ 'CDirectoryCacheDependency' => '/caching/dependencies/CDirectoryCacheDependency.php',
+ 'CExpressionDependency' => '/caching/dependencies/CExpressionDependency.php',
+ 'CFileCacheDependency' => '/caching/dependencies/CFileCacheDependency.php',
+ 'CGlobalStateCacheDependency' => '/caching/dependencies/CGlobalStateCacheDependency.php',
+ 'CAttributeCollection' => '/collections/CAttributeCollection.php',
+ 'CConfiguration' => '/collections/CConfiguration.php',
+ 'CList' => '/collections/CList.php',
+ 'CListIterator' => '/collections/CListIterator.php',
+ 'CMap' => '/collections/CMap.php',
+ 'CMapIterator' => '/collections/CMapIterator.php',
+ 'CQueue' => '/collections/CQueue.php',
+ 'CQueueIterator' => '/collections/CQueueIterator.php',
+ 'CStack' => '/collections/CStack.php',
+ 'CStackIterator' => '/collections/CStackIterator.php',
+ 'CTypedList' => '/collections/CTypedList.php',
+ 'CTypedMap' => '/collections/CTypedMap.php',
+ 'CConsoleApplication' => '/console/CConsoleApplication.php',
+ 'CConsoleCommand' => '/console/CConsoleCommand.php',
+ 'CConsoleCommandBehavior' => '/console/CConsoleCommandBehavior.php',
+ 'CConsoleCommandEvent' => '/console/CConsoleCommandEvent.php',
+ 'CConsoleCommandRunner' => '/console/CConsoleCommandRunner.php',
+ 'CHelpCommand' => '/console/CHelpCommand.php',
+ 'CDbCommand' => '/db/CDbCommand.php',
+ 'CDbConnection' => '/db/CDbConnection.php',
+ 'CDbDataReader' => '/db/CDbDataReader.php',
+ 'CDbException' => '/db/CDbException.php',
+ 'CDbMigration' => '/db/CDbMigration.php',
+ 'CDbTransaction' => '/db/CDbTransaction.php',
+ 'CActiveFinder' => '/db/ar/CActiveFinder.php',
+ 'CActiveRecord' => '/db/ar/CActiveRecord.php',
+ 'CActiveRecordBehavior' => '/db/ar/CActiveRecordBehavior.php',
+ 'CDbColumnSchema' => '/db/schema/CDbColumnSchema.php',
+ 'CDbCommandBuilder' => '/db/schema/CDbCommandBuilder.php',
+ 'CDbCriteria' => '/db/schema/CDbCriteria.php',
+ 'CDbExpression' => '/db/schema/CDbExpression.php',
+ 'CDbSchema' => '/db/schema/CDbSchema.php',
+ 'CDbTableSchema' => '/db/schema/CDbTableSchema.php',
+ 'CMssqlColumnSchema' => '/db/schema/mssql/CMssqlColumnSchema.php',
+ 'CMssqlCommandBuilder' => '/db/schema/mssql/CMssqlCommandBuilder.php',
+ 'CMssqlPdoAdapter' => '/db/schema/mssql/CMssqlPdoAdapter.php',
+ 'CMssqlSchema' => '/db/schema/mssql/CMssqlSchema.php',
+ 'CMssqlSqlsrvPdoAdapter' => '/db/schema/mssql/CMssqlSqlsrvPdoAdapter.php',
+ 'CMssqlTableSchema' => '/db/schema/mssql/CMssqlTableSchema.php',
+ 'CMysqlColumnSchema' => '/db/schema/mysql/CMysqlColumnSchema.php',
+ 'CMysqlCommandBuilder' => '/db/schema/mysql/CMysqlCommandBuilder.php',
+ 'CMysqlSchema' => '/db/schema/mysql/CMysqlSchema.php',
+ 'CMysqlTableSchema' => '/db/schema/mysql/CMysqlTableSchema.php',
+ 'COciColumnSchema' => '/db/schema/oci/COciColumnSchema.php',
+ 'COciCommandBuilder' => '/db/schema/oci/COciCommandBuilder.php',
+ 'COciSchema' => '/db/schema/oci/COciSchema.php',
+ 'COciTableSchema' => '/db/schema/oci/COciTableSchema.php',
+ 'CPgsqlColumnSchema' => '/db/schema/pgsql/CPgsqlColumnSchema.php',
+ 'CPgsqlSchema' => '/db/schema/pgsql/CPgsqlSchema.php',
+ 'CPgsqlTableSchema' => '/db/schema/pgsql/CPgsqlTableSchema.php',
+ 'CSqliteColumnSchema' => '/db/schema/sqlite/CSqliteColumnSchema.php',
+ 'CSqliteCommandBuilder' => '/db/schema/sqlite/CSqliteCommandBuilder.php',
+ 'CSqliteSchema' => '/db/schema/sqlite/CSqliteSchema.php',
+ 'CChoiceFormat' => '/i18n/CChoiceFormat.php',
+ 'CDateFormatter' => '/i18n/CDateFormatter.php',
+ 'CDbMessageSource' => '/i18n/CDbMessageSource.php',
+ 'CGettextMessageSource' => '/i18n/CGettextMessageSource.php',
+ 'CLocale' => '/i18n/CLocale.php',
+ 'CMessageSource' => '/i18n/CMessageSource.php',
+ 'CNumberFormatter' => '/i18n/CNumberFormatter.php',
+ 'CPhpMessageSource' => '/i18n/CPhpMessageSource.php',
+ 'CGettextFile' => '/i18n/gettext/CGettextFile.php',
+ 'CGettextMoFile' => '/i18n/gettext/CGettextMoFile.php',
+ 'CGettextPoFile' => '/i18n/gettext/CGettextPoFile.php',
+ 'CChainedLogFilter' => '/logging/CChainedLogFilter.php',
+ 'CDbLogRoute' => '/logging/CDbLogRoute.php',
+ 'CEmailLogRoute' => '/logging/CEmailLogRoute.php',
+ 'CFileLogRoute' => '/logging/CFileLogRoute.php',
+ 'CLogFilter' => '/logging/CLogFilter.php',
+ 'CLogRoute' => '/logging/CLogRoute.php',
+ 'CLogRouter' => '/logging/CLogRouter.php',
+ 'CLogger' => '/logging/CLogger.php',
+ 'CProfileLogRoute' => '/logging/CProfileLogRoute.php',
+ 'CWebLogRoute' => '/logging/CWebLogRoute.php',
+ 'CDateTimeParser' => '/utils/CDateTimeParser.php',
+ 'CFileHelper' => '/utils/CFileHelper.php',
+ 'CFormatter' => '/utils/CFormatter.php',
+ 'CMarkdownParser' => '/utils/CMarkdownParser.php',
+ 'CPropertyValue' => '/utils/CPropertyValue.php',
+ 'CTimestamp' => '/utils/CTimestamp.php',
+ 'CVarDumper' => '/utils/CVarDumper.php',
+ 'CBooleanValidator' => '/validators/CBooleanValidator.php',
+ 'CCaptchaValidator' => '/validators/CCaptchaValidator.php',
+ 'CCompareValidator' => '/validators/CCompareValidator.php',
+ 'CDateValidator' => '/validators/CDateValidator.php',
+ 'CDefaultValueValidator' => '/validators/CDefaultValueValidator.php',
+ 'CEmailValidator' => '/validators/CEmailValidator.php',
+ 'CExistValidator' => '/validators/CExistValidator.php',
+ 'CFileValidator' => '/validators/CFileValidator.php',
+ 'CFilterValidator' => '/validators/CFilterValidator.php',
+ 'CInlineValidator' => '/validators/CInlineValidator.php',
+ 'CNumberValidator' => '/validators/CNumberValidator.php',
+ 'CRangeValidator' => '/validators/CRangeValidator.php',
+ 'CRegularExpressionValidator' => '/validators/CRegularExpressionValidator.php',
+ 'CRequiredValidator' => '/validators/CRequiredValidator.php',
+ 'CSafeValidator' => '/validators/CSafeValidator.php',
+ 'CStringValidator' => '/validators/CStringValidator.php',
+ 'CTypeValidator' => '/validators/CTypeValidator.php',
+ 'CUniqueValidator' => '/validators/CUniqueValidator.php',
+ 'CUnsafeValidator' => '/validators/CUnsafeValidator.php',
+ 'CUrlValidator' => '/validators/CUrlValidator.php',
+ 'CValidator' => '/validators/CValidator.php',
+ 'CActiveDataProvider' => '/web/CActiveDataProvider.php',
+ 'CArrayDataProvider' => '/web/CArrayDataProvider.php',
+ 'CAssetManager' => '/web/CAssetManager.php',
+ 'CBaseController' => '/web/CBaseController.php',
+ 'CCacheHttpSession' => '/web/CCacheHttpSession.php',
+ 'CClientScript' => '/web/CClientScript.php',
+ 'CController' => '/web/CController.php',
+ 'CDataProvider' => '/web/CDataProvider.php',
+ 'CDataProviderIterator' => '/web/CDataProviderIterator.php',
+ 'CDbHttpSession' => '/web/CDbHttpSession.php',
+ 'CExtController' => '/web/CExtController.php',
+ 'CFormModel' => '/web/CFormModel.php',
+ 'CHttpCookie' => '/web/CHttpCookie.php',
+ 'CHttpRequest' => '/web/CHttpRequest.php',
+ 'CHttpSession' => '/web/CHttpSession.php',
+ 'CHttpSessionIterator' => '/web/CHttpSessionIterator.php',
+ 'COutputEvent' => '/web/COutputEvent.php',
+ 'CPagination' => '/web/CPagination.php',
+ 'CSort' => '/web/CSort.php',
+ 'CSqlDataProvider' => '/web/CSqlDataProvider.php',
+ 'CTheme' => '/web/CTheme.php',
+ 'CThemeManager' => '/web/CThemeManager.php',
+ 'CUploadedFile' => '/web/CUploadedFile.php',
+ 'CUrlManager' => '/web/CUrlManager.php',
+ 'CWebApplication' => '/web/CWebApplication.php',
+ 'CWebModule' => '/web/CWebModule.php',
+ 'CWidgetFactory' => '/web/CWidgetFactory.php',
+ 'CAction' => '/web/actions/CAction.php',
+ 'CInlineAction' => '/web/actions/CInlineAction.php',
+ 'CViewAction' => '/web/actions/CViewAction.php',
+ 'CAccessControlFilter' => '/web/auth/CAccessControlFilter.php',
+ 'CAuthAssignment' => '/web/auth/CAuthAssignment.php',
+ 'CAuthItem' => '/web/auth/CAuthItem.php',
+ 'CAuthManager' => '/web/auth/CAuthManager.php',
+ 'CBaseUserIdentity' => '/web/auth/CBaseUserIdentity.php',
+ 'CDbAuthManager' => '/web/auth/CDbAuthManager.php',
+ 'CPhpAuthManager' => '/web/auth/CPhpAuthManager.php',
+ 'CUserIdentity' => '/web/auth/CUserIdentity.php',
+ 'CWebUser' => '/web/auth/CWebUser.php',
+ 'CFilter' => '/web/filters/CFilter.php',
+ 'CFilterChain' => '/web/filters/CFilterChain.php',
+ 'CHttpCacheFilter' => '/web/filters/CHttpCacheFilter.php',
+ 'CInlineFilter' => '/web/filters/CInlineFilter.php',
+ 'CForm' => '/web/form/CForm.php',
+ 'CFormButtonElement' => '/web/form/CFormButtonElement.php',
+ 'CFormElement' => '/web/form/CFormElement.php',
+ 'CFormElementCollection' => '/web/form/CFormElementCollection.php',
+ 'CFormInputElement' => '/web/form/CFormInputElement.php',
+ 'CFormStringElement' => '/web/form/CFormStringElement.php',
+ 'CGoogleApi' => '/web/helpers/CGoogleApi.php',
+ 'CHtml' => '/web/helpers/CHtml.php',
+ 'CJSON' => '/web/helpers/CJSON.php',
+ 'CJavaScript' => '/web/helpers/CJavaScript.php',
+ 'CJavaScriptExpression' => '/web/helpers/CJavaScriptExpression.php',
+ 'CPradoViewRenderer' => '/web/renderers/CPradoViewRenderer.php',
+ 'CViewRenderer' => '/web/renderers/CViewRenderer.php',
+ 'CWebService' => '/web/services/CWebService.php',
+ 'CWebServiceAction' => '/web/services/CWebServiceAction.php',
+ 'CWsdlGenerator' => '/web/services/CWsdlGenerator.php',
+ 'CActiveForm' => '/web/widgets/CActiveForm.php',
+ 'CAutoComplete' => '/web/widgets/CAutoComplete.php',
+ 'CClipWidget' => '/web/widgets/CClipWidget.php',
+ 'CContentDecorator' => '/web/widgets/CContentDecorator.php',
+ 'CFilterWidget' => '/web/widgets/CFilterWidget.php',
+ 'CFlexWidget' => '/web/widgets/CFlexWidget.php',
+ 'CHtmlPurifier' => '/web/widgets/CHtmlPurifier.php',
+ 'CInputWidget' => '/web/widgets/CInputWidget.php',
+ 'CMarkdown' => '/web/widgets/CMarkdown.php',
+ 'CMaskedTextField' => '/web/widgets/CMaskedTextField.php',
+ 'CMultiFileUpload' => '/web/widgets/CMultiFileUpload.php',
+ 'COutputCache' => '/web/widgets/COutputCache.php',
+ 'COutputProcessor' => '/web/widgets/COutputProcessor.php',
+ 'CStarRating' => '/web/widgets/CStarRating.php',
+ 'CTabView' => '/web/widgets/CTabView.php',
+ 'CTextHighlighter' => '/web/widgets/CTextHighlighter.php',
+ 'CTreeView' => '/web/widgets/CTreeView.php',
+ 'CWidget' => '/web/widgets/CWidget.php',
+ 'CCaptcha' => '/web/widgets/captcha/CCaptcha.php',
+ 'CCaptchaAction' => '/web/widgets/captcha/CCaptchaAction.php',
+ 'CBasePager' => '/web/widgets/pagers/CBasePager.php',
+ 'CLinkPager' => '/web/widgets/pagers/CLinkPager.php',
+ 'CListPager' => '/web/widgets/pagers/CListPager.php',
+ );
+}
+
+spl_autoload_register(array('YiiBase','autoload'));
+require(YII_PATH.'/base/interfaces.php');
978 framework/base/CApplication.php
@@ -0,0 +1,978 @@
+<?php
+/**
+ * CApplication class file.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.yiiframework.com/
+ * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @license http://www.yiiframework.com/license/
+ */
+
+/**
+ * CApplication is the base class for all application classes.
+ *
+ * An application serves as the global context that the user request
+ * is being processed. It manages a set of application components that
+ * provide specific functionalities to the whole application.
+ *
+ * The core application components provided by CApplication are the following:
+ * <ul>
+ * <li>{@link getErrorHandler errorHandler}: handles PHP errors and
+ * uncaught exceptions. This application component is dynamically loaded when needed.</li>
+ * <li>{@link getSecurityManager securityManager}: provides security-related
+ * services, such as hashing, encryption. This application component is dynamically
+ * loaded when needed.</li>
+ * <li>{@link getStatePersister statePersister}: provides global state
+ * persistence method. This application component is dynamically loaded when needed.</li>
+ * <li>{@link getCache cache}: provides caching feature. This application component is
+ * disabled by default.</li>
+ * <li>{@link getMessages messages}: provides the message source for translating
+ * application messages. This application component is dynamically loaded when needed.</li>
+ * <li>{@link getCoreMessages coreMessages}: provides the message source for translating
+ * Yii framework messages. This application component is dynamically loaded when needed.</li>
+ * <li>{@link getUrlManager urlManager}: provides URL construction as well as parsing functionality.
+ * This application component is dynamically loaded when needed.</li>
+ * <li>{@link getRequest request}: represents the current HTTP request by encapsulating
+ * the $_SERVER variable and managing cookies sent from and sent to the user.
+ * This application component is dynamically loaded when needed.</li>
+ * <li>{@link getFormat format}: provides a set of commonly used data formatting methods.
+ * This application component is dynamically loaded when needed.</li>
+ * </ul>
+ *
+ * CApplication will undergo the following lifecycles when processing a user request:
+ * <ol>
+ * <li>load application configuration;</li>
+ * <li>set up class autoloader and error handling;</li>
+ * <li>load static application components;</li>
+ * <li>{@link onBeginRequest}: preprocess the user request;</li>
+ * <li>{@link processRequest}: process the user request;</li>
+ * <li>{@link onEndRequest}: postprocess the user request;</li>
+ * </ol>
+ *
+ * Starting from lifecycle 3, if a PHP error or an uncaught exception occurs,
+ * the application will switch to its error handling logic and jump to step 6 afterwards.
+ *
+ * @property string $id The unique identifier for the application.
+ * @property string $basePath The root directory of the application. Defaults to 'protected'.
+ * @property string $runtimePath The directory that stores runtime files. Defaults to 'protected/runtime'.
+ * @property string $extensionPath The directory that contains all extensions. Defaults to the 'extensions' directory under 'protected'.
+ * @property string $language The language that the user is using and the application should be targeted to.
+ * Defaults to the {@link sourceLanguage source language}.
+ * @property string $timeZone The time zone used by this application.
+ * @property CLocale $locale The locale instance.
+ * @property string $localeDataPath The directory that contains the locale data. It defaults to 'framework/i18n/data'.
+ * @property CNumberFormatter $numberFormatter The locale-dependent number formatter.
+ * The current {@link getLocale application locale} will be used.
+ * @property CDateFormatter $dateFormatter The locale-dependent date formatter.
+ * The current {@link getLocale application locale} will be used.
+ * @property CDbConnection $db The database connection.
+ * @property CErrorHandler $errorHandler The error handler application component.
+ * @property CSecurityManager $securityManager The security manager application component.
+ * @property CStatePersister $statePersister The state persister application component.
+ * @property CCache $cache The cache application component. Null if the component is not enabled.
+ * @property CPhpMessageSource $coreMessages The core message translations.
+ * @property CMessageSource $messages The application message translations.
+ * @property CHttpRequest $request The request component.
+ * @property CUrlManager $urlManager The URL manager component.
+ * @property CController $controller The currently active controller. Null is returned in this base class.
+ * @property string $baseUrl The relative URL for the application.
+ * @property string $homeUrl The homepage URL.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package system.base
+ * @since 1.0
+ */
+abstract class CApplication extends CModule
+{
+ /**
+ * @var string the application name. Defaults to 'My Application'.
+ */
+ public $name='My Application';
+ /**
+ * @var string the charset currently used for the application. Defaults to 'UTF-8'.
+ */
+ public $charset='UTF-8';
+ /**
+ * @var string the language that the application is written in. This mainly refers to
+ * the language that the messages and view files are in. Defaults to 'en_us' (US English).
+ */
+ public $sourceLanguage='en_us';
+
+ private $_id;
+ private $_basePath;
+ private $_runtimePath;
+ private $_extensionPath;
+ private $_globalState;
+ private $_stateChanged;
+ private $_ended=false;
+ private $_language;
+ private $_homeUrl;
+
+ /**
+ * Processes the request.
+ * This is the place where the actual request processing work is done.
+ * Derived classes should override this method.
+ */
+ abstract public function processRequest();
+
+ /**
+ * Constructor.
+ * @param mixed $config application configuration.
+ * If a string, it is treated as the path of the file that contains the configuration;
+ * If an array, it is the actual configuration information.
+ * Please make sure you specify the {@link getBasePath basePath} property in the configuration,
+ * which should point to the directory containing all application logic, template and data.
+ * If not, the directory will be defaulted to 'protected'.
+ */
+ public function __construct($config=null)
+ {
+ Yii::setApplication($this);
+
+ // set basePath at early as possible to avoid trouble
+ if(is_string($config))
+ $config=require($config);
+ if(isset($config['basePath']))
+ {
+ $this->setBasePath($config['basePath']);
+ unset($config['basePath']);
+ }
+ else
+ $this->setBasePath('protected');
+ Yii::setPathOfAlias('application',$this->getBasePath());
+ Yii::setPathOfAlias('webroot',dirname($_SERVER['SCRIPT_FILENAME']));
+ Yii::setPathOfAlias('ext',$this->getBasePath().DIRECTORY_SEPARATOR.'extensions');
+
+ $this->preinit();
+
+ $this->initSystemHandlers();
+ $this->registerCoreComponents();
+
+ $this->configure($config);
+ $this->attachBehaviors($this->behaviors);
+ $this->preloadComponents();
+
+ $this->init();
+ }
+
+
+ /**
+ * Runs the application.
+ * This method loads static application components. Derived classes usually overrides this
+ * method to do more application-specific tasks.
+ * Remember to call the parent implementation so that static application components are loaded.
+ */
+ public function run()
+ {
+ if($this->hasEventHandler('onBeginRequest'))
+ $this->onBeginRequest(new CEvent($this));
+ register_shutdown_function(array($this,'end'),0,false);
+ $this->processRequest();
+ if($this->hasEventHandler('onEndRequest'))
+ $this->onEndRequest(new CEvent($this));
+ }
+
+ /**
+ * Terminates the application.
+ * This method replaces PHP's exit() function by calling
+ * {@link onEndRequest} before exiting.
+ * @param integer $status exit status (value 0 means normal exit while other values mean abnormal exit).
+ * @param boolean $exit whether to exit the current request. This parameter has been available since version 1.1.5.
+ * It defaults to true, meaning the PHP's exit() function will be called at the end of this method.
+ */
+ public function end($status=0,$exit=true)
+ {
+ if($this->hasEventHandler('onEndRequest'))
+ $this->onEndRequest(new CEvent($this));
+ if($exit)
+ exit($status);
+ }
+
+ /**
+ * Raised right BEFORE the application processes the request.
+ * @param CEvent $event the event parameter
+ */
+ public function onBeginRequest($event)
+ {
+ $this->raiseEvent('onBeginRequest',$event);