Bearsampp
2025.8.29
Loading...
Searching...
No Matches
class.tools.php
Go to the documentation of this file.
1
<?php
2
/*
3
*
4
* * Copyright (c) 2021-2024 Bearsampp
5
* * License: GNU General Public License version 3 or later; see LICENSE.txt
6
* * Website: https://bearsampp.com
7
* * Github: https://github.com/Bearsampp
8
*
9
*/
10
17
class
Tools
18
{
22
const
TYPE
=
'tools'
;
23
27
private
$composer
;
28
32
private
$bruno
;
33
37
private
$consolez
;
38
42
private
$ghostscript
;
43
47
private
$git
;
48
52
private
$ngrok
;
53
57
private
$perl
;
58
62
private
$python
;
63
67
private
$ruby
;
68
72
public
function
__construct
()
73
{
74
}
75
79
public
function
update
()
80
{
81
Util::logInfo
(
'Update tools config'
);
82
foreach
($this->
getAll
() as $tool) {
83
$tool->update();
84
}
85
}
86
92
public
function
getAll
()
93
{
94
return
array(
95
$this->
getBruno
(),
96
$this->
getComposer
(),
97
$this->
getConsoleZ
(),
98
$this->
getGhostscript
(),
99
$this->
getGit
(),
100
$this->
getNgrok
(),
101
$this->
getPerl
(),
102
$this->
getPython
(),
103
$this->
getRuby
(),
104
);
105
}
106
112
public
function
getBruno
()
113
{
114
if
($this->bruno ==
null
) {
115
$this->bruno =
new
ToolBruno
(
'bruno'
, self::TYPE);
116
}
117
return
$this->bruno
;
118
}
119
125
public
function
getComposer
()
126
{
127
if
($this->composer ==
null
) {
128
$this->composer =
new
ToolComposer
(
'composer'
, self::TYPE);
129
}
130
return
$this->composer
;
131
}
132
138
public
function
getConsoleZ
()
139
{
140
if
($this->consolez ==
null
) {
141
$this->consolez =
new
ToolConsoleZ
(
'consolez'
, self::TYPE);
142
}
143
return
$this->consolez
;
144
}
145
151
public
function
getGhostscript
()
152
{
153
if
($this->ghostscript ==
null
) {
154
$this->ghostscript =
new
ToolGhostscript
(
'ghostscript'
, self::TYPE);
155
}
156
return
$this->ghostscript
;
157
}
158
164
public
function
getGit
()
165
{
166
if
($this->git ==
null
) {
167
$this->git =
new
ToolGit
(
'git'
, self::TYPE);
168
}
169
return
$this->git
;
170
}
171
177
public
function
getGitGui
()
178
{
179
if
($this->git ==
null
) {
180
$this->git =
new
ToolGit
(
'git-gui'
, self::TYPE);
181
}
182
return
$this->git
;
183
}
184
190
public
function
getNgrok
()
191
{
192
if
($this->ngrok ==
null
) {
193
$this->ngrok =
new
ToolNgrok
(
'ngrok'
, self::TYPE);
194
}
195
return
$this->ngrok
;
196
}
197
203
public
function
getPerl
()
204
{
205
if
($this->perl ==
null
) {
206
$this->perl =
new
ToolPerl
(
'perl'
, self::TYPE);
207
}
208
return
$this->perl
;
209
}
210
216
public
function
getPython
()
217
{
218
if
($this->python ==
null
) {
219
$this->python =
new
ToolPython
(
'python'
, self::TYPE);
220
}
221
return
$this->python
;
222
}
223
229
public
function
getRuby
()
230
{
231
if
($this->ruby ==
null
) {
232
$this->ruby =
new
ToolRuby
(
'ruby'
, self::TYPE);
233
}
234
return
$this->ruby
;
235
}
236
}
ToolBruno
Definition
class.tool.bruno.php:20
ToolComposer
Definition
class.tool.composer.php:17
ToolConsoleZ
Definition
class.tool.consolez.php:17
ToolGhostscript
Definition
class.tool.ghostscript.php:18
ToolGit
Definition
class.tool.git.php:17
ToolNgrok
Definition
class.tool.ngrok.php:18
ToolPerl
Definition
class.tool.perl.php:17
ToolPython
Definition
class.tool.python.php:19
ToolRuby
Definition
class.tool.ruby.php:19
Tools
Definition
class.tools.php:18
Tools\__construct
__construct()
Definition
class.tools.php:72
Tools\$ghostscript
$ghostscript
Definition
class.tools.php:42
Tools\$ruby
$ruby
Definition
class.tools.php:67
Tools\$perl
$perl
Definition
class.tools.php:57
Tools\getRuby
getRuby()
Definition
class.tools.php:229
Tools\getPython
getPython()
Definition
class.tools.php:216
Tools\getGitGui
getGitGui()
Definition
class.tools.php:177
Tools\$consolez
$consolez
Definition
class.tools.php:37
Tools\getNgrok
getNgrok()
Definition
class.tools.php:190
Tools\$bruno
$bruno
Definition
class.tools.php:32
Tools\getBruno
getBruno()
Definition
class.tools.php:112
Tools\getPerl
getPerl()
Definition
class.tools.php:203
Tools\update
update()
Definition
class.tools.php:79
Tools\TYPE
const TYPE
Definition
class.tools.php:22
Tools\$ngrok
$ngrok
Definition
class.tools.php:52
Tools\getComposer
getComposer()
Definition
class.tools.php:125
Tools\$composer
$composer
Definition
class.tools.php:27
Tools\getAll
getAll()
Definition
class.tools.php:92
Tools\$python
$python
Definition
class.tools.php:62
Tools\$git
$git
Definition
class.tools.php:47
Tools\getConsoleZ
getConsoleZ()
Definition
class.tools.php:138
Tools\getGhostscript
getGhostscript()
Definition
class.tools.php:151
Tools\getGit
getGit()
Definition
class.tools.php:164
Util\logInfo
static logInfo($data, $file=null)
Definition
class.util.php:767
Bearsampp-development
sandbox
core
classes
tools
class.tools.php
Generated by
1.14.0