summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDracony <draconyster@gmail.com>2015-07-16 12:47:12 +0200
committerDracony <draconyster@gmail.com>2015-07-16 12:47:12 +0200
commit2a3f59e38738b4e4431bad34bc87263d3c67cd33 (patch)
treef657bbe56e727707a7c57f0e8ef62f2693ffa599
parent01d81a86b6c8afd03be8a840c334535b0d48a4d7 (diff)
downloadPHPixie-2a3f59e38738b4e4431bad34bc87263d3c67cd33.zip
PHPixie-2a3f59e38738b4e4431bad34bc87263d3c67cd33.tar.gz
PHPixie-2a3f59e38738b4e4431bad34bc87263d3c67cd33.tar.bz2
updated default bundle
-rwxr-xr-xbundles/app/assets/config/routeResolver.php2
-rw-r--r--[-rwxr-xr-x]bundles/app/assets/templates/greet.php (renamed from bundles/app/assets/templates/hello/greet.php)4
-rwxr-xr-xbundles/app/src/Project/App/HTTPProcessor.php4
-rwxr-xr-xbundles/app/src/Project/App/HTTPProcessors/Greet.php (renamed from bundles/app/src/Project/App/HTTPProcessors/Hello.php)7
4 files changed, 8 insertions, 9 deletions
diff --git a/bundles/app/assets/config/routeResolver.php b/bundles/app/assets/config/routeResolver.php
index 30cd2cb..891ab64 100755
--- a/bundles/app/assets/config/routeResolver.php
+++ b/bundles/app/assets/config/routeResolver.php
@@ -9,7 +9,7 @@ return array(
'path' => '(<processor>(/<action>))',
'defaults' => array(
'processor' => 'hello',
- 'action' => 'greet'
+ 'action' => 'default'
)
)
diff --git a/bundles/app/assets/templates/hello/greet.php b/bundles/app/assets/templates/greet.php
index bbb1ca0..7ee3a70 100755..100644
--- a/bundles/app/assets/templates/hello/greet.php
+++ b/bundles/app/assets/templates/greet.php
@@ -1,3 +1,3 @@
-<?php $this->layout('app:layout');?>
-
+<?php $this->layout('app:layout');?>
+
<h2><?=$_($message); ?></h2> \ No newline at end of file
diff --git a/bundles/app/src/Project/App/HTTPProcessor.php b/bundles/app/src/Project/App/HTTPProcessor.php
index 13aac9c..0555f7b 100755
--- a/bundles/app/src/Project/App/HTTPProcessor.php
+++ b/bundles/app/src/Project/App/HTTPProcessor.php
@@ -12,11 +12,11 @@ class HTTPProcessor extends \PHPixie\DefaultBundle\Processor\HTTP\Builder
$this->builder = $builder;
}
- protected function buildHelloProcessor()
+ protected function buildGreetProcessor()
{
$components = $this->builder->components();
- return new HTTPProcessors\Hello(
+ return new HTTPProcessors\Greet(
$components->template()
);
}
diff --git a/bundles/app/src/Project/App/HTTPProcessors/Hello.php b/bundles/app/src/Project/App/HTTPProcessors/Greet.php
index b0bb56a..ac4f3b8 100755
--- a/bundles/app/src/Project/App/HTTPProcessors/Hello.php
+++ b/bundles/app/src/Project/App/HTTPProcessors/Greet.php
@@ -2,19 +2,18 @@
namespace Project\App\HTTPProcessors;
-class Hello extends \PHPixie\DefaultBundle\Processor\HTTP\Actions
+class Greet extends \PHPixie\DefaultBundle\Processor\HTTP\Actions
{
protected $template;
- protected $attribute = 'action';
public function __construct($template)
{
$this->template = $template;
}
- public function greetAction($request)
+ public function defaultAction($request)
{
- $container = $this->template->get('app:hello/greet');
+ $container = $this->template->get('app:greet');
$container->message = "Have fun coding!";
return $container;
}