NetteAddons\HelperLoader::__construct PHP Method

__construct() public method

public __construct ( netteaddons\TextPreprocessor $preprocessor, $gravatarMaxRating, $wwwDir )
$preprocessor netteaddons\TextPreprocessor
    public function __construct(TextPreprocessor $preprocessor, $gravatarMaxRating, $wwwDir)
    {
        $this->helpers['description'] = array($preprocessor, 'processDescription');
        $this->helpers['licenses'] = array($preprocessor, 'processLicenses');
        $this->helpers['gravatar'] = function ($email, $size = 40) use($gravatarMaxRating) {
            return html_entity_decode(Gravatar::image($email, $size, null, $gravatarMaxRating));
        };
        $this->helpers['profile'] = function ($id) {
            return 'https://forum.nette.org/en/profile.php?id=' . $id;
        };
        $this->helpers['mtime'] = function ($path) use($wwwDir) {
            return filemtime($wwwDir . DIRECTORY_SEPARATOR . $path);
        };
    }