Skip to content
Browse files

Moved all but the Sprout library ...

out to the sprout-php-framework repository, which includes sprout and other libraries as submodules.
  • Loading branch information...
1 parent e8b49fc commit 11f2d3d195cd641c4f9c1c78661b4eb7df72fd08 @dmingos committed Jan 26, 2012
Showing with 2 additions and 470 deletions.
  1. +0 −5 .gitignore
  2. +0 −57 app_seed/config/application.php
  3. +0 −14 app_seed/config/environments/development.php
  4. +0 −12 app_seed/config/environments/production.php
  5. +0 −10 app_seed/config/environments/test.php
  6. +0 −19 app_seed/config/inflections.php
  7. +0 −100 app_seed/config/routes.php
  8. +0 −57 app_seed/controllers/application_controller.php
  9. +0 −83 app_seed/controllers/pages_controller.php
  10. 0 app_seed/models/.gitkeep
  11. 0 app_seed/tasks/.gitkeep
  12. +0 −24 app_seed/views/layouts/application.html.php
  13. +0 −3 app_seed/views/pages/dashboard.html.php
  14. +0 −10 app_seed/webroot/.htaccess
  15. 0 app_seed/webroot/images/.gitkeep
  16. +0 −9 app_seed/webroot/index.php
  17. 0 app_seed/webroot/scripts/.gitkeep
  18. 0 app_seed/webroot/styles/.gitkeep
  19. 0 app_seed/webroot/uploads/.gitkeep
  20. 0 {lib/sprout → }/application.php
  21. 0 {lib/sprout → }/bootstrap.php
  22. 0 {lib/sprout → }/console/.gitkeep
  23. 0 {lib/sprout → }/controller.php
  24. 0 {lib/sprout → }/dispatcher.php
  25. 0 documentation/.gitkeep
  26. 0 {lib/sprout → }/environment.php
  27. 0 {lib/sprout → }/exception.php
  28. 0 {lib/sprout → }/http/request.php
  29. 0 {lib/sprout → }/http/response.php
  30. 0 {lib/sprout → }/inflector.php
  31. 0 {lib/sprout → }/layout.php
  32. +2 −41 readme.md
  33. 0 {lib/sprout → }/route.php
  34. 0 {lib/sprout → }/router.php
  35. 0 {lib/sprout → }/session.php
  36. 0 {lib/sprout → }/singleton.php
  37. +0 −26 sprout.php
  38. 0 {lib/sprout → }/util/serializer.php
  39. 0 {lib/sprout → }/util/xml_serializer.php
  40. 0 {lib/sprout → }/view.php
