PHPDaemon\Core\ComplexJob::getResult PHP Метод

getResult() публичный Метод

Get result
public getResult ( string $jobname ) : mixed
$jobname string Job name
Результат mixed Result or null
    public function getResult($jobname)
    {
        return isset($this->results[$jobname]) ? $this->results[$jobname] : null;
    }

Usage Example

Пример #1
0
    /**
     * Called when request iterated.
     * @return integer Status.
     */
    public function run()
    {
        try {
            $this->header('Content-Type: text/html');
        } catch (\Exception $e) {
        }
        ?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Clients\Redis Simple example</title>
</head>
<body>

<?php 
        if ($r = $this->job->getResult('testquery')) {
            echo '<h1>It works! Be happy! ;-)</h1>Result of query: <pre>';
            var_dump($r);
            echo '</pre>';
        } else {
            echo '<h1>Something went wrong! We have no result.</h1>';
        }
        echo '<br />Request (http) took: ' . round(microtime(TRUE) - $this->attrs->server['REQUEST_TIME_FLOAT'], 6);
        ?>
</body>
</html>

<?php 
    }
All Usage Examples Of PHPDaemon\Core\ComplexJob::getResult