Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Mock of model and view.
Browse files Browse the repository at this point in the history
  • Loading branch information
josterholt authored and josterholt committed Dec 3, 2011
1 parent ad1dac6 commit 6f4c03c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/.htaccess
@@ -0,0 +1,7 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
RewriteRule ^.*$ index.php [NC,L]
30 changes: 30 additions & 0 deletions public/index.php
@@ -0,0 +1,30 @@
<?php

// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$bits = explode('.', $_SERVER['HTTP_HOST']);
$domain = implode(".", array_slice($bits, (count($bits) - 2), 2));
$domain = strtolower($domain);

$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/'.$domain.'.ini'
);
$application->bootstrap()
->run();

0 comments on commit 6f4c03c

Please sign in to comment.