Resource
in package
This class is using to load and save resources of application. All resources have to be in "resources" directory of application source files.
Table of Contents
- GetExternalPathToResource() : string
- Returns an external path of resource
- GetResource() : string
- Returns content of resource
- SaveResource() : void
- Saves resource to target directory
- SaveResourcesDirectory() : void
- Saves whole directory to target external directory
Methods
GetExternalPathToResource()
Returns an external path of resource
public
static GetExternalPathToResource(string $pathToResource) : string
Parameters
- $pathToResource : string
Tags
Return values
string —GetResource()
Returns content of resource
public
static GetResource(string $pathToResource) : string
Parameters
- $pathToResource : string
-
Path to your resource from "resources" directory
Tags
Return values
string —Content of resource
SaveResource()
Saves resource to target directory
public
static SaveResource(string $pathToResource[, string|null $savePath = null ][, string|null $newFilename = null ]) : void
Parameters
- $pathToResource : string
- $savePath : string|null = null
- $newFilename : string|null = null
Tags
Return values
void —SaveResourcesDirectory()
Saves whole directory to target external directory
public
static SaveResourcesDirectory(string $pathToResourcesDirectory[, string|null $savePath = null ]) : void
Parameters
- $pathToResourcesDirectory : string
- $savePath : string|null = null