2017-11-29 22:05:15 +01:00
|
|
|
<?php
|
|
|
|
|
2017-11-29 22:07:00 +01:00
|
|
|
namespace Amp\Parallel\Sync\Internal;
|
2017-11-29 22:05:15 +01:00
|
|
|
|
2018-10-21 17:54:46 +02:00
|
|
|
final class ParcelStorage extends \Threaded
|
2018-10-07 16:50:45 +02:00
|
|
|
{
|
2017-11-29 22:05:15 +01:00
|
|
|
/** @var mixed */
|
|
|
|
private $value;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $value
|
|
|
|
*/
|
2018-10-07 16:50:45 +02:00
|
|
|
public function __construct($value)
|
|
|
|
{
|
2017-11-29 22:05:15 +01:00
|
|
|
$this->value = $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2018-10-07 16:50:45 +02:00
|
|
|
public function get()
|
|
|
|
{
|
2017-11-29 22:05:15 +01:00
|
|
|
return $this->value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $value
|
|
|
|
*/
|
2018-10-07 16:50:45 +02:00
|
|
|
public function set($value)
|
|
|
|
{
|
2017-11-29 22:05:15 +01:00
|
|
|
$this->value = $value;
|
|
|
|
}
|
|
|
|
}
|