Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit to the official TweetMVC sample application

  • Loading branch information...
commit 68c6233ce6077f63ef3496a472025e439ede28a4 0 parents
Jeremy Lindblom authored
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "tweetmvc"]
+ path = tweetmvc
+ url = git://github.com/tweetmvc/tweetmvc-core.git
16 .htaccess
@@ -0,0 +1,16 @@
+# Turn on URL rewriting
+Options +FollowSymLinks
+RewriteEngine On
+
+# Installation directory
+RewriteBase /
+
+# Protect application and system files from being viewed
+RewriteRule ^(application|tweetmvc)/.* - [F,L]
+
+# Allow any files or directories that exist to be displayed directly
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+
+# Rewrite all other URLs to index.php?c=CONTROLLER&m=METHOD&a=ARGS
+RewriteRule ^(.*)$ index.php?r=$1 [L]
4 README.markdown
@@ -0,0 +1,4 @@
+TweetMVC Application
+====================
+
+Coming Soon.
11 application/controllers/home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends Controller {
+
+ public function action_index()
+ {
+ $this->view->title = 'TweetMVC Sample Application - Home';
+ $this->view->content = new View('home/index');
+ }
+
+}
2  application/views/home/index.php
@@ -0,0 +1,2 @@
+<h1>TweetMVC Sample Application</h1>
+<p>Hello, World!</p>
9 application/views/template.php
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title><?= $title ?></title>
+ </head>
+ <body>
+ <?= $content ?>
+ </body>
+</html>
44 config.php
@@ -0,0 +1,44 @@
+<?#Configuration Settings for the TweetMVC Application
+return array
+(
+ #Framework Settings:
+ --------------------
+
+ #Paths
+ 'm' => 'application/models/',
+ 'v' => 'application/views/',
+ 'c' => 'application/controllers/',
+ 'x' => 'tweetmvc/extensions/',
+
+ #Defaults
+ 'controller' => 'home',
+ 'action' => 'index',
+ 'template' => 'template',
+
+ #Extensions
+ 'extensions' => array
+ (
+ #'debug',
+ #'benchmark',
+ #'database',
+ #'model',
+ #'url',
+ #'notices',
+ #'auth',
+ #'html',
+ #'form',
+ 'alias',
+ ),
+
+ #Extension Settings:
+ #-------------------
+
+ #Alias Extension
+ 'class-aliases' => array
+ (
+ 'M' => 'Model',
+ 'V' => 'View',
+ 'C' => 'Controller',
+ ),
+
+);
7 index.php
@@ -0,0 +1,7 @@
+<?php
+
+#Start the Session
+session_start(); #Note: This will be moved into the Session Extension later
+
+#Require the core TweetMVC framework, and let it handle the request
+require 'tweetmvc/tweetmvc.php';
1  tweetmvc
@@ -0,0 +1 @@
+Subproject commit fd264fc753e0303e3c5026499d84b4a8db54cb93
Please sign in to comment.
Something went wrong with that request. Please try again.