Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 9a6c625b6bc20c999d27cb2d035ea8c5 > files > 14

php-ZendFramework-extras-1.12.7-1.mga4.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Zend Framework Extras API Documentation</title><link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"></link><link rel="stylesheet" href="../css/template.css" type="text/css"></link><script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script><script type="text/javascript" src="../js/bootstrap.min.js"></script><script type="text/javascript" src="../js/template.js"></script></head><body><div id="content"><h1 class="file">Console/Process/Unix.php<a href="../source/Console/Process/Unix.php.html" role="button" class="pull-right btn btn-default"><i class="fa fa-2x fa-code"></i></a></h1><div id="file-nav-box"><div id="file-nav-options">
              Show:
              <img src="../images/icons/visibility_public.png" alt="Public" id="show-public"></img><img src="../images/icons/visibility_protected.png" alt="Protected" id="show-protected"></img><img src="../images/icons/visibility_private.png" alt="Private" id="show-private"></img><span class="attribute" id="show-inherited">inherited</span></div><div id="file-nav-container"><ul id="file-nav"><li><a href="#classes"><img src="../images/icons/class.png" alt="Class" height="14"></img>
                          Classes
                      </a><ul><li><a href="#\ZendX_Console_Process_Unix">\ZendX_Console_Process_Unix</a></li></ul></li></ul><div style="clear: left;"></div></div><div id="file-nav-tab">
              Table of Contents
          </div></div><a name="top" class="anchor"></a><div id="file-description"><div class="short-description">Zend Framework</div><div class="long-description">LICENSE

This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.</div></div><dl class="file-info"><dt>Category</dt><dd>ZendX
         
    </dd><dt>Copyright</dt><dd>Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
         
    </dd><dt>License</dt><dd><a href="http://framework.zend.com/license/new-bsd">New BSD License</a>
         
    </dd><dt>Package</dt><dd>ZendX_Console
         
    </dd><dt>Version</dt><dd>$Id$
         
    </dd></dl><a name="classes" class="anchor"></a><a id="\ZendX_Console_Process_Unix" class="anchor"></a><h2 class="class">\ZendX_Console_Process_Unix<div class="to-top"><a href="#top">jump to top</a></div></h2><div class="class"><small class="package"><b>Package: </b>ZendX_Console</small><div class="short-description">ZendX_Console_Process_Unix allows you to spawn a class as a separated process</div><div class="long-description"></div><dl class="class-info"><dt>Category</dt><dd>ZendX
         
    </dd><dt>Copyright</dt><dd>Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
         
    </dd><dt>License</dt><dd><a href="http://framework.zend.com/license/new-bsd">New BSD License</a>
         
    </dd></dl><h3>Constants</h3><div><a id="\ZendX_Console_Process_Unix::VOID_METHOD" class="anchor"></a><div class="constant publicC"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/constant.png" alt="Constant"></img> 
                <span class="highlight">VOID_METHOD</span>
                = 'void_method'</code><div class="description"><div class="short-description">Void method</div></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::RETURN_METHOD" class="anchor"></a><div class="constant publicC"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/constant.png" alt="Constant"></img> 
                <span class="highlight">RETURN_METHOD</span>
                = 'void_method'</code><div class="description"><div class="short-description">Return method</div></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div></div><h3>Properties</h3><div><a id="\ZendX_Console_Process_Unix::$_guid" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>integer <span class="highlight">$_guid</span> = null</code><div class="description"><div class="short-description">GUID of the child process owner</div></div><div class="code-tabs"><div class="long-description"></div><strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>integer</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_internalIpcData" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>array <span class="highlight">$_internalIpcData</span> = array()</code><div class="description"><div class="short-description">A data structure to hold data for Inter Process Communications</div></div><div class="code-tabs"><div class="long-description"></div><strong>Default value</strong><code>array()</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>array</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_internalIpcKey" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>integer <span class="highlight">$_internalIpcKey</span></code><div class="description"><div class="short-description">Key to access to Shared Memory Area.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>integer</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_internalSemKey" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>integer <span class="highlight">$_internalSemKey</span></code><div class="description"><div class="short-description">Key to access to Sync Semaphore.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>integer</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_ipcIsOkay" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>boolean <span class="highlight">$_ipcIsOkay</span></code><div class="description"><div class="short-description">Is Shared Memory Area OK? If not, the start() method will block.</div></div><div class="code-tabs"><div class="long-description">Otherwise we'll have a running child without any communication channel.</div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>boolean</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_ipcSegFile" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>string <span class="highlight">$_ipcSegFile</span></code><div class="description"><div class="short-description">Filename of the IPC segment file</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_ipcSemFile" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>string <span class="highlight">$_ipcSemFile</span></code><div class="description"><div class="short-description">Filename of the semaphor file</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_isChild" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>boolean <span class="highlight">$_isChild</span> = false</code><div class="description"><div class="short-description">Wether we are into child process or not</div></div><div class="code-tabs"><div class="long-description"></div><strong>Default value</strong><code>false</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>boolean</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_isRunning" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>boolean <span class="highlight">$_isRunning</span> = false</code><div class="description"><div class="short-description">Whether the process is yet forked or not</div></div><div class="code-tabs"><div class="long-description"></div><strong>Default value</strong><code>false</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>boolean</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_name" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>string <span class="highlight">$_name</span></code><div class="description"><div class="short-description">Unique thread name</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_pid" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>integer <span class="highlight">$_pid</span> = null</code><div class="description"><div class="short-description">PID of the child process</div></div><div class="code-tabs"><div class="long-description"></div><strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>integer</dd></dl></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::$_puid" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>integer <span class="highlight">$_puid</span> = null</code><div class="description"><div class="short-description">UID of the child process owner</div></div><div class="code-tabs"><div class="long-description"></div><strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>integer</dd></dl></div><div class="clear"></div></div></div><h3>Methods</h3><div><a id="\ZendX_Console_Process_Unix::__construct()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">__construct</span><span class="nb-faded-text">(integer $puid = null, integer $guid = null, integer $umask = null)</span> : void</code><div class="description"><p class="short_description">Constructor method</p></div><div class="code-tabs"><div class="long-description">Allocates a new pseudo-thread object. Optionally, set a PUID, a GUID and
