Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Mustache_HelperCollection Class Reference
Inheritance diagram for Mustache_HelperCollection:
core\output\mustache_helper_collection

Public Member Functions

 __construct ($helpers=null)
 Helper Collection constructor.
 
 __get ($name)
 Magic accessor.
 
 __isset ($name)
 Magic isset().
 
 __set ($name, $helper)
 Magic mutator.
 
 __unset ($name)
 Magic unset().
 
 add ($name, $helper)
 Add a helper to this collection.
 
 clear ()
 Clear the helper collection.
 
 get ($name)
 Get a helper by name.
 
 has ($name)
 Check whether a given helper is present in the collection.
 
 isEmpty ()
 Check whether the helper collection is empty.
 
 remove ($name)
 Check whether a given helper is present in the collection.
 

Constructor & Destructor Documentation

◆ __construct()

Mustache_HelperCollection::__construct ( $helpers = null)

Helper Collection constructor.

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

Exceptions
Mustache_Exception_InvalidArgumentExceptionif the $helpers argument isn't an array or Traversable
Parameters
array | Traversable$helpers(default: null)

Member Function Documentation

◆ __get()

Mustache_HelperCollection::__get ( $name)

Magic accessor.

See also
Mustache_HelperCollection\get
Parameters
string$name
Return values
mixedHelper

◆ __isset()

Mustache_HelperCollection::__isset ( $name)

Magic isset().

See also
Mustache_HelperCollection\has
Parameters
string$name
Return values
boolTrue if helper is present

◆ __set()

Mustache_HelperCollection::__set ( $name,
$helper )

Magic mutator.

See also
Mustache_HelperCollection\add
Parameters
string$name
mixed$helper

◆ __unset()

Mustache_HelperCollection::__unset ( $name)

Magic unset().

See also
Mustache_HelperCollection\remove
Parameters
string$name

◆ add()

Mustache_HelperCollection::add ( $name,
$helper )

Add a helper to this collection.

Parameters
string$name
mixed$helper

Reimplemented in core\output\mustache_helper_collection.

◆ clear()

Mustache_HelperCollection::clear ( )

Clear the helper collection.

Removes all helpers from this collection

◆ get()

Mustache_HelperCollection::get ( $name)

Get a helper by name.

Exceptions
Mustache_Exception_UnknownHelperExceptionIf helper does not exist
Parameters
string$name
Return values
mixedHelper

◆ has()

Mustache_HelperCollection::has ( $name)

Check whether a given helper is present in the collection.

Parameters
string$name
Return values
boolTrue if helper is present

◆ isEmpty()

Mustache_HelperCollection::isEmpty ( )

Check whether the helper collection is empty.

Return values
boolTrue if the collection is empty

◆ remove()

Mustache_HelperCollection::remove ( $name)

Check whether a given helper is present in the collection.

Exceptions
Mustache_Exception_UnknownHelperExceptionif the requested helper is not present
Parameters
string$name

The documentation for this class was generated from the following file: