MediaWiki
fundraising/REL1_35
DeferredStringifier.php
Go to the documentation of this file.
1
<?php
27
class
DeferredStringifier
{
29
private
$callback
;
30
32
private
$params
;
33
35
private
$result
;
36
41
public
function
__construct
(
$callback
, ...
$params
) {
42
$this->callback =
$callback
;
43
$this->params =
$params
;
44
}
45
51
public
function
__toString
() {
52
if
( $this->result ===
null
) {
53
$this->result = call_user_func_array( $this->callback, $this->params );
54
}
55
return
$this->result
;
56
}
57
}
DeferredStringifier
Definition
DeferredStringifier.php:27
DeferredStringifier\$result
string $result
Definition
DeferredStringifier.php:35
DeferredStringifier\__construct
__construct( $callback,... $params)
Definition
DeferredStringifier.php:41
DeferredStringifier\$callback
callable $callback
Callback used for result string generation.
Definition
DeferredStringifier.php:29
DeferredStringifier\__toString
__toString()
Get the string generated from the callback.
Definition
DeferredStringifier.php:51
DeferredStringifier\$params
array $params
Definition
DeferredStringifier.php:32
includes
libs
DeferredStringifier.php
Generated on Mon Nov 25 2024 16:14:59 for MediaWiki by
1.10.0