Skip to content

Commit

Permalink
Update functions.php
Browse files Browse the repository at this point in the history
  • Loading branch information
evasyakin committed Aug 6, 2021
1 parent d1cc1ee commit ec2ea38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
use Evas\Di\Definitions\Reference;

if (! function_exists('create')) {
function create(string $className, array $args = null) {
return new CreateObject($className, $args);
function create(string $className, array $args = null, callable $callback = null) {
return new CreateObject($className, $args, $callback);
}
}
if (! function_exists('createOnce')) {
function createOnce(string $className, array $args = null) {
return (new CreateObject($className, $args))->once();
function createOnce(string $className, array $args = null, callable $callback = null) {
return (new CreateObject($className, $args, $callback))->once();
}
}
if (! function_exists('includeFile')) {
Expand Down

0 comments on commit ec2ea38

Please sign in to comment.