Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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