View
5 .gitignore
@@ -1,8 +1,3 @@
-# Writable directories
-*/cache/*
-*/temp/*
-*/logs/*
-
# OS generated files
.DS_Store*
ehthumbs.db
View
57 app_seed/config/application.php
@@ -1,57 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-use \Sprout\Application;
-
-// Bootstrap Sprout PHP framework. By default, sprout.php and the libraries are located in the same
-// directory as the app_seed but Sprout, your application, and your applications' webroot can be
-// stored anywhere on the disk. You can even keep several versions of the framework checked out in
-// different locations. For example, /frameworks/sprout/v0.1 or /frameworks/sprout/v0.2.
-require_once realpath('../../sprout.php');
-
-
-// Application::config sets up your application's default configuration. Sprout can handle a variety
-// of setups with minimal configuration. You can (and should) keep your webroot separate from the
-// rest of your application code. You can also keep Sprout in a central location on the disk so that
-// several applications can use the same framework.
-Application::config(array(
- // You can set up any number of custom configuration options. For example, here we set the name
- // of our application for use throughout our app via Application::get('name').
- // 'name' => 'My Application',
-
- // Setting the environment is technically optional but it is good practice. By configuring
- // separate operation environments for your application, it can behave differently depending on
- // where it is being used. Environment configuration options override Application configuration
- // options if they exist in both places.
- //
- // In your development environment for example, you will likely use a different database
- // connection than in your production environment. You might also keep your webroot within the
- // application directory for better SCM management but in your production environment, you will
- // likely keep your application files separate from the publicly accesible webroot.
- //
- // You can also bootstrap debugging tools such as FirePHP or ChromePHP for your development
- // environment, testing suites for your test environment, and so on. You can set up as many
- // environments as necessary for your workflow.
- 'environment' => 'development',
-
- // Another common configuration option is the location of the webroot. The Sprout default is to
- // keep it inside the application directory but in production or staging environments, it is a
- // good idea to keep your application code in a more secure location on the diek and the webroot
- // somewhere accessible to the web server.
- // 'webroot' => '/www/my_app'
-));
-
-
-// Load your application's routes. Sprout was built with support for some basic MVC functionality
-// out of the box but you can set up custom routes to make your application's URLs more easily
-// understood by humans as well as search engines.
-require_once 'routes.php';
-
-
-// Sprout correctly handles some of the more common irregular plurals (person to people, child to
-// children, etc.) and uncountable words (fish, sheep, etc.) but you can extend the lists of words
-// that are uncountable or have irregular plural forms in inflections.php.
-require_once 'inflections.php';
View
14 app_seed/config/environments/development.php
@@ -1,14 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-use \Sprout\Environment;
-
-// require_once 'FirePHPCore/fb.php';
-// require_once 'ChromePhp.php';
-
-Environment::config(array(
- // 'name' => self::get('name') . ' (' . self::get('environment') . ')'
-));
View
12 app_seed/config/environments/production.php
@@ -1,12 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-use \Sprout\Environment;
-
-Environment::config(array(
- // 'path' => realpath('../../'),
- // 'webroot' => '/www/my_app!'
-));
View
10 app_seed/config/environments/test.php
@@ -1,10 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-use \Sprout\Environment;
-
-Environment::config(array(
-));
View
19 app_seed/config/inflections.php
@@ -1,19 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-use \Sprout\Inflector;
-
-// Optional file used to extend the inflector
-
-// Inflector::uncountables(array(
-// 'fish',
-// 'sheep'
-// ));
-
-// Inflector::irregulars(array(
-// 'person' => 'people',
-// 'child' => 'children'
-// ));
View
100 app_seed/config/routes.php
@@ -1,100 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-use \Sprout\Router;
-
-/**
- * Configuration file for all routing patterns in your application
- *
- * Routes are defined with a pattern at minimum and in most cases, and array of route component
- * definitions. Route patterns are slash-delimited strings with components tokenized with a
- * preceding semicolon (:) character. Tokenized route components should be defined with a regular
- * expression in the second parameter array. If no component definition is provided, a very generic
- * default one will be used.
- *
- * Tokenized route components and their values are added to the $request->params array. If
- * conflicting query string parameters or formatted key:value URI parameters exist, tokenized route
- * components will take precedence.
- *
- * Routes are prioritized in the order they are defined. Connect your routes in order of specificity
- * with the most generic default route last.
- *
- * The one exception to the priority rule is the home route ('/'). Because this route contains only
- * static segments and is likely to be a high traffic route, it is a good idea to make it the first
- * connection so that it is always the first match attempted. Routes with only static segments skip
- * component matching via regular expressions altogether.
- *
- * Some example route definitions:
- *
- * Router:connect()
- *
- * For regular expression help, see:
- * - http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
- * - http://www.regular-expressions.info/reference.html
- */
-
-// Unless set here, 'front_controller' will be empty. This can be set to index.php, default.php, or
-// otherwise for servers where mod_rewrite is not available.
-// Router::front_controller('default.php');
-
-// Unless set here, 'pages' will be the default controller.
-// Router::default_controller('store');
-
-// Unless set here, 'index' will be the default action.
-// Router::default_action('default');
-
-// Unless set here, 'html' will be the default format.
-// Router::default_format('json');
-
-Router::connect('/', array(
- 'action' => 'dashboard'
-), 'dashboard');
-
-Router::connect('/login', array(
- 'controller' => 'auth',
- 'action' => 'login'
-), 'login');
-
-Router::connect('/logout', array(
- 'controller' => 'auth',
- 'action' => 'logout'
-), 'logout');
-
-Router::connect('/signup', array(
- 'controller' => 'auth',
- 'action' => 'signup'
-), 'signup');
-
-Router::connect('/profile/:username', array(
- 'controller' => 'users',
- 'action' => 'view',
- 'username' => '([\w]{2,12})' // 2 to 12 letters, numbers, and underscores
-));
-
-// define filters for the url parameters
-Router::connect('/users/:id/', array(
- 'controller' => 'users',
- 'id' => '([\d]{1,8})'
-));
-
-// define filters for the url parameters
-Router::connect('/store/products/:sku:format', array(
- 'controller' => 'products',
- 'action' => 'find_by_sku',
- 'sku' => '([a-zA-Z]{3}\-[\d]{12})'
-), 'view_product');
-
-// Router::connect('/:controller/:id:format', array(
-// 'action' => 'view'
-// ));
-// Router::connect('/:controller/:id/:action:format');
-
-// The following routes will be added by default.
-// It is not necessary to uncomment these lines. They are just shown here for your reference.
-// Router::connect('/' . Router::default_action() . ':format', array(), 'homepage');
-// Router::connect('/:controller:format');
-// Router::connect('/:controller/:action:format');
-// Router::connect('/:controller/:action/:id:format');
View
57 app_seed/controllers/application_controller.php
@@ -1,57 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-/**
-* Base class of all controllers in your application.
-*
-* ApplicationController is an ideal place to define methods for implementing logic of application
-* scope. ApplicationController methods are often used for before_Filters, before_render filters, and
-* after_filters. Filter methods only applicable to one particular controller should be defined
-* within that controller.
-*
-* Filter methods defined in ApplicationController must have protected or public visibility.
-*/
-abstract class ApplicationController extends \Sprout\Controller {
-
- /**
- * EXAMPLE: The title of a rendered page
- *
- * @var string
- */
- // public $page_title;
-
-
- /**
- * EXAMPLE: Track the execution time of an action
- *
- * @var float
- */
- // private $_execution_time;
-
-
- /**
- * EXAMPLE: Initiate the page title to the titleized version of the action name
- */
- // protected function set_page_title() {
- // $this->page_title = \Sprout\Inflector::titleize($this->action_name);
- // }
-
-
- /**
- * EXAMPLE: Start the action timer
- */
- // protected function start_timer() {
- // $this->_execution_time = microtime(true);
- // }
-
-
- /**
- * EXAMPLE: Stop the action timer
- */
- // protected function stop_timer() {
- // $this->_execution_time = microtime(true) - floatval($this->_execution_time);
- // }
-}
View
83 app_seed/controllers/pages_controller.php
@@ -1,83 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-class PagesController extends ApplicationController {
-
- // FILTERS SETUP
- // Controllers can configure arrays of $before_filters to be run before actions are called,
- // before_render filters run after the action but before the view is rendered, and/or
- // after_filters methods run after the view is rendered. Filter methods must be defined with
- // public or protected visibility and may be set to run with 'only' a specific set of actions or
- // all actions 'except' a specific set. Filters will be run with all actions by default.
- //
- // For example:
- // protected $before_filters = array(
- // 'start_timer',
- // 'load_preferences' => array(
- // 'only' => 'dashboard'
- // ),
- // 'set_page_title' => array(
- // 'except' => array('dashboard', 'logout')
- // )
- // );
- //
- // protected $before_render = array();
- //
- // protected $after_filters = array(
- // 'stop_timer'
- // );
-
-
-
- // ACTIONS
-
- /**
- * The application dashboard
- *
- * This is an example page purely here to demonstrate some of the ways you can work with
- * controller actions.
- */
- public function dashboard() {
- // All action methods must be public. Since this is the default, you can technically leave
- // off the public declaration but it is good practice to use it.
-
- // You can optionally specify an alternate location for your view templates. The following
- // example tells Sprout to look for view templates in {app}/views/special_pages/* instead of
- // the default location of {app}/views/{controller_name}/*.
- // $this->view->folder = 'special_pages';
-
- // You can optionally specify an alternate template to use when rendering this action. The
- // following example will tell Sprout to look for a view template in $this->view->folder
- // named alternate_template.html.php. The default template format specified in the Router
- // configuration will be used unless otherwise specified.
- // $this->view->template = 'alternate_template';
-
- // Alternate templates may optionally include further nesting within $this->view->folder and
- // may or may not include an specific format to use. The following example tells Sprout to
- // use the {app}/views/{$this->view->folder}/one/two/my_template.wiki.php template file.
- // $this->view->template = 'one/two/alternate_template.wiki';
-
- // You can pass data to the view by setting it directly in the $this->data array. This will
- // create a variable in the view called $answer with a value of 42.
- // $this->data['answer'] = 42;
-
- // The preferred way of passing data to the view is to define local variables, compact them
- // into an array and return them. The following three lines would pass the $greeting and
- // $today variables to the view.
- $greeting = 'Hello, Sprout!';
- $today = date('m/d/Y');
-
- return compact('greeting', 'today');
- }
-
-
-
- // ACTION FILTER IMPLEMENTATIONS
-
- // protected function load_preferences() {
- // // Load dashboard user preferences
- // }
-}
View
0 app_seed/models/.gitkeep
No changes.
View
0 app_seed/tasks/.gitkeep
No changes.
View
24 app_seed/views/layouts/application.html.php
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html lang="<?= $this->response->language ?>">
-<head>
- <meta charset="<?= $this->response->charset ?>">
- <title>Application Seed</title>
- <style>
- body {
- background-color: #fff;
- border-radius: 5px;
- box-shadow: 0 0 15px #ccc;
- color: #000;
- font: 100%/1.5 Helvetica, Arial, sans-serif;
- margin: 3em auto;
- padding: 5px 30px 15px;
- width: 600px;
- }
- </style>
- <? $this->stylesheets() ?>
- <? $this->scripts() ?>
-</head>
-<body>
- <? echo $this->content; ?>
-</body>
-</html>
View
3 app_seed/views/pages/dashboard.html.php
@@ -1,3 +0,0 @@
-<h1><?php echo $this->escape($greeting); ?></h1>
-
-<p>Today's date is <?php echo $this->escape($today); ?>.</p>
View
10 app_seed/webroot/.htaccess
@@ -1,10 +0,0 @@
-# Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
-# All rights reserved.
-
-<IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !favicon.ico$
- RewriteRule ^(.*)$ index.php/$1 [QSA,L]
-</IfModule>
View
0 app_seed/webroot/images/.gitkeep
No changes.
View
9 app_seed/webroot/index.php
@@ -1,9 +0,0 @@
-<?php
-/**
- * Copyright (c) <YEAR>, <YOU OR YOUR ORGANIZATION>
- * All rights reserved.
-*/
-
-require_once realpath('../config/application.php');
-
-\Sprout\Dispatcher::dispatch();
View
0 app_seed/webroot/scripts/.gitkeep
No changes.
View
0 app_seed/webroot/styles/.gitkeep
No changes.
View
0 app_seed/webroot/uploads/.gitkeep
No changes.
View
0 lib/sprout/application.php → application.php
File renamed without changes.
View
0 lib/sprout/bootstrap.php → bootstrap.php
File renamed without changes.
View
0 lib/sprout/console/.gitkeep → console/.gitkeep
File renamed without changes.
View
0 lib/sprout/controller.php → controller.php
File renamed without changes.
View
0 lib/sprout/dispatcher.php → dispatcher.php
File renamed without changes.
View
0 documentation/.gitkeep
No changes.
View
0 lib/sprout/environment.php → environment.php
File renamed without changes.
View
0 lib/sprout/exception.php → exception.php
File renamed without changes.
View
0 lib/sprout/http/request.php → http/request.php
File renamed without changes.
View
0 lib/sprout/http/response.php → http/response.php
File renamed without changes.
View
0 lib/sprout/inflector.php → inflector.php
File renamed without changes.
View
0 lib/sprout/layout.php → layout.php
File renamed without changes.
View
43 readme.md
@@ -1,41 +1,2 @@
-#Sprout PHP framework
-
-The goal of this framework is for it to be fast, efficient, very light weight, well documented and easy to use.
-
-**THIS FRAMEWORK IS IN THE VERY BEGINNING STAGES OF DEVELOPMENT.** If you're looking for a fun development project, you're in luck. If your looking to start building web applications, keep looking.
-
-##Development goals:
-Only the minimum amount of code needed to complete a request should be loaded at runtime.
-
-###General
-* Convention over configuration with sensible defaults
-* Encourage DRY coding principles
-* Well-defined coding and documentation standards
-
-###Framework
-* Framework, app, and webroot can be independently stored anywhere on the drive
-* Namespace-based autoloading
-* Regular expression tokenized routing
-* Ajax-friendly routes for partials and non-html requests
-* Built-in options for User and Auth classes to support basic authentication
- - User-defined roles
- - Cached access tables
- - Simple access checks like $user->is('admin') and/or $user->can('edit_posts')
-* Built-in PHP ActiveRecord as the default ORM
-* Migration-based schema management
-* Command-line utility for executing application tasks and code generation
- - Generation of models and controllers, optionally with predefined actions/views, database schema migrations, etc.
- - Database schema management through migrations
- - Project documentation generation
- - Running tests
- - User-defined tasks - possibly for release scripts etc.
-* RESTful API
-
-###Applications
-* Before and after callback options
-* Plain PHP view templates with alternate syntax PHP control structures and automatic replacement and escaping of short open tags
-* Really great HTML view helpers for building forms, etc.
-* Automatic minifying for HTML, CSS, and JS that can be disabled
-* View and asset caching
-* Default .gitignore and .htaccess
-* App support for plugins/extensions
+#Sprout PHP
+Sprout PHP is the core library in the Sprout PHP Framework.
View
0 lib/sprout/route.php → route.php
File renamed without changes.
View
0 lib/sprout/router.php → router.php
File renamed without changes.
View
0 lib/sprout/session.php → session.php
File renamed without changes.
View
0 lib/sprout/singleton.php → singleton.php
File renamed without changes.
View
26 sprout.php
@@ -1,26 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011, Dave Mingos
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted
- * provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions
- * and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
- * conditions and the following disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-require_once realpath(__DIR__ . '/lib/sprout/bootstrap.php');
View
0 lib/sprout/util/serializer.php → util/serializer.php
File renamed without changes.
View
0 lib/sprout/util/xml_serializer.php → util/xml_serializer.php
File renamed without changes.
View
0 lib/sprout/view.php → view.php
File renamed without changes.

0 comments on commit 11f2d3d

Please sign in to comment.
Something went wrong with that request. Please try again.