Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 172 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Mustache_HelperCollection:: (11 methods):
  __construct()
  __set()
  add()
  __get()
  get()
  __isset()
  has()
  __unset()
  remove()
  clear()
  isEmpty()


Class: Mustache_HelperCollection  - X-Ref

A collection of helpers for a Mustache instance.

__construct($helpers = null)   X-Ref
Helper Collection constructor.

Optionally accepts an array (or Traversable) of `$name => $helper` pairs.

param: array|Traversable $helpers (default: null)

__set($name, $helper)   X-Ref
Magic mutator.

param: string $name
param: mixed  $helper

add($name, $helper)   X-Ref
Add a helper to this collection.

param: string $name
param: mixed  $helper

__get($name)   X-Ref
Magic accessor.

param: string $name
return: mixed Helper

get($name)   X-Ref
Get a helper by name.

param: string $name
return: mixed Helper

__isset($name)   X-Ref
Magic isset().

param: string $name
return: bool True if helper is present

has($name)   X-Ref
Check whether a given helper is present in the collection.

param: string $name
return: bool True if helper is present

__unset($name)   X-Ref
Magic unset().

param: string $name

remove($name)   X-Ref
Check whether a given helper is present in the collection.

param: string $name

clear()   X-Ref
Clear the helper collection.

Removes all helpers from this collection

isEmpty()   X-Ref
Check whether the helper collection is empty.

return: bool True if the collection is empty