Maslosoft Staple API
Class ViewJsonExtractor
View Json Extractor
This extracts data from json file named same as view file, but with json extension. When resolving name, extension is not added to this json file.
For example, when there is file index.php
this will try to load data from
file index.json
.
Some example files structure:
products/ index.php index.json spoon.md.php spoon.json fork.md fork.json
From example above data from json files will be attached by following associacions:
index.json --> index.php spoon.json --> sopon.md.php fork.json --> fork.md
Extracted data is available both in view and in layout.
- Maslosoft\Staple\Processors\Pre\ViewJsonExtractor implements Maslosoft\Staple\Interfaces\PreProcessorInterface
Namespace: Maslosoft\Staple\Processors\Pre
Author: Piotr Maselkowski
Located at Processors/Pre/ViewJsonExtractor.php
Author: Piotr Maselkowski
Located at Processors/Pre/ViewJsonExtractor.php
Methods summary
public
|
|
public
|
API documentation generated by ApiGen