1 | <?php |
||
13 | class Deploy extends Service |
||
14 | { |
||
15 | /** Идентификатор модуля */ |
||
16 | protected $id = 'deploy'; |
||
17 | |||
18 | /** @var Remote */ |
||
19 | public $remote; |
||
20 | |||
21 | /** @var array Collection of path names to be ignored */ |
||
22 | public $ignorePath = array('cms'); |
||
23 | |||
24 | /** Path to site document root on local server */ |
||
25 | public $sourceroot = ''; |
||
26 | |||
27 | /** FTP host */ |
||
28 | public $host = ''; |
||
|
|||
29 | |||
30 | /** Path to site document root on remote server */ |
||
31 | public $wwwroot = ''; |
||
32 | |||
33 | /** FTP username */ |
||
34 | public $username= ''; |
||
35 | |||
36 | /** FTP password */ |
||
37 | public $password= ''; |
||
38 | |||
39 | /** |
||
40 | * Get all entries in $path |
||
41 | * @param string $path Folder path for listing |
||
42 | * @return array Collection of entries int folder |
||
43 | */ |
||
44 | protected function directoryFiles($path) |
||
54 | |||
55 | /** |
||
56 | * Perform synchronizing folder via FTP connection |
||
57 | * @param string $path Local path for synchronizing |
||
58 | */ |
||
59 | protected function synchronize($path) |
||
80 | |||
81 | /** |
||
82 | * Initialize module |
||
83 | * @param array $params |
||
84 | * @return bool |
||
85 | */ |
||
86 | public function init(array $params = array()) |
||
100 | |||
101 | /** |
||
102 | * Signal module error |
||
103 | * @param string $message error message |
||
104 | * @return bool false |
||
105 | */ |
||
106 | public function error($message) |
||
113 | |||
114 | /** |
||
115 | * Perform project deployment |
||
116 | */ |
||
117 | protected function deploy() |
||
128 | |||
129 | /** Controller to perform deploy routine */ |
||
130 | public function __BASE() |
||
148 | } |
||
149 |