forked from wingman007/fmi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wingman
committed
Feb 1, 2013
0 parents
commit 347683c
Showing
225 changed files
with
20,729 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
nbproject | ||
._* | ||
.~lock.* | ||
.buildpath | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2005-2012, Zend Technologies USA, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
* 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. | ||
|
||
* Neither the name of Zend Technologies USA, Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
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 OWNER 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
ZendSkeletonApplication | ||
======================= | ||
|
||
Introduction | ||
------------ | ||
This is a simple, skeleton application using the ZF2 MVC layer and module | ||
systems. This application is meant to be used as a starting place for those | ||
looking to get their feet wet with ZF2. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
Using Composer (recommended) | ||
---------------------------- | ||
The recommended way to get a working copy of this project is to clone the repository | ||
and use composer to install dependencies: | ||
|
||
cd my/project/dir | ||
git clone git://github.com/zendframework/ZendSkeletonApplication.git | ||
cd ZendSkeletonApplication | ||
php composer.phar install | ||
|
||
Using Git submodules | ||
-------------------- | ||
Alternatively, you can install using native git submodules: | ||
|
||
git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive | ||
|
||
Virtual Host | ||
------------ | ||
Afterwards, set up a virtual host to point to the public/ directory of the | ||
project and you should be ready to go! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "zendframework/skeleton-application", | ||
"description": "Skeleton Application for ZF2", | ||
"license": "BSD-3-Clause", | ||
"keywords": [ | ||
"framework", | ||
"zf2" | ||
], | ||
"homepage": "http://framework.zend.com/", | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "http://packages.zendframework.com/" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.3", | ||
"zendframework/zendframework": "2.*", | ||
"zendframework/zendservice-recaptcha": "2.*", | ||
"doctrine/common": ">=2.1" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
return array( | ||
'modules' => array( | ||
'Application', | ||
), | ||
'module_listener_options' => array( | ||
'config_glob_paths' => array( | ||
'config/autoload/{,*.}{global,local}.php', | ||
), | ||
'module_paths' => array( | ||
'./module', | ||
'./vendor', | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
local.php | ||
*.local.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
About this directory: | ||
===================== | ||
|
||
By default, this application is configured to load all configs in | ||
`./config/autoload/{,*.}{global,local}.php`. Doing this provides a | ||
location for a developer to drop in configuration override files provided by | ||
modules, as well as cleanly provide individual, application-wide config files | ||
for things like database connections, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Global Configuration Override | ||
* | ||
* You can use this file for overridding 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( | ||
// ... | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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 comitted into version control. | ||
*/ | ||
|
||
return array( | ||
// ... | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
/** | ||
* This autoloading setup is really more complicated than it needs to be for most | ||
* applications. The added complexity is simply to reduce the time it takes for | ||
* new developers to be productive with a fresh skeleton. It allows autoloading | ||
* to be correctly configured, regardless of the installation method and keeps | ||
* the use of composer completely optional. This setup should work fine for | ||
* most users, however, feel free to configure autoloading however you'd like. | ||
*/ | ||
|
||
// Composer autoloading | ||
if (file_exists('vendor/autoload.php')) { | ||
$loader = include 'vendor/autoload.php'; | ||
} | ||
|
||
$zf2Path = false; | ||
|
||
if (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment variable or git submodule | ||
$zf2Path = getenv('ZF2_PATH'); | ||
} elseif (get_cfg_var('zf2_path')) { // Support for zf2_path directive value | ||
$zf2Path = get_cfg_var('zf2_path'); | ||
} elseif (is_dir('vendor/ZF2/library')) { | ||
$zf2Path = 'vendor/ZF2/library'; | ||
} | ||
|
||
if ($zf2Path) { | ||
if (isset($loader)) { | ||
$loader->add('Zend', $zf2Path . '/Zend'); | ||
} else { | ||
include $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; | ||
Zend\Loader\AutoloaderFactory::factory(array( | ||
'Zend\Loader\StandardAutoloader' => array( | ||
'autoregister_zf' => true | ||
) | ||
)); | ||
} | ||
} | ||
|
||
if (!class_exists('Zend\Loader\AutoloaderFactory')) { | ||
throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Application; | ||
|
||
use Zend\Mvc\ModuleRouteListener; | ||
|
||
class Module | ||
{ | ||
public function onBootstrap($e) | ||
{ | ||
$e->getApplication()->getServiceManager()->get('translator'); | ||
$eventManager = $e->getApplication()->getEventManager(); | ||
$moduleRouteListener = new ModuleRouteListener(); | ||
$moduleRouteListener->attach($eventManager); | ||
} | ||
|
||
public function getConfig() | ||
{ | ||
return include __DIR__ . '/config/module.config.php'; | ||
} | ||
|
||
public function getAutoloaderConfig() | ||
{ | ||
return array( | ||
'Zend\Loader\StandardAutoloader' => array( | ||
'namespaces' => array( | ||
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
return array( | ||
'router' => array( | ||
'routes' => array( | ||
'home' => array( | ||
'type' => 'Zend\Mvc\Router\Http\Literal', | ||
'options' => array( | ||
'route' => '/', | ||
'defaults' => array( | ||
'controller' => 'Application\Controller\Index', | ||
'action' => 'index', | ||
), | ||
), | ||
), | ||
// The following is a route to simplify getting started creating | ||
// new controllers and actions without needing to create a new | ||
// module. Simply drop new controllers in, and you can access them | ||
// using the path /application/:controller/:action | ||
'application' => array( | ||
'type' => 'Literal', | ||
'options' => array( | ||
'route' => '/application', | ||
'defaults' => array( | ||
'__NAMESPACE__' => 'Application\Controller', | ||
'controller' => 'Index', | ||
'action' => 'index', | ||
), | ||
), | ||
'may_terminate' => true, | ||
'child_routes' => array( | ||
'default' => array( | ||
'type' => 'Segment', | ||
'options' => array( | ||
'route' => '/[:controller[/:action]]', | ||
'constraints' => array( | ||
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
), | ||
'defaults' => array( | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
'service_manager' => array( | ||
'factories' => array( | ||
'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', | ||
), | ||
), | ||
'translator' => array( | ||
'locale' => 'en_US', | ||
'translation_file_patterns' => array( | ||
array( | ||
'type' => 'gettext', | ||
'base_dir' => __DIR__ . '/../language', | ||
'pattern' => '%s.mo', | ||
), | ||
), | ||
), | ||
'controllers' => array( | ||
'invokables' => array( | ||
'Application\Controller\Index' => 'Application\Controller\IndexController' | ||
), | ||
), | ||
'view_manager' => array( | ||
'display_not_found_reason' => true, | ||
'display_exceptions' => true, | ||
'doctype' => 'HTML5', | ||
'not_found_template' => 'error/404', | ||
'exception_template' => 'error/index', | ||
'template_map' => array( | ||
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', | ||
'application/index/index' => __DIR__ . '/../view/application/index/index.phtml', | ||
'error/404' => __DIR__ . '/../view/error/404.phtml', | ||
'error/index' => __DIR__ . '/../view/error/index.phtml', | ||
), | ||
'template_path_stack' => array( | ||
__DIR__ . '/../view', | ||
), | ||
), | ||
); |
Binary file not shown.
Oops, something went wrong.