Skip to content

Commit

Permalink
add Manager::$source
Browse files Browse the repository at this point in the history
  • Loading branch information
klimov-paul committed May 26, 2023
1 parent de6983b commit 8f4dd5e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ class Manager extends CApplicationComponent
* Set this parameter to a negative integer to aviod caching.
*/
public $cacheDuration = 0;
/**
* @var object|null configuration source object for the {@see $items}.
* If not set current Yii application instance will be used.
* @see \yii1tech\config\Item::$source
*/
public $source;

/**
* @param array|\yii1tech\config\Storage $storage
Expand Down Expand Up @@ -187,6 +193,7 @@ protected function createItem($id, array $config)
$config['class'] = Item::class;
}
$config['id'] = $id;
$config['source'] = $this->source;

return Yii::createComponent($config);
}
Expand Down

0 comments on commit 8f4dd5e

Please sign in to comment.