<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.swoole.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'class.swoole-runtime.php',
    1 => 'Swoole\\Runtime',
    2 => 'The Swoole\\Runtime class',
  ),
  'up' => 
  array (
    0 => 'book.swoole.php',
    1 => 'Swoole',
  ),
  'prev' => 
  array (
    0 => 'swoole-redis-server.start.php',
    1 => 'Swoole\\Redis\\Server::start',
  ),
  'next' => 
  array (
    0 => 'swoole-runtime.enable-coroutine.php',
    1 => 'Swoole\\Runtime::enableCoroutine',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/swoole/swoole.runtime.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.swoole-runtime.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.swoole-runtime" class="reference">

 <h1 class="title">The Swoole\Runtime class</h1>
 

 <div class="partintro"><p class="verinfo">(No version information available, might only be in Git)</p>

  
  <div class="section" id="swoole-runtime.intro">
   <h2 class="title">Introduction</h2>
   <p class="para">
    Swoole\Runtime provides coroutine support for various PHP functions through hook mechanism,
    allowing synchronous code to work asynchronously in coroutine environment.
   </p>
  </div>
  

  <div class="section" id="swoole-runtime.synopsis">
   <h2 class="title">Class synopsis</h2>

   
   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>

    
    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">Swoole\Runtime</strong>
     </span>
     {</div>
    

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-runtime.enable-coroutine.php" class="methodname">enableCoroutine</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = SWOOLE_HOOK_ALL</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-runtime.get-hook-flags.php" class="methodname">getHookFlags</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-runtime.set-hook-flags.php" class="methodname">setHookFlags</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   }</div>
   

  </div>

 </div>

 





















<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="swoole-runtime.enable-coroutine.php">Swoole\Runtime::enableCoroutine</a> — Enable coroutine for specified functions</li><li><a href="swoole-runtime.get-hook-flags.php">Swoole\Runtime::getHookFlags</a> — Get current hook flags</li><li><a href="swoole-runtime.set-hook-flags.php">Swoole\Runtime::setHookFlags</a> — Set hook flags for coroutine</li></ul>
</div>
<?php manual_footer($setup); ?>