/**
* @since 1.25
+ * @deprecated since 1.31, use Message::listParam() instead
*/
class DeferredStringifier {
/** @var callable Callback used for result string generation */
private $callback;
+
/** @var array */
private $params;
+
/** @var string */
private $result;
/**
* @param callable $callback Callback that gets called by __toString
- * @param mixed $param,... Parameters to the callback
+ * @param mixed ...$params Parameters to the callback
*/
- public function __construct( $callback /*...*/ ) {
- $this->params = func_get_args();
- array_shift( $this->params );
+ public function __construct( $callback, ...$params ) {
$this->callback = $callback;
+ $this->params = $params;
}
/**
- * Returns a string generated by callback
+ * Get the string generated from the callback
*
* @return string
*/