BumbleDocGen / Technical description of the project / Renderer / Template functions / FileGetContents
FileGetContents class:
namespace BumbleDocGen\Core\Renderer\Twig\Function;
final class FileGetContents implements \BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterfaceDisplaying the content of a file or web resource
See:
Examples of using:
{{ fileGetContents('https://www.php.net/manual/en/function.file-get-contents.php') }}{{ fileGetContents('%templates_dir%/../config.yaml') }}| Function name: | fileGetContents |
- # __construct | source code
public function __construct(\BumbleDocGen\Core\Configuration\ConfigurationParameterBag $parameterBag);Parameters:
| Name | Type | Description |
|---|---|---|
| $parameterBag | \BumbleDocGen\Core\Configuration\ConfigurationParameterBag | - |
- # __invoke | source code
public function __invoke(string $resourceName): string;Parameters:
| Name | Type | Description |
|---|---|---|
| $resourceName | string | Resource name, url or path to the resource. The path can contain shortcodes with parameters from the configuration (%param_name%) |
Return value: string
- # getName | source code
public static function getName(): string;Parameters: not specified
Return value: string
- # getOptions | source code
public static function getOptions(): array;Parameters: not specified
Return value: array