class \mpf\web\AssetsPublisher

class \mpf\web\AssetsPublisher

Description of AssetsPublisher

@author mirel

Attributes
private static \mpf\web\AssetsPublisher[] $_instances = []

-no description found-

private bool[] $publishCache = []

List of already known published folders / files

public string $publishFolder = "__assets"

Name of the public folder where the assets can be copied

public bool $developmentMode = false

If set to true then every time the assets will be overwritten with the new versions.

Methods

public static \mpf\web\AssetsPublisher get (string[] $config = [])

  • $config

    -no description found-

Return instance of class.

public mixed mpfAssetFile (mixed $name)

  • $name

    -no description found-

-no description found-

public string publishFolder (string $path)

  • $path

    -no description found-

Publish an entire folder

public string publishFile (string $path)

  • $path

    -no description found-

Publish a single file

private bool _isPublished (string $publishPath)

  • $publishPath

    -no description found-

Check if selected path was already published

protected mixed _folder (string $oldPath, string $newPath)

  • $oldPath

    -no description found-

  • $newPath

    -no description found-

Copy folder contents from one location to another

protected bool _file (string $oldPath, string $newPath)

  • $oldPath

    -no description found-

  • $newPath

    -no description found-

Copy a single file