PHP-Deno

ModuleLoader
in package

The module loader interface (don't trust the docs, this is an interface not a class!) Pass an instance of your class that implements `Deno\Core\ModuleLoader` to the `module_loader` property of `Deno\Runtime\WorkerOptions` or `Deno\Core\RuntimeOptions`

Table of Contents

Methods

load()  : ModuleSource
The `load` method takes a module specifier and should return the contents for a module.
resolve()  : string
The `resolve` method should take a module specifier and normalize it to a canonical URL.

Methods

load()

The `load` method takes a module specifier and should return the contents for a module.

public load(string $_specifier) : ModuleSource

See Deno\Core\ModuleSource for the specifics.

Parameters
$_specifier : string
Return values
ModuleSource

resolve()

The `resolve` method should take a module specifier and normalize it to a canonical URL.

public resolve(string $_specifier, string $_referrer) : string
Parameters
$_specifier : string
$_referrer : string
Return values
string

        
On this page

Search results