Go to the source code of this file.
◆ toList()
- Author
- Niels Theen nthee.nosp@m.n@da.nosp@m.tabay.nosp@m..de
Definition at line 7 of file 07-to-new-method.php.
References $DIC, and $result.
11 public function say(
string $firstWord,
string $secondWord)
13 return $firstWord . $secondWord;
19 $instance =
new SomeClass();
21 $refinery = $DIC->refinery();
23 $transformation = $refinery->to()->toNew(
24 array($instance,
'say')
27 $result = $transformation->transform(array(
'Hello',
' World!'));
29 return assert(
'Hello World!' ===
$result);