Permalink
Browse files

Merged latest from ZendSkeletonApplication.

Big change: ZF2 is now included as part of composer.

Conflicts:
	.gitignore
	.gitmodules
	README.md
	config/application.config.php
	config/autoload/.gitignore
	config/autoload/global.php
	config/autoload/local.php.dist
	module/Application/Module.php
	module/Application/config/module.config.php
	module/Application/view/layout/layout.phtml
	public/index.php
	vendor/README.md
  • Loading branch information...
1 parent d537480 commit ba6f10d138464b3182b61c81e64a2c1bfefda3e8 @valorin committed May 23, 2012
View
@@ -8,4 +8,4 @@ nbproject
.idea
.project
.settings
-composer.phar
+composer.lock
View
@@ -1,6 +1,3 @@
-[submodule "vendor/ZendFramework"]
- path = vendor/ZendFramework
- url = git://github.com/zendframework/zf2.git
[submodule "vendor/ValVersion"]
path = vendor/ValVersion
url = git://github.com/valorin/ValVersion.git
View
@@ -0,0 +1,19 @@
+{
+ "name": "valorin/wyoa",
+ "description": "Write Your Own Adventure",
+ "license": "BSD-3-Clause",
+ "keywords": [
+ "wyoa",
+ "choose-your-own-adventure"
+ ],
+ "homepage": "http://wyoa.valorin.net/",
+ "require": {
+ "php": ">=5.3.3",
+ "zendframework/zendframework": "dev-master"
+ },
+ "autoload": {
+ "psr-0": {
+ "Application": "module/Application/src"
+ }
+ }
+}
View
Binary file not shown.
@@ -1,2 +1,3 @@
-local.config.php
-*.local.config.php
+local.php
+*.local.php
+
@@ -4,20 +4,6 @@
class Module
{
- public function getAutoloaderConfig()
- {
- return array(
- 'Zend\Loader\ClassMapAutoloader' => array(
- __DIR__ . '/autoload_classmap.php',
- ),
- 'Zend\Loader\StandardAutoloader' => array(
- 'namespaces' => array(
- __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
- ),
- ),
- );
- }
-
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
@@ -32,7 +32,7 @@
'options' => array(
'route' => '/',
'defaults' => array(
- 'controller' => 'Story\Controller\PageController',
+ 'controller' => 'page',
'action' => 'index',
),
),
@@ -58,7 +58,7 @@
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
'template_path_stack' => array(
- 'application' => __DIR__ . '/../view',
+ __DIR__ . '/../view',
),
),
);
@@ -71,5 +71,5 @@ echo $this->doctype()."\n";
and can be found on <a href='https://github.com/valorin/wyoa'>Github</a>.
</p>
</footer>
-</body>
+ </body>
</html>
View
@@ -13,19 +13,6 @@
*/
class Module
{
- public function getAutoloaderConfig()
- {
- return array(
- 'Zend\Loader\ClassMapAutoloader' => array(
- __DIR__ . '/autoload_classmap.php',
- ),
- 'Zend\Loader\StandardAutoloader' => array(
- 'namespaces' => array(
- __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
- ),
- ),
- );
- }
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
@@ -72,7 +72,7 @@
'choice' => '[0-9]*',
),
'defaults' => array(
- 'controller' => 'Story\Controller\PageController',
+ 'controller' => 'page',
'action' => 'index',
'id' => 1,
),
@@ -86,7 +86,7 @@
'choice' => '[0-9]*',
),
'defaults' => array(
- 'controller' => 'Story\Controller\PageController',
+ 'controller' => 'page',
'action' => 'new',
'choice' => null,
),
@@ -100,7 +100,7 @@
'id' => '[0-9]*',
),
'defaults' => array(
- 'controller' => 'Story\Controller\ChoiceController',
+ 'controller' => 'choice',
'action' => 'index',
),
),
@@ -115,7 +115,7 @@
),
'view_manager' => array(
'template_path_stack' => array(
- 'application' => __DIR__ . '/../view',
+ __DIR__ . '/../view',
),
'helper_map' => array(
'special' => 'Story\View\Helper\Special',
View
@@ -1,21 +1,21 @@
<?php
-chdir(dirname(__DIR__));
-require_once (getenv('ZF2_PATH') ?: 'vendor/ZendFramework/library') . '/Zend/Loader/AutoloaderFactory.php';
+use Zend\ServiceManager\ServiceManager,
+ Zend\Mvc\Service\ServiceManagerConfiguration;
-use Zend\Loader\AutoloaderFactory,
-Zend\ServiceManager\ServiceManager,
-Zend\Mvc\Service\ServiceManagerConfiguration;
+chdir(dirname(__DIR__));
-// setup autoloader
-AutoloaderFactory::factory();
+// Composer autoloading
+if (!include_once('vendor/autoload.php')) {
+ throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');
+}
-// get application stack configuration
+// Get application stack configuration
$configuration = include 'config/application.config.php';
-// setup service manager
+// Setup service manager
$serviceManager = new ServiceManager(new ServiceManagerConfiguration($configuration['service_manager']));
$serviceManager->setService('ApplicationConfiguration', $configuration);
$serviceManager->get('ModuleManager')->loadModules();
-// run application
+// Run application
$serviceManager->get('Application')->bootstrap()->run()->send();
View
@@ -0,0 +1,5 @@
+!.gitignore
+.composer
+composer
+zendframework
+autoload.php
View
@@ -1 +1 @@
-This `vendor/` directory is where third-party modules should be installed.
+This vendor/ directory is where third-party modules should be installed.
Submodule ZendFramework deleted from fedd11

0 comments on commit ba6f10d

Please sign in to comment.