Skip to content

Commit 275fd9a

Browse files
committed
$application->handle() returns $response.
1 parent 558a0dc commit 275fd9a

File tree

16 files changed

+44
-18
lines changed

16 files changed

+44
-18
lines changed

hmvc/public/index.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,8 @@ public function request(array $location, $data = null)
9898

9999
$app = new HMVCApplication($di);
100100

101-
echo $app->handle()->getContent();
101+
102+
103+
$response = $app->handle();
104+
105+
$response->send();

multiple-factory-default/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
]
5959
);
6060

61-
echo $application->handle()->getContent();
61+
$response = $application->handle();
62+
63+
$response->send();
6264
} catch (Phalcon\Exception $e) {
6365
echo $e->getMessage();
6466
} catch (PDOException $e) {

multiple-service-layer-model/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
*/
2828
require __DIR__ . '/../apps/config/modules.php';
2929

30-
echo $application->handle()->getContent();
30+
$response = $application->handle();
31+
32+
$response->send();
3133
} catch (Phalcon\Exception $e) {
3234
echo $e->getMessage();
3335
} catch (PDOException $e) {

multiple-shared-layouts/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
]
8181
);
8282

83-
echo $application->handle()->getContent();
83+
$response = $application->handle();
84+
85+
$response->send();
8486
} catch (Phalcon\Exception $e) {
8587
echo $e->getMessage();
8688
} catch (PDOException $e) {

multiple-shared-views/public/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ function () {
8989

9090
$response = $application->handle();
9191

92-
echo $response->getContent();
92+
$response->send();

multiple-volt/public/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
$response = $application->handle();
2929

30-
echo $response->getContent();
30+
$response->send();
3131
} catch (Exception $e) {
3232
echo $e->getMessage();
3333
}

multiple/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ public function main()
8080
]
8181
]);
8282

83-
echo $this->handle()->getContent();
83+
$response = $this->handle();
84+
85+
$response->send();
8486
}
8587
}
8688

simple-subcontrollers/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
*/
2727
$application = new Application($di);
2828

29-
echo $application->handle()->getContent();
29+
$response = $application->handle();
30+
31+
$response->send();
3032
} catch (\Exception $e) {
3133
echo $e->getMessage();
3234
}

simple-volt/public/index.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
*/
2525
$application = new \Phalcon\Mvc\Application();
2626
$application->setDI($di);
27-
echo $application->handle()->getContent();
27+
28+
$response = $application->handle();
29+
30+
$response->send();
2831
} catch (Phalcon\Exception $e) {
2932
echo $e->getMessage();
3033
} catch (PDOException $e) {

simple-without-application/public/index.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@
8080
// Pass the output of the view to the response
8181
$response->setContent($view->getContent());
8282

83-
$response->sendHeaders();
84-
85-
echo $response->getContent();
83+
$response->send();
8684
} catch (\Exception $e) {
8785
echo $e->getMessage();
8886
}

simple/public/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function () {
7878

7979
$response = $application->handle();
8080

81-
echo $response->getContent();
81+
$response->send();
8282
} catch (Exception $e) {
8383
echo $e->getMessage();
8484
}

single-camelized-dirs/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ function ($event, $application, $view) use ($di) {
2828

2929
$application->setEventsManager($eventsManager);
3030

31-
echo $application->handle()->getContent();
31+
$response = $application->handle();
32+
33+
$response->send();
3234
} catch (\Exception $e) {
3335
echo $e->getMessage();
3436
}

single-factory-default/public/index.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@
8686
* Handle the request
8787
*/
8888
$application = new Application($di);
89-
echo $application->handle()->getContent();
89+
90+
$response = $application->handle();
91+
92+
$response->send();
9093
} catch (\Exception $e) {
9194
echo $e->getMessage();
9295
}

single-namespaces/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public function main()
9797
$this->registerServices();
9898
$this->registerAutoloaders();
9999

100-
echo $this->handle()->getContent();
100+
$response = $this->handle();
101+
102+
$response->send();
101103
}
102104
}
103105

single-service-provider/app/Bootstrap.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ public function run()
103103
protected function getOutput()
104104
{
105105
if ($this->app instanceof Application) {
106-
return $this->app->handle()->getContent();
106+
$response = $this->app->handle();
107+
108+
return $response->getContent();
107109
}
108110

109111
return $this->app->handle();

single/public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ public function main()
117117
$this->registerServices();
118118
$this->registerAutoloaders();
119119

120-
echo $this->handle()->getContent();
120+
$response = $this->handle();
121+
122+
$response->send();
121123
}
122124
}
123125

0 commit comments

Comments
 (0)