snipt

Ctrl+h for KB shortcuts

PHP

Call a Kohana controller within a controller

//Kohana, call a controller within a controller
Request::factory('internal_user/authenticated/')->execute()->response;
https://snipt.net/embed/5afb43f2ab7e768b078229eba011ad90/
https://snipt.net/raw/5afb43f2ab7e768b078229eba011ad90/
5afb43f2ab7e768b078229eba011ad90
php
PHP
2
2016-09-16T11:03:58
True
False
False
/api/public/snipt/22896/
call-a-kohana-controller-within-a-controller
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">//Kohana, call a controller within a controller</span> </span><span id="L-2"><a name="L-2"></a><span class="x">Request::factory(&#39;internal_user/authenticated/&#39;)-&gt;execute()-&gt;response;</span> </span></pre></div> </td></tr></table>
controller, kohana, php

PHP

Kohana 3 Call one controller from another

1
2
3
4
//PHP Kohana 3
//Call one controller from another

$output .= Request::factory("controller/methodName/{$param1}/{$param2}")->execute()->response;
https://snipt.net/embed/e1a6c1d616443d4741794f84ffc98e65/
https://snipt.net/raw/e1a6c1d616443d4741794f84ffc98e65/
e1a6c1d616443d4741794f84ffc98e65
php
PHP
4
2016-09-24T12:02:02
True
False
False
/api/public/snipt/20854/
kohana-3-call-one-controller-from-another
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">//PHP Kohana 3</span> </span><span id="L-2"><a name="L-2"></a><span class="x">//Call one controller from another</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="x">$output .= Request::factory(&quot;controller/methodName/{$param1}/{$param2}&quot;)-&gt;execute()-&gt;response;</span> </span></pre></div> </td></tr></table>
controller, kohana, php

PHP

Accion redirect

$this->redirect(array('controller' => 'controlador', 'action' => 'pagina'));
https://snipt.net/embed/a1ce68547e66fef2a87c66b47aac65f5/
https://snipt.net/raw/a1ce68547e66fef2a87c66b47aac65f5/
a1ce68547e66fef2a87c66b47aac65f5
php
PHP
1
2016-09-25T20:13:22
True
False
False
/api/public/snipt/13404/
accion-redirect
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">$this-&gt;redirect(array(&#39;controller&#39; =&gt; &#39;controlador&#39;, &#39;action&#39; =&gt; &#39;pagina&#39;));</span> </span></pre></div> </td></tr></table>
cakephp, controller
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.