ReactLoader
extends TiqBase
in package
class for loading the css and js files needed to create react components
Expects the file path given to be relative to the root of the server
Table of Contents
- $path : mixed
- $publicCss : mixed
- $publicJs : mixed
- $standardCss : mixed
- $standardJs : mixed
- $version : mixed
- __construct() : mixed
- Loads JavaScript and CSS files from Directory with an expected structure
- __get() : mixed
- Base getter hooked into php's magic __get
- __set() : mixed
- Base setter hooked into php's magic __set
- addJSBundle() : mixed
- Includes the JS Bundle
- set_publicCss() : mixed
- set_publicJs() : mixed
- addCS() : mixed
- add a single css file to the browser
- addJS() : mixed
- add a single javascript file to the browser
- BulkAddCss() : mixed
- adds all the CSS files in the strandCss array
- BulkAddJs() : mixed
- adds all the JavaScript files in the standardJs array
- getMediaVersion() : mixed
- terminate() : mixed
- Logs an error and throws and exception
- verifyPath() : bool
- Checks whether a path exists and that is has the correct sub-directories
Properties
$path
protected
mixed
$path
= null
$publicCss
protected
mixed
$publicCss
= null
$publicJs
protected
mixed
$publicJs
= null
$standardCss
protected
mixed
$standardCss
= null
$standardJs
protected
mixed
$standardJs
= null
$version
protected
mixed
$version
= null
Methods
__construct()
Loads JavaScript and CSS files from Directory with an expected structure
public
__construct(string $path) : mixed
Parameters
- $path : string
-
Path to the Directory containing media files
Return values
mixed —__get()
Base getter hooked into php's magic __get
public
__get(string $name) : mixed
Allows the retrieval of properties from a class. Requires the implementation of a get method in the concrete class
Parameters
- $name : string
-
name of the property
Return values
mixed —__set()
Base setter hooked into php's magic __set
public
__set(string $name, mixed $value) : mixed
Allows the settings of properties on a class safely. Requires the implementation of a set method in the concrete class
Parameters
- $name : string
-
name of property to be set
- $value : mixed
Return values
mixed —addJSBundle()
Includes the JS Bundle
public
addJSBundle() : mixed
Return values
mixed —set_publicCss()
public
set_publicCss() : mixed
Return values
mixed —set_publicJs()
public
set_publicJs() : mixed
Return values
mixed —addCS()
add a single css file to the browser
protected
addCS(string $file) : mixed
Parameters
- $file : string
-
name of CSS file
Return values
mixed —addJS()
add a single javascript file to the browser
protected
addJS(string $file) : mixed
Parameters
- $file : string
-
name of JS file
Return values
mixed —BulkAddCss()
adds all the CSS files in the strandCss array
protected
BulkAddCss() : mixed
Return values
mixed —BulkAddJs()
adds all the JavaScript files in the standardJs array
protected
BulkAddJs() : mixed
Return values
mixed —getMediaVersion()
protected
getMediaVersion() : mixed
Return values
mixed —terminate()
Logs an error and throws and exception
protected
terminate([string $message = '' ]) : mixed
Parameters
- $message : string = ''
-
Reason for termination
Tags
Return values
mixed —verifyPath()
Checks whether a path exists and that is has the correct sub-directories
protected
verifyPath(string $path) : bool
Parameters
- $path : string
-
path should not include the root
Return values
bool —Validity of the path