Skip to main content

UrlResource

A Resource that represents a file available from a URL.

Hierarchy

Index

Constructors

constructor

  • Creates a new instance of UrlResource.


    Parameters

    • resource: UrlReference

      The URL reference.

    • optionalprogress: ProgressTracker

      The progress tracker.

    Returns UrlResource

Properties

publicoptionalprogress

progress?: ProgressTracker

The progress tracker.

Accessors

isAsync

  • get isAsync(): boolean
  • Whether this Resource is loaded asynchronously


    Returns boolean

name

  • get name(): string
  • The name of the referenced file


    Returns string

Methods

getURL

  • getURL(): string
  • @inheritDoc

    Returns string

resolve

  • resolve(): Promise<File>
  • Resolves the file contents


    Returns Promise<File>

    The resolved file.

setPlayground

  • setPlayground(playground: UniversalPHP): void
  • Parameters

    • playground: UniversalPHP

    Returns void

staticcreate

  • Creates a new Resource based on the given file reference


    Parameters

    Returns Resource

    A new Resource instance