The Closure class
(PHP 5 >= 5.3.0)
Class used to represent anonymous
Anonymous functions, implemented in PHP 5.3, yield objects of this type.
This fact used to be considered an implementation detail, but it can now
be relied upon. Starting with PHP 5.4, this class has methods that allow
further control of the anonymous function after it has been created.
Besides the methods listed here, this class also has an
__invoke method. This is for consistency with other
classes that implement calling
magic, as this method is not used for calling the function.
Sinopse da classe
public static Closure bind
public Closure bindTo
- Closure::__construct — Constructor that disallows instantiation
- Closure::bind — Duplicates a closure with a specific bound object and class scope
- Closure::bindTo — Duplicates the closure with a new bound object and class scope
- Closure::call — Calls the closure with the given parameters and returns the result, with $this bound to the given object $to
There are no user contributed notes for this page.