Skip to content

Commit 22f5882

Browse files
author
Sergey Kasatkin
authored
Merge pull request #22 from gietos/callback_event_configure_merge_fix
Use `Yii::configure` instead of static call to `yii\base\Object` constructor
2 parents 3e55558 + c5df2e6 commit 22f5882

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CallbackEvent.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?php
22

33
namespace omnilight\scheduling;
4+
use Yii;
45
use yii\base\Application;
56
use yii\base\InvalidParamException;
6-
use yii\base\Object;
7-
87

98
/**
109
* Class CallbackEvent
@@ -34,7 +33,9 @@ public function __construct($callback, array $parameters = [], $config = [])
3433
$this->callback = $callback;
3534
$this->parameters = $parameters;
3635

37-
Object::__construct($config);
36+
if (!empty($config)) {
37+
Yii::configure($this, $config);
38+
}
3839

3940
if ( ! is_string($this->callback) && ! is_callable($this->callback))
4041
{
@@ -67,4 +68,4 @@ public function getSummaryForDisplay()
6768
return is_string($this->callback) ? $this->callback : 'Closure';
6869
}
6970

70-
}
71+
}

0 commit comments

Comments
 (0)