Permalink
Browse files

Huge refactor and a lot of new stuff

  • Loading branch information...
1 parent 1ed730d commit f08ae8a16a8ebd7d4af1ad40e1ddedc19bfbb3e3 christophervalles committed Jun 21, 2011
Showing 4,185 changed files with 16,862 additions and 9,782 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,53 +1,57 @@
[development]
; Generic configuration
-release.version = "0.0.0"
+release.version = "0.0"
+frontend.url = "http://zf"
; db connection
resources.db.adapter = "PDO_MYSQL"
-resources.db.params.dbname = "app"
+resources.db.params.dbname = "zf"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.host = "127.0.0.1"
resources.db.params.charset = "UTF8"
resources.db.isdefaulttableadapter = TRUE
-; Backoffice configuration
+; Security configuration
; salt for anti-CSRF tokens
-backoffice.security.csrfsalt = "2WR9waWGALBnujwdSOvKwlcZFws9Uo6"
+security.csrfsalt = "2WR9waWGALBnujwdSOvKwlcZFws9Uo6"
; salt for password hashes
; warning - changing this salt will invalidate all existing passwords
backoffice.security.passwordsalt = "7PXrjXbhgkgCTQGsdWUR2SjTVA5uyki"
+frontend.security.passwordsalt = "9RLltoiupGdj2BWyF6xA6Oi0FkN6jKd"
; Cache configuration
cache.file.frontend.name = "Core"
cache.file.frontend.options.lifetime = 7200
cache.file.frontend.options.automatic_serialization = TRUE
cache.file.backend.name = "File"
-cache.file.backend.options.cache_dir = "/Users/christopher/Projects/labs/zend/cache/"
+cache.file.backend.options.cache_dir = ROOT_PATH "/cache"
cache.memcache.frontend.name = "Core"
-cache.memcache.frontend.options.lifetime = 7200
-cache.memcache.frontend.options.automatic_serialization = true
-cache.memcache.frontend.options.caching = FALSE
+cache.memcache.frontend.options.lifetime = 1800
+cache.memcache.frontend.options.automatic_serialization = TRUE
+cache.memcache.frontend.options.caching = TRUE
cache.memcache.frontend.options.logging = TRUE
cache.memcache.backend.name = "Memcached"
-cache.memcache.backend.options.servers.server1.host = "localhost"
+cache.memcache.backend.options.servers.server1.host = "127.0.0.1"
cache.memcache.backend.options.servers.server1.port = 11211
-cache.memcache.backend.options.servers.server1.persistent = true
+cache.memcache.backend.options.servers.server1.persistent = TRUE
cache.memcache.backend.options.servers.server1.weight = 1
cache.memcache.backend.options.servers.server1.timeout = 5
cache.memcache.backend.options.servers.server1.retry_interval = 15
cache.memcache.backend.options.servers.server1.status = TRUE
+; Session configuration
+session.remember_me.lifetime = 1209600
+
; Translation configuration
translations.disable_notices = TRUE
-translations.log_missing_translations = TRUE
+translations.log_missing_translations = FALSE
; Debug toolbar configuration
-zfdebug.enabled = TRUE
zfdebug.show_cache_panel = FALSE
; Paginator configuration
@@ -58,17 +62,109 @@ paginator.scrolling_style = "Sliding"
amazon.aws_access_key = ""
amazon.aws_private_key = ""
amazon.s3.assets_bucket = ""
-amazon.s3.enabled = FALSE
amazon.sns.host = "sns.eu-west-1.amazonaws.com"
+amazon.sns.topics.gateway_errors.arn = ""
amazon.sns.topics.frontend_errors.arn = ""
-amazon.sns.topics.frontend_errors.key = "SNSFrontendErrors"
amazon.sns.topics.frontend_info.arn = ""
-amazon.sns.topics.frontend_info.key = "SNSFrontendInfo"
-amazon.sns.enabled = FALSE
-amazon.cloudfront.url = ""
+amazon.cloudfront.url[] = ""
amazon.cloudfront.distribution_id = ""
-amazon.cloudfront.enabled = FALSE
+amazon.ses.from_address = ""
+amazon.ses.from_name = ""
+
+; Yahoo API Key
+yahoo.key = "Vk2APf_V34E_XD4ZeYOYKejwvp4wxzreVe37bodYwRX4riWwrtF2jvlDezl73lU-"
+
+; Facebook API Key
+facebook.app_id = ""
+facebook.app_secret = ""
+facebook.api_key = ""
+facebook.access_token = ""
+facebook.testing = FALSE
+
+; Twitter Credentials
+twitter.consumer_key = ""
+twitter.consumer_secret = ""
+twitter.username = ""
+twitter.access_token = ""
+twitter.access_token_secret = ""
+
+; Bitly Credentials
+bitly.username = ""
+bitly.api_key = ""
+
+; Testing configuration
+testing.mail = TRUE
+
+
+
+
[staging : development]
+resources.db.adapter = "PDO_MYSQL"
+resources.db.params.dbname = ""
+resources.db.params.username = "root"
+resources.db.params.password = ""
+resources.db.params.host = "127.0.0.1"
+resources.db.params.charset = "UTF8"
+resources.db.isdefaulttableadapter = TRUE
+
+
+
+
+
[production : development]
+
+;General info
+frontend.url = "http://www.example.com"
+
+; Amazon configuration
+amazon.s3.assets_bucket = ""
+amazon.cloudfront.url[] = "cdn.example.net"
+amazon.cloudfront.url[] = "cdn1.example.net"
+amazon.cloudfront.url[] = "cdn2.example.net"
+amazon.cloudfront.url[] = "cdn3.example.net"
+amazon.cloudfront.url[] = "cdn4.example.net"
+amazon.cloudfront.url[] = "cdn5.example.net"
+amazon.cloudfront.distribution_id = ""
+amazon.ses.from_address = ""
+amazon.ses.from_name = ""
+
+; db connection
+resources.db.adapter = "PDO_MYSQL"
+resources.db.params.dbname = ""
+resources.db.params.username = "root"
+resources.db.params.password = ""
+resources.db.params.host = "127.0.0.1"
+resources.db.params.charset = "UTF8"
+resources.db.isdefaulttableadapter = TRUE
+
+; Testing configuration
+testing.mail = FALSE
+
+; Translation configuration
+translations.disable_notices = TRUE
+translations.log_missing_translations = FALSE
+
+; Cache configuration
+cache.memcache.frontend.options.lifetime = 7200
+cache.memcache.frontend.options.automatic_serialization = TRUE
+cache.memcache.frontend.options.caching = TRUE
+cache.memcache.frontend.options.logging = FALSE
+cache.memcache.backend.name = "Memcached"
+cache.memcache.backend.options.servers.server1.host = "88.198.9.21"
+cache.memcache.backend.options.servers.server1.port = 11211
+cache.memcache.backend.options.servers.server1.persistent = TRUE
+cache.memcache.backend.options.servers.server1.weight = 1
+cache.memcache.backend.options.servers.server1.timeout = 5
+cache.memcache.backend.options.servers.server1.retry_interval = 15
+cache.memcache.backend.options.servers.server1.status = TRUE
+
+; Twitter credentials
+twitter.username = ""
+twitter.access_token = ""
+twitter.access_token_secret = ""
+
+; Facebook Credentials
+facebook.access_token = ""
+facebook.testing = FALSE
@@ -0,0 +1,3 @@
+<routes>
+
+</routes>
@@ -1,7 +1,7 @@
<?php
/**
* Environment configuration
- * Copy this file to APPLICATION_PATH/configs/environment.php to define
+ * Copy this file to APPLICATION_PATH/config/environment.php to define
* the working environment.
*
* Posibile values are:
@@ -32,7 +32,7 @@
* Available Zend_Registry keys are IS_PRODUCTION, IS_STAGING, IS_DEVELOPMENT
*
* @package application_config
- * @copyright Company
+ * @copyright company
*/
define('APP_STATE_PRODUCTION', 'production');
@@ -1,7 +1,7 @@
<?php
/**
* Environment configuration
- * Copy this file to APPLICATION_PATH/configs/environment.php to define
+ * Copy this file to APPLICATION_PATH/config/environment.php to define
* the working environment.
*
* Posibile values are:
@@ -32,7 +32,7 @@
* Available Zend_Registry keys are IS_PRODUCTION, IS_STAGING, IS_DEVELOPMENT
*
* @package application_config
- * @copyright Company
+ * @copyright company
*/
define('APP_STATE_PRODUCTION', 'production');
@@ -1,3 +1,22 @@
<routes>
+ <!-- Static pages routes -->
+ <about type="Zend_Controller_Router_Route">
+ <route>/about</route>
+ <defaults module="frontend" controller="index" action="static" page="about" />
+ </about>
+ <terms type="Zend_Controller_Router_Route">
+ <route>/terms</route>
+ <defaults module="frontend" controller="index" action="static" page="terms" />
+ </terms>
+
+ <faq type="Zend_Controller_Router_Route">
+ <route>/faq</route>
+ <defaults module="frontend" controller="index" action="static" page="faq" />
+ </faq>
+
+ <help type="Zend_Controller_Router_Route">
+ <route>/help</route>
+ <defaults module="frontend" controller="index" action="static" page="help" />
+ </help>
</routes>
@@ -5,19 +5,10 @@
*
* @category backoffice
* @package backoffice_bootstrap
- * @copyright Company
+ * @copyright company
*/
-class Backoffice_Bootstrap extends App_Bootstrap_Abstract {
-
- /**
- * Inits the backoffice user actions logger (BigBrother)
- *
- * @access protected
- * @return void
- */
- protected function _initBigBrother(){
- }
-
+class Backoffice_Bootstrap extends App_Bootstrap_Abstract
+{
/**
* Inits the session for the backoffice
*
@@ -35,9 +26,24 @@ protected function _initSession(){
* @return void
*/
protected function _initPaginator(){
- Zend_Paginator::setDefaultScrollingStyle(Zend_Registry::get('config')->paginator->scrolling_style);
+ Zend_Paginator::setDefaultScrollingStyle(App_DI_Container::get('ConfigObject')->paginator->scrolling_style);
Zend_View_Helper_PaginationControl::setDefaultViewPartial(
'default.phtml'
);
}
+
+ /**
+ * Initializes the view helpers for the application
+ *
+ * @access protected
+ * @return void
+ */
+ protected function _initViewHelpers() {
+ $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
+ if (NULL === $viewRenderer->view) {
+ $viewRenderer->initView();
+ }
+
+ $viewRenderer->view->addHelperPath('App/Backoffice/View/Helper', 'App_Backoffice_View_Helper');
+ }
}
@@ -5,9 +5,72 @@
* @category backoffice
* @package backoffice
* @subpackage backoffice_bootstrap
- * @copyright Company
+ * @copyright company
*/
class CliBootstrap extends App_Bootstrap_Abstract
{
+ /**
+ * Inits the layouts (full configuration)
+ *
+ * @access protected
+ * @return void
+ */
+ protected function _initLayout()
+ {
+ Zend_Layout::startMvc(APPLICATION_PATH . '/modules/' . CURRENT_MODULE . '/views/layouts/');
+
+ $view = Zend_Layout::getMvcInstance()->getView();
+ }
+
+ /**
+ * Initialize the routes
+ *
+ * @return void
+ */
+ protected function _initRouter(){
+ $routes = new Zend_Config_Xml(APPLICATION_PATH . '/configs/frontend_routes.xml');
+ $router = new Zend_Controller_Router_Rewrite();
+ $router->addConfig($routes);
+
+ $front = Zend_Controller_Front::getInstance();
+ $front->setRouter($router);
+ }
+
+ /**
+ * Inits the view paths
+ *
+ * Additional paths are used in order to provide a better separation
+ *
+ * @access protected
+ * @return void
+ */
+ protected function _initViewPaths()
+ {
+ $this->bootstrap('Layout');
+
+ $view = Zend_Layout::getMvcInstance()->getView();
+
+ $view->addScriptPath(APPLICATION_PATH . '/modules/frontend/views/');
+ $view->addScriptPath(APPLICATION_PATH . '/modules/frontend/views/forms/');
+ $view->addScriptPath(APPLICATION_PATH . '/modules/frontend/views/paginators/');
+ $view->addScriptPath(APPLICATION_PATH . '/modules/frontend/views/scripts/');
+ $view->addScriptPath(ROOT_PATH . '/library/App/Mail/Templates/');
+ }
+
+ /**
+ * Initializes the view helpers for the application
+ *
+ * @access protected
+ * @return void
+ */
+ protected function _initViewHelpers()
+ {
+ $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
+ if (NULL === $viewRenderer->view) {
+ $viewRenderer->initView();
+ }
+
+ $viewRenderer->view->addHelperPath('App/View/Helper', 'App_View_Helper');
+ }
}
Oops, something went wrong.

0 comments on commit f08ae8a

Please sign in to comment.