a UMASK for the child process. This also initialize Shared Memory
Segments for process communications.</div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$puid</th><td>integer</td><td><em></em></td></tr><tr><th>$guid</th><td>integer</td><td><em></em></td></tr><tr><th>$umask</th><td>integer</td><td><em></em></td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When running on windows</em></td></tr><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When running in web enviroment</em></td></tr><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When shmop_* functions don't exist</em></td></tr><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When pcntl_* functions don't exist</em></td></tr><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When posix_* functions don't exist</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::__destruct()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">__destruct</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Stop the child on destruction</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_callCallbackMethod()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">_callCallbackMethod</span><span class="nb-faded-text">(string $methodName, array $argList = array(), string $type = self::VOID_METHOD)</span> : mixed</code><div class="description"><p class="short_description">This is called from within the parent; all the communication stuff
is done here.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$methodName</th><td>string</td><td><em></em></td></tr><tr><th>$argList</th><td>array</td><td><em></em></td></tr><tr><th>$type</th><td>string</td><td><em></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>mixed</td><td></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_cleanProcessContext()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_cleanProcessContext</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Destroy thread context and free relative resources.</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_createIpcSegment()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_createIpcSegment</span><span class="nb-faded-text">()</span> : boolean</code><div class="description"><p class="short_description">Create an IPC segment</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>boolean</td><td></td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When SHM segment can't be created</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_createIpcSemaphore()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_createIpcSemaphore</span><span class="nb-faded-text">()</span> : boolean</code><div class="description"><p class="short_description">Create IPC semaphore</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>boolean</td><td></td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When semaphore can't be created</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_readFromIpcSegment()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_readFromIpcSegment</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Read data from IPC segment</p></div><div class="code-tabs"><div class="long-description"></div><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When writing of SHM segment fails</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_run()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">_run</span><span class="nb-faded-text">()</span> : void</code><div class="description"><span class="attribute">abstract</span><p class="short_description">This method actually implements the pseudo-thread logic.</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_sendSigUsr1()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_sendSigUsr1</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Sends signal to the child process</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_setAlive()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">_setAlive</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Set a pseudo-thread property that can be read from parent process
in order to know the child activity.</p></div><div class="code-tabs"><div class="long-description">Practical usage requires that child process calls this method at regular
time intervals; parent will use the getLastAlive() method to know
the elapsed time since the last pseudo-thread life signals...</div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_sigHandler()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_sigHandler</span><span class="nb-faded-text">(integer $signo)</span> : void</code><div class="description"><p class="short_description">This is the signal handler that makes the communications between client
and server possible.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$signo</th><td>integer</td><td><em></em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_waitForIpcSemaphore()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_waitForIpcSemaphore</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Wait for IPC Semaphore</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_writeToIpcSegment()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_writeToIpcSegment</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Write data to IPC segment</p></div><div class="code-tabs"><div class="long-description"></div><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When writing of SHM segment fails</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::_writeVariable()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">_writeVariable</span><span class="nb-faded-text">(string $name, mixed $value)</span> : void</code><div class="description"><p class="short_description">Acutally Write a variable to the shared memory segment</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$name</th><td>string</td><td><em></em></td></tr><tr><th>$value</th><td>mixed</td><td><em></em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::getLastAlive()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">getLastAlive</span><span class="nb-faded-text">()</span> : integer</code><div class="description"><p class="short_description">Read the time elapsed since the last child setAlive() call.</p></div><div class="code-tabs"><div class="long-description">This method is useful because often we have a pseudo-thread pool and we
need to know each pseudo-thread status. If the child executes the
setAlive() method, the parent with getLastAlive() can know that child is
alive.</div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>integer</td><td></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::getPid()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">getPid</span><span class="nb-faded-text">()</span> : integer</code><div class="description"><p class="short_description">Returns the PID of the current pseudo-thread.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>integer</td><td></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::getVariable()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">getVariable</span><span class="nb-faded-text">(string $name)</span> : mixed</code><div class="description"><p class="short_description">Get a variable from the shared memory segment. Returns NULL if the
variable doesn't exist.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$name</th><td>string</td><td><em></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>mixed</td><td></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::isRunning()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">isRunning</span><span class="nb-faded-text">()</span> : boolean</code><div class="description"><p class="short_description">Test if the pseudo-thread is already started.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>boolean</td><td></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::setVariable()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">setVariable</span><span class="nb-faded-text">(string $name, mixed $value)</span> : void</code><div class="description"><p class="short_description">Set a variable into the shared memory segment, so that it can accessed
both from the parent and from the child process. Variable names
beginning with underlines are only permitted to interal functions.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$name</th><td>string</td><td><em></em></td></tr><tr><th>$value</th><td>mixed</td><td><em></em></td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When an invalid variable name is supplied</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::start()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">start</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Causes this pseudo-thread to begin parallel execution.</p></div><div class="code-tabs"><div class="long-description">This method first checks of all the Shared Memory Segment. If okay, it
forks the child process, attaches signal handler and returns immediatly.
The status is set to running, and a PID is assigned. The result is that
two pseudo-threads are running concurrently: the current thread (which
returns from the call to the start() method) and the other thread (which
executes its run() method).</div><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When SHM segments can't be created</em></td></tr><tr><td><a href="../files/ZendX_Console_Process_Exception.html">\ZendX_Console_Process_Exception</a></td><td><em>When process forking fails</em></td></tr></table></div><div class="clear"></div></div><a id="\ZendX_Console_Process_Unix::stop()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">stop</span><span class="nb-faded-text">()</span> : boolean</code><div class="description"><p class="short_description">Causes the current thread to die.</p></div><div class="code-tabs"><div class="long-description">The relative process is killed and disappears immediately from the
processes list.</div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>boolean</td><td></td></tr></table></div><div class="clear"></div></div></div></div></div><small class="footer">
            Documentation was generated by
            <a href="http://phpdoc.org">phpDocumentor
                2.2.0
</a>.
        </small></body></html>