Permalink
Browse files

init

  • Loading branch information...
wzlibra committed Jan 17, 2013
1 parent 93ba095 commit 8b5f156a34be62dd643be8379142080cb98e6581
Showing with 11,383 additions and 0 deletions.
  1. +21 −0 config/application.config.php
  2. +21 −0 config/autoload/bjyprofiler.global.php
  3. +33 −0 config/autoload/global.php
  4. +24 −0 config/autoload/local.php.dist
  5. +220 −0 config/autoload/user.global.php
  6. +163 −0 config/autoload/zenddevelopertools.global.php
  7. +1 −0 data/cache/ZDT_ZF_Version.cache
  8. +49 −0 init_autoloader.php
  9. +93 −0 module/Admin/Module.php
  10. +102 −0 module/Admin/README.md
  11. +36 −0 module/Admin/composer.json
  12. +52 −0 module/Admin/config/admin.global.php
  13. +69 −0 module/Admin/config/module.config.php
  14. +40 −0 module/Admin/src/Admin/Controller/AdminController.php
  15. +22 −0 module/Admin/src/Admin/Navigation/Service/AdminNavigationFactory.php
  16. +3 −0 module/Admin/view/admin/admin/index.phtml
  17. +57 −0 module/Admin/view/layout/admin.phtml
  18. +45 −0 module/Application/Module.php
  19. +98 −0 module/Application/config/module.config.php
  20. BIN module/Application/language/ar_SY.mo
  21. +184 −0 module/Application/language/ar_SY.po
  22. BIN module/Application/language/cs_CZ.mo
  23. +153 −0 module/Application/language/cs_CZ.po
  24. BIN module/Application/language/de_DE.mo
  25. +153 −0 module/Application/language/de_DE.po
  26. BIN module/Application/language/en_US.mo
  27. +153 −0 module/Application/language/en_US.po
  28. BIN module/Application/language/es_ES.mo
  29. +111 −0 module/Application/language/es_ES.po
  30. BIN module/Application/language/fr_CA.mo
  31. +153 −0 module/Application/language/fr_CA.po
  32. BIN module/Application/language/fr_FR.mo
  33. +153 −0 module/Application/language/fr_FR.po
  34. BIN module/Application/language/it_IT.mo
  35. +154 −0 module/Application/language/it_IT.po
  36. BIN module/Application/language/ja_JP.mo
  37. +140 −0 module/Application/language/ja_JP.po
  38. BIN module/Application/language/nb_NO.mo
  39. +184 −0 module/Application/language/nb_NO.po
  40. BIN module/Application/language/nl_NL.mo
  41. +153 −0 module/Application/language/nl_NL.po
  42. BIN module/Application/language/pl_PL.mo
  43. +153 −0 module/Application/language/pl_PL.po
  44. BIN module/Application/language/pt_BR.mo
  45. +153 −0 module/Application/language/pt_BR.po
  46. BIN module/Application/language/ru_RU.mo
  47. +182 −0 module/Application/language/ru_RU.po
  48. BIN module/Application/language/tr_TR.mo
  49. +153 −0 module/Application/language/tr_TR.po
  50. BIN module/Application/language/zh_CN.mo
  51. +174 −0 module/Application/language/zh_CN.po
  52. BIN module/Application/language/zh_TW.mo
  53. +175 −0 module/Application/language/zh_TW.po
  54. +24 −0 module/Application/src/Application/Controller/IndexController.php
  55. +135 −0 module/Application/view/application/index/index.phtml
  56. +1 −0 module/Application/view/application/index/script.phtml
  57. +107 −0 module/Application/view/error/404.phtml
  58. +62 −0 module/Application/view/error/index.phtml
  59. +142 −0 module/Application/view/layout/layout.phtml
  60. +168 −0 module/User/Module.php
  61. +44 −0 module/User/autoload_classmap.php
  62. +5 −0 module/User/config/README.md
  63. +108 −0 module/User/config/module.config.php
  64. +220 −0 module/User/config/user.global.php.dist
  65. +9 −0 module/User/data/schema.sql
  66. +9 −0 module/User/data/schema.sqlite.sql
  67. +66 −0 module/User/src/Authentication/Adapter/AbstractAdapter.php
  68. +115 −0 module/User/src/Authentication/Adapter/AdapterChain.php
  69. +103 −0 module/User/src/Authentication/Adapter/AdapterChainEvent.php
  70. +17 −0 module/User/src/Authentication/Adapter/AdapterChainServiceFactory.php
  71. +8 −0 module/User/src/Authentication/Adapter/ChainableAdapter.php
  72. +207 −0 module/User/src/Authentication/Adapter/Db.php
  73. +169 −0 module/User/src/Authentication/Storage/Db.php
  74. +89 −0 module/User/src/Controller/Plugin/UserAuthentication.php
  75. +421 −0 module/User/src/Controller/UserController.php
  76. +168 −0 module/User/src/Entity/User.php
  77. +97 −0 module/User/src/Entity/UserInterface.php
  78. +8 −0 module/User/src/Exception/DomainException.php
  79. +7 −0 module/User/src/Exception/ExceptionInterface.php
  80. +100 −0 module/User/src/Form/Base.php
  81. +80 −0 module/User/src/Form/ChangeEmail.php
  82. +65 −0 module/User/src/Form/ChangeEmailFilter.php
  83. +95 −0 module/User/src/Form/ChangePassword.php
  84. +80 −0 module/User/src/Form/ChangePasswordFilter.php
  85. +95 −0 module/User/src/Form/Login.php
  86. +44 −0 module/User/src/Form/LoginFilter.php
  87. +66 −0 module/User/src/Form/Register.php
  88. +148 −0 module/User/src/Form/RegisterFilter.php
  89. +8 −0 module/User/src/Mapper/Exception/ExceptionInterface.php
  90. +6 −0 module/User/src/Mapper/Exception/InvalidArgumentException.php
  91. +6 −0 module/User/src/Mapper/Exception/RuntimeException.php
  92. +58 −0 module/User/src/Mapper/User.php
  93. +52 −0 module/User/src/Mapper/UserHydrator.php
  94. +16 −0 module/User/src/Mapper/UserInterface.php
  95. +36 −0 module/User/src/Options/AuthenticationOptionsInterface.php
  96. +508 −0 module/User/src/Options/ModuleOptions.php
  97. +21 −0 module/User/src/Options/PasswordOptionsInterface.php
  98. +109 −0 module/User/src/Options/RegistrationOptionsInterface.php
  99. +22 −0 module/User/src/Options/UserControllerOptionsInterface.php
  100. +25 −0 module/User/src/Options/UserServiceOptionsInterface.php
  101. +7 −0 module/User/src/Service/Exception/ExceptionInterface.php
  102. +7 −0 module/User/src/Service/Exception/InvalidArgumentException.php
  103. +284 −0 module/User/src/Service/User.php
  104. +118 −0 module/User/src/Validator/AbstractRecord.php
  105. +6 −0 module/User/src/Validator/Exception/ExceptionInterface.php
  106. +6 −0 module/User/src/Validator/Exception/InvalidArgumentException.php
  107. +20 −0 module/User/src/Validator/NoRecordExists.php
  108. +20 −0 module/User/src/Validator/RecordExists.php
  109. +69 −0 module/User/src/View/Helper/UserDisplayName.php
  110. +50 −0 module/User/src/View/Helper/UserIdentity.php
  111. +83 −0 module/User/src/View/Helper/UserLoginWidget.php
  112. +35 −0 module/User/view/user/user/changeemail.phtml
  113. +47 −0 module/User/view/user/user/changepassword.phtml
  114. +4 −0 module/User/view/user/user/index.phtml
  115. +32 −0 module/User/view/user/user/login.phtml
  116. +32 −0 module/User/view/user/user/register.phtml
  117. +22 −0 module/WhBase/Module.php
  118. +3 −0 module/WhBase/README.md
  119. +11 −0 module/WhBase/autoload_classmap.php
  120. +33 −0 module/WhBase/composer.json
  121. +41 −0 module/WhBase/src/Db/Adapter/MasterSlaveAdapter.php
  122. +11 −0 module/WhBase/src/Db/Adapter/MasterSlaveAdapterInterface.php
  123. +56 −0 module/WhBase/src/EventManager/EventProvider.php
  124. +54 −0 module/WhBase/src/Form/ProvidesEventsForm.php
  125. +54 −0 module/WhBase/src/InputFilter/ProvidesEventsInputFilter.php
  126. +339 −0 module/WhBase/src/Mapper/AbstractDbMapper.php
  127. +6 −0 module/WhBase/src/Mapper/Exception/ExceptionInterface.php
  128. +6 −0 module/WhBase/src/Mapper/Exception/InvalidArgumentException.php
  129. +6 −0 public/.htaccess
  130. BIN public/css/FontAwesome.otf
  131. +9 −0 public/css/bootstrap-responsive.min.css
  132. +9 −0 public/css/bootstrap.min.css
  133. +501 −0 public/css/charisma-app.css
  134. +1,064 −0 public/css/docs.css
  135. +34 −0 public/css/font-awesome.min.css
  136. BIN public/css/fontawesome-webfont.eot
  137. BIN public/css/fontawesome-webfont.ttf
  138. BIN public/css/fontawesome-webfont.woff
  139. +174 −0 public/css/style.css
  140. BIN public/images/favicon.ico
  141. BIN public/images/zf2-logo.png
  142. +15 −0 public/index.php
  143. 0 public/js/application.js
  144. +125 −0 public/js/bootstrap-scrollspy.js
  145. +6 −0 public/js/bootstrap.min.js
  146. +3 −0 public/js/html5.js
  147. +2 −0 public/js/jquery.min.js
@@ -0,0 +1,21 @@
+<?php
+return array (
+ 'modules' => array (
+ 'Application',
+ 'WhBase',
+ 'User',
+ 'Stock',
+ 'Admin',
+ 'ZendDeveloperTools',
+ 'BjyProfiler',
+ ),
+ 'module_listener_options' => array (
+ 'config_glob_paths' => array (
+ 'config/autoload/{,*.}{global,local}.php'
+ ),
+ 'module_paths' => array (
+ './module',
+ './vendor'
+ )
+ )
+);
@@ -0,0 +1,21 @@
+<?php
+return array(
+ 'service_manager' => array(
+ 'factories' => array(
+ 'Zend\Db\Adapter\Adapter' => function ($sm) {
+ $config = $sm->get('Configuration');
+ if(!isset($config['db'])){
+ return array();
+ }
+ if(class_exists('BjyProfiler\Db\Adapter\ProfilingAdapter')){
+ $adapter = new BjyProfiler\Db\Adapter\ProfilingAdapter($config['db']);
+ $adapter->setProfiler(new BjyProfiler\Db\Profiler\Profiler);
+ $adapter->injectProfilingStatementPrototype();
+ } else {
+ $adapter = new Zend\Db\Adapter\Adapter($config['db']);
+ }
+ return $adapter;
+ },
+ ),
+ ),
+);
View
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Global Configuration Override
+ *
+ * You can use this file for overriding configuration values from modules, etc.
+ * You would place values in here that are agnostic to the environment and not
+ * sensitive to security.
+ *
+ * @NOTE: In practice, this file will typically be INCLUDED in your source
+ * control, so do not include passwords or other sensitive information in this
+ * file.
+ */
+
+return array(
+
+ 'db' => array(
+ 'driver' => 'Pdo',
+ 'dsn' => 'mysql:dbname=toa;host=localhost',
+ 'username' => 'root',
+ 'password' => '',
+ 'driver_options' => array(
+ PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
+ ),
+ ),
+
+ 'service_manager' => array(
+ 'factories' => array(
+ 'Zend\Db\Adapter\Adapter'=> 'Zend\Db\Adapter\AdapterServiceFactory',
+ ),
+ ),
+
+ // ...
+);
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Local Configuration Override
+ *
+ * This configuration override file is for overriding environment-specific and
+ * security-sensitive configuration information. Copy this file without the
+ * .dist extension at the end and populate values as needed.
+ *
+ * @NOTE: This file is ignored from Git by default with the .gitignore included
+ * in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
+ * credentials from accidentally being committed into version control.
+ */
+
+return array(
+ // Whether or not to enable a configuration cache.
+ // If enabled, the merged configuration will be cached and used in
+ // subsequent requests.
+ //'config_cache_enabled' => false,
+ // The key used to create the configuration cache file name.
+ //'config_cache_key' => 'module_config_cache',
+ // The path in which to cache merged configuration.
+ //'cache_dir' => './data/cache',
+ // ...
+);
@@ -0,0 +1,220 @@
+<?php
+/**
+ * User Configuration
+ *
+ * If you have a ./config/autoload/ directory set up for your project, you can
+ * drop this config file in it and change the values as you wish.
+ */
+$settings = array(
+ /**
+ * Zend\Db\Adapter\Adapter DI Alias
+ *
+ * Please specify the DI alias for the configured Zend\Db\Adapter\Adapter
+ * instance that User should use.
+ */
+ 'zend_db_adapter' => 'Zend\Db\Adapter\Adapter',
+
+ /**
+ * User Model Entity Class
+ *
+ * Name of Entity class to use. Useful for using your own entity class
+ * instead of the default one provided. Default is User\Entity\User.
+ * The entity class should implement User\Entity\UserInterface
+ */
+ 'user_entity_class' => 'User\Entity\User',
+
+ /**
+ * Enable registration
+ *
+ * Allows users to register through the website.
+ *
+ * Accepted values: boolean true or false
+ */
+ 'enable_registration' => true,
+
+ /**
+ * Enable Username
+ *
+ * Enables username field on the registration form, and allows users to log
+ * in using their username OR email address. Default is false.
+ *
+ * Accepted values: boolean true or false
+ */
+ 'enable_username' => false,
+
+ /**
+ * Enable Display Name
+ *
+ * Enables a display name field on the registration form, which is persisted
+ * in the database. Default value is false.
+ *
+ * Accepted values: boolean true or false
+ */
+ 'enable_display_name' => true,
+
+ /**
+ * Modes for authentication identity match
+ *
+ * Specify the allowable identity modes, in the order they should be
+ * checked by the Authentication plugin.
+ *
+ * Default value: array containing 'email'
+ * Accepted values: array containing one or more of: email, username
+ */
+ //'auth_identity_fields' => array( 'email' ),
+
+ /**
+ * Login form timeout
+ *
+ * Specify the timeout for the CSRF security field of the login form
+ * in seconds. Default value is 300 seconds.
+ *
+ * Accepted values: positive int value
+ */
+ //'login_form_timeout' => 300,
+
+ /**
+ * Registration form timeout
+ *
+ * Specify the timeout for the CSRF security field of the registration form
+ * in seconds. Default value is 300 seconds.
+ *
+ * Accepted values: positive int value
+ */
+ //'user_form_timeout' => 300,
+
+ /**
+ * Login After Registration
+ *
+ * Automatically logs the user in after they successfully register. Default
+ * value is false.
+ *
+ * Accepted values: boolean true or false
+ */
+ //'login_after_registration' => true,
+
+ /**
+ * Registration Form Captcha
+ *
+ * Determines if a captcha should be utilized on the user registration form.
+ * Default value is false.
+ */
+ 'use_registration_form_captcha' => false,
+
+ /**
+ * Form Captcha Options
+ *
+ * Currently used for the registration form, but re-usable anywhere. Use
+ * this to configure which Zend\Captcha adapter to use, and the options to
+ * pass to it. The default uses the Figlet captcha.
+ */
+ 'form_captcha_options' => array(
+ 'class' => 'figlet',
+ 'options' => array(
+ 'wordLen' => 5,
+ 'expiration' => 300,
+ 'timeout' => 300,
+ ),
+ ),
+
+ /**
+ * Use Redirect Parameter If Present
+ *
+ * Upon successful authentication, check for a 'redirect' POST or GET parameter
+ *
+ * Accepted values: boolean true or false
+ */
+ //'use_redirect_parameter_if_present' => true,
+
+ /**
+ * Sets the view template for the user login widget
+ *
+ * Default value: 'zfc-user/user/login.phtml'
+ * Accepted values: string path to a view script
+ */
+ //'user_login_widget_view_template' => 'user/user/login.phtml',
+
+ /**
+ * Login Redirect Route
+ *
+ * Upon successful login the user will be redirected to the entered route
+ *
+ * Default value: 'user'
+ * Accepted values: A valid route name within your application
+ *
+ */
+ //'login_redirect_route' => 'user',
+
+ /**
+ * Logout Redirect Route
+ *
+ * Upon logging out the user will be redirected to the enterd route
+ *
+ * Default value: 'user/login'
+ * Accepted values: A valid route name within your application
+ */
+ //'logout_redirect_route' => 'user/login',
+
+ /**
+ * Password Security
+ *
+ * DO NOT CHANGE THE PASSWORD HASH SETTINGS FROM THEIR DEFAULTS
+ * Unless A) you have done sufficient research and fully understand exactly
+ * what you are changing, AND B) you have a very specific reason to deviate
+ * from the default settings and know what you're doing.
+ *
+ * The password hash settings may be changed at any time without
+ * invalidating existing user accounts. Existing user passwords will be
+ * re-hashed automatically on their next successful login.
+ */
+
+ /**
+ * Password Cost
+ *
+ * The number represents the base-2 logarithm of the iteration count used for
+ * hashing. Default is 14 (about 10 hashes per second on an i5).
+ *
+ * Accepted values: integer between 4 and 31
+ */
+ //'password_cost' => 14,
+
+ /**
+ * Enable user state usage
+ *
+ * Should user's state be used in the registration/login process?
+ */
+ 'enable_user_state' => true,
+
+ /**
+ * Default user state upon registration
+ *
+ * What state user should have upon registration?
+ * Allowed value type: integer
+ */
+ 'default_user_state' => 1,
+
+ /**
+ * States which are allowing user to login
+ *
+ * When user tries to login, is his/her state one of the following?
+ * Include null if you want user's with no state to login as well.
+ * Allowed value types: null and integer
+ */
+ 'allowed_login_states' => array( null, 1 ),
+
+ /**
+ * End of ZfcUser configuration
+ */
+);
+
+/**
+ * You do not need to edit below this line
+ */
+return array(
+ 'user' => $settings,
+ 'service_manager' => array(
+ 'aliases' => array(
+ 'user_zend_db_adapter' => (isset($settings['zend_db_adapter'])) ? $settings['zend_db_adapter']: 'Zend\Db\Adapter\Adapter',
+ ),
+ ),
+);
Oops, something went wrong.

0 comments on commit 8b5f156

Please sign in to comment.