From 8713f68c5eb6179bacca9dce28aa32a1584e9d28 Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Mon, 1 May 2017 12:16:28 +0200 Subject: [PATCH] moving ConfigFile to base --- src/{components => base}/ConfigFile.php | 52 +------------------------ 1 file changed, 1 insertion(+), 51 deletions(-) rename src/{components => base}/ConfigFile.php (81%) diff --git a/src/components/ConfigFile.php b/src/base/ConfigFile.php similarity index 81% rename from src/components/ConfigFile.php rename to src/base/ConfigFile.php index d5a338b..ce36839 100644 --- a/src/components/ConfigFile.php +++ b/src/base/ConfigFile.php @@ -8,7 +8,7 @@ * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/) */ -namespace hidev\components; +namespace hidev\base; use hidev\base\File; use hidev\helpers\Helper; @@ -28,26 +28,6 @@ class ConfigFile extends \hidev\base\Component implements \yii\base\Arrayable, \ */ public $fileType; - /** - * @var bool Don't touch file if exists - */ - public $once; - - /** - * @var string Username to change file owner to - */ - public $chown; - - /** - * @var string Group to change file group to - */ - public $chgrp; - - /** - * @var string|integer Permissions to change to - */ - public $chmod; - /** * @var array|File the file to be handled */ @@ -130,15 +110,6 @@ public function setPath($value) $this->_path = $value; } - /** - * Copy setter. Turns this file type to `copy`. - */ - public function setCopy($value) - { - $this->fileType = 'copy'; - $this->_copy = $value; - } - /** * Copy getter. Processes aliases. */ @@ -208,14 +179,6 @@ public function load() } } - /** - * DEPRECATED in favour of save(). - */ - public function actionSave() - { - return $this->save(); - } - /** * Save the file. */ @@ -227,17 +190,4 @@ public function save() $this->_items = Helper::uniqueConfig($this->_items); $this->getFile()->save($this); } - - /** - * Modify action. - */ - public function actionModify() - { - foreach (['chown', 'chgrp', 'chmod'] as $k) { - $v = $this->{$k}; - if ($v) { - $this->file->{$k}($v); - } - } - } }