Skip to content

Commit ec2ea38

Browse files
committed
Update functions.php
1 parent d1cc1ee commit ec2ea38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
use Evas\Di\Definitions\Reference;
1515

1616
if (! function_exists('create')) {
17-
function create(string $className, array $args = null) {
18-
return new CreateObject($className, $args);
17+
function create(string $className, array $args = null, callable $callback = null) {
18+
return new CreateObject($className, $args, $callback);
1919
}
2020
}
2121
if (! function_exists('createOnce')) {
22-
function createOnce(string $className, array $args = null) {
23-
return (new CreateObject($className, $args))->once();
22+
function createOnce(string $className, array $args = null, callable $callback = null) {
23+
return (new CreateObject($className, $args, $callback))->once();
2424
}
2525
}
2626
if (! function_exists('includeFile')) {

0 commit comments

Comments
 (0)