mirror of
https://github.com/danog/amp.git
synced 2024-12-02 17:37:50 +01:00
33 lines
484 B
PHP
33 lines
484 B
PHP
<?php
|
|
|
|
namespace Amp\Loop\Internal;
|
|
|
|
class Watcher
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $id;
|
|
|
|
/**
|
|
* @var callable
|
|
*/
|
|
public $callback;
|
|
|
|
/**
|
|
* @var mixed
|
|
*/
|
|
public $data;
|
|
|
|
/**
|
|
* @param callable $callback
|
|
* @param mixed $data
|
|
*/
|
|
public function __construct(callable $callback, $data = null)
|
|
{
|
|
$this->id = \spl_object_hash($this);
|
|
$this->callback = $callback;
|
|
$this->data = $data;
|
|
}
|
|
}
|