\Manifestator
Implements a manifest generator for a web application
Synopsis
class Manifestator
{
- // members
- protected string $name = 'AppName';
- protected string $shortName = 'ShortName';
- protected string $startUrl = '.';
- protected string $display = 'standalone';
- protected string $themeColor = 'ffffff';
- protected string $backgroundColor = 'ffffff';
- protected array $icons = ;
- protected array $appendData = ;
- // methods
- public void __construct()
- protected void setDefaultIcons()
- public void setName()
- public void setShortName()
- public void setStartUrl()
- public void setDisplay()
- public void setThemeColor()
- public void setBackgroundColor()
- public void setIcons()
- public void setAppendData()
- protected array getManifest()
- public void render()
Members
protected
- $appendData
—
array
Contains appended custom data - $backgroundColor
—
string
The background color - $display
—
string
The display mode - $icons
—
array
The icons set - $name
—
string
application name - $shortName
—
string
short application name - $startUrl
—
string
The start URL - $themeColor
—
string
The theme color
Methods
protected
- getManifest() — Returns application manifest array
- setDefaultIcons() — Sets the default icons for the web application.
public
- __construct() — Constructor method.
- render() — Renders the manifest data as JSON and sends it as the response.
- setAppendData() — Sets the custom data to be appended to the manifest.
- setBackgroundColor() — Sets the background color of the web application.
- setDisplay() — Sets the display mode of the web application.
- setIcons() — Sets the icons set of the web application.
- setName() — Sets the name of the web application.
- setShortName() — Sets the shortName of the web application.
- setStartUrl() — Sets the start URL of the web application.
- setThemeColor() — Sets the theme color of the web application.