Members
(static) dependencies :Array.<string>
- Source:
Class dependencies:
['app', 'config', 'file']
.
Methods
find(view)
- Source:
Find view path by name.
Parameters:
Name | Type | Description |
---|---|---|
view |
string | The view name. |
Throws:
-
Indicates that the given view was not found.
- Type
- TypeError
Returns:
The view content.
- Type
- string
exists(view)
- Source:
Check if view file exists by name.
Parameters:
Name | Type | Description |
---|---|---|
view |
string | The view name. |
Returns:
Indicates that the view file exists and may be rendered.
- Type
- boolean
getViewPath(view)
- Source:
Get view path by name.
Parameters:
Name | Type | Description |
---|---|---|
view |
string | The view name. |
Returns:
The found view path, or null if not found.
- Type
- string | null
getViewPaths(view)
- Source:
Get view possible paths by name.
Parameters:
Name | Type | Description |
---|---|---|
view |
string | The view name. |
Returns:
The possible view file paths.
- Type
- Array.<string>
getViewBasePaths(view)
- Source:
Get base path of the given view based on the namespace if present.
Parameters:
Name | Type | Description |
---|---|---|
view |
string | The view name. |
Throws:
-
Indicates that the given view namespace was not found.
- Type
- TypeError
Returns:
The view folder paths.
- Type
- Array.<string>
namespace(namespace, folder)
- Source:
Register views namespace.
Parameters:
Name | Type | Description |
---|---|---|
namespace |
string | The namespace. |
folder |
string | The folder. |
Returns:
The current resolver instance.
addPath(path)
- Source:
Add possible views path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The new views path. |
Returns:
The current resolver instance.
getBasePaths()
- Source:
Get all views base paths.
Returns:
The view base paths.
- Type
- Array.<string>