public function __construct($data)
{
if (!is_array($data) || !array_key_exists('io_driver', $data)) {
throw new InvalidArgumentException("Filesystem workers must include an IO driver");
}
$this->io_driver = $data['io_driver'];
if (!$this->io_driver instanceof IoDriverInterface) {
throw new InvalidArgumentException("io_driver must be an instance of IoDriverInterface");
}
}