Documentation

DiskResourceProvider
in package
implements ResourceProvider

Provides resources from the given plugin directory on disk. The path may be prefixed with a specific access protocol to enable special types of access.

Interfaces, Classes, Traits and Enums

ResourceProvider

Table of Contents

$file  : string
__construct()  : mixed
getResource()  : null|resource
Gets an embedded resource on the plugin file.
getResources()  : array<string|int, SplFileInfo>
Returns all the resources packaged with the plugin in the form ["path/in/resources" => SplFileInfo]

Properties

Methods

__construct()

public __construct(string $path) : mixed
Parameters
$path : string
Return values
mixed

getResource()

Gets an embedded resource on the plugin file.

public getResource(string $filename) : null|resource

WARNING: You must close the resource given using fclose()

Parameters
$filename : string
Return values
null|resource

Resource data, or null

getResources()

Returns all the resources packaged with the plugin in the form ["path/in/resources" => SplFileInfo]

public getResources() : array<string|int, SplFileInfo>
Return values
array<string|int, SplFileInfo>

Search results