Module
Table of Contents
- __construct() : mixed
- Create a Wasm\Module from a `wasm_module_t` resource.
- deserialize() : self
- exports() : ExportType
- imports() : ImportType
- inner() : resource
- Return the inner module resource.
- name() : string
- Get or set the module's name.
- new() : self
- serialize() : string
- validate() : bool
Methods
__construct()
Create a Wasm\Module from a `wasm_module_t` resource.
public
__construct(mixed $module) : mixed
Parameters
- $module : mixed
Tags
Return values
mixed —deserialize()
public
static deserialize(Store $store, string $serialized) : self
Parameters
- $store : Store
- $serialized : string
Return values
self —exports()
public
exports() : ExportType
Return values
ExportType —imports()
public
imports() : ImportType
Return values
ImportType —inner()
Return the inner module resource.
public
inner() : resource
Return values
resource —A wasm_module_t
resource
name()
Get or set the module's name.
public
name([string|null $name = null ]) : string
Parameters
- $name : string|null = null
Return values
string —new()
public
static new(Store $store, string $wasm) : self
Parameters
- $store : Store
- $wasm : string
Return values
self —serialize()
public
serialize() : string
Return values
string —validate()
public
static validate(Store $store, string $wasm) : bool
Parameters
- $store : Store
- $wasm : string