<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-dispatcher.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'yaf-dispatcher.setrequest.php',
    1 => 'Yaf_Dispatcher::setRequest',
    2 => 'Set the request object',
  ),
  'up' => 
  array (
    0 => 'class.yaf-dispatcher.php',
    1 => 'Yaf_Dispatcher',
  ),
  'prev' => 
  array (
    0 => 'yaf-dispatcher.seterrorhandler.php',
    1 => 'Yaf_Dispatcher::setErrorHandler',
  ),
  'next' => 
  array (
    0 => 'yaf-dispatcher.setresponse.php',
    1 => 'Yaf_Dispatcher::setResponse',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_dispatcher/setrequest.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-dispatcher.setrequest" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yaf_Dispatcher::setRequest</h1>
  <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Dispatcher::setRequest</span> &mdash; <span class="dc-title">Set the request object</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-dispatcher.setrequest-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>Yaf_Dispatcher::setRequest</strong></span>(<span class="methodparam"><span class="type"><a href="class.yaf-request-abstract.php" class="type Yaf_Request_Abstract">Yaf_Request_Abstract</a></span> <code class="parameter">$request</code></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.yaf-dispatcher.php" class="type Yaf_Dispatcher">Yaf_Dispatcher</a></span></span></div>

  <p class="simpara">
   Set the request object used by the dispatcher. This allows using a
   custom request implementation instead of the built-in
   <span class="classname"><a href="class.yaf-request-http.php" class="classname">Yaf_Request_Http</a></span> or
   <span class="classname"><a href="class.yaf-request-simple.php" class="classname">Yaf_Request_Simple</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-dispatcher.setrequest-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">request</code></dt>
    <dd>
     <p class="simpara">
      A <span class="classname"><a href="class.yaf-request-abstract.php" class="classname">Yaf_Request_Abstract</a></span> instance.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-dispatcher.setrequest-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="simpara">
   Returns the <span class="classname"><a href="class.yaf-dispatcher.php" class="classname">Yaf_Dispatcher</a></span> object itself on
   success, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if the application is not initialized.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-dispatcher.setrequest-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 <span class="methodname"><strong>Yaf_Dispatcher::setRequest()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
$app </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Application</span><span style="color: #007700">(</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">) . </span><span style="color: #DD0000">"/conf/application.ini"</span><span style="color: #007700">);

</span><span style="color: #FF8000">// Run the application from a cron job:
// $ php cron.php index/index/cleanup
</span><span style="color: #0000BB">$request </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Request_Simple</span><span style="color: #007700">(</span><span style="color: #DD0000">"CLI"</span><span style="color: #007700">);

</span><span style="color: #0000BB">Yaf_Dispatcher</span><span style="color: #007700">::</span><span style="color: #0000BB">getInstance</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">setRequest</span><span style="color: #007700">(</span><span style="color: #0000BB">$request</span><span style="color: #007700">);

</span><span style="color: #0000BB">$app</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">run</span><span style="color: #007700">();
</span><span style="color: #0000BB">?&gt;</span></code></pre></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-dispatcher.setrequest-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="yaf-dispatcher.getrequest.php" class="methodname" rel="rdfs-seeAlso">Yaf_Dispatcher::getRequest()</a> - Retrieve the request instance</span></li>
    <li><span class="classname"><a href="class.yaf-request-abstract.php" class="classname">Yaf_Request_Abstract</a></span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>