mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
31 lines
505 B
PHP
31 lines
505 B
PHP
<?php
|
|
|
|
namespace Amp\Internal;
|
|
|
|
/**
|
|
* Used in PHP 5.x to represent coroutine return values. Use the return keyword in PHP 7.x.
|
|
*
|
|
* @internal
|
|
*/
|
|
class CoroutineResult
|
|
{
|
|
/**
|
|
* @var mixed
|
|
*/
|
|
private $value;
|
|
|
|
/**
|
|
* @param mixed $value Coroutine return value.
|
|
*/
|
|
public function __construct($value) {
|
|
$this->value = $value;
|
|
}
|
|
|
|
/**
|
|
* @return mixed Coroutine return value.
|
|
*/
|
|
public function getValue() {
|
|
return $this->value;
|
|
}
|
|
}
|