/** * @param array $config * * @since 1.0 * @author Choate <*****@*****.**> * @return DepControl * @throws \yii\base\InvalidConfigException */ public static function run(array $config = []) { $object = \Yii::createObject(array_merge($config, ['class' => DepControl::className()])); if (!empty($config)) { \Yii::configure($object, $config); } return $object; }
private function execCurrentVersion($model) { $website = $model->website; return DepControl::run(['deployScript' => $website->deploy_script, 'deployProject' => $website->deploy_project])->current(); }