Bearsampp
2026.9.23
Toggle main menu visibility
Loading...
Searching...
No Matches
class.tools.php
Go to the documentation of this file.
1
<?php
2
/*
3
*
4
* * Copyright (c) 2021-2026 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
$powershell
;
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
Log::info
(
'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->
getPowerShell
(),
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
118
return
$this->bruno
;
119
}
120
126
public
function
getComposer
()
127
{
128
if
($this->composer ==
null
) {
129
$this->composer =
new
ToolComposer
(
'composer'
, self::TYPE);
130
}
131
132
return
$this->composer
;
133
}
134
140
public
function
getPowerShell
()
141
{
142
if
($this->powershell ==
null
) {
143
$this->powershell =
new
ToolPowerShell
(
'powershell'
, self::TYPE);
144
}
145
146
return
$this->powershell
;
147
}
148
154
public
function
getGhostscript
()
155
{
156
if
($this->ghostscript ==
null
) {
157
$this->ghostscript =
new
ToolGhostscript
(
'ghostscript'
, self::TYPE);
158
}
159
160
return
$this->ghostscript
;
161
}
162
168
public
function
getGit
()
169
{
170
if
($this->git ==
null
) {
171
$this->git =
new
ToolGit
(
'git'
, self::TYPE);
172
}
173
174
return
$this->git
;
175
}
176
182
public
function
getGitGui
()
183
{
184
if
($this->git ==
null
) {
185
$this->git =
new
ToolGit
(
'git-gui'
, self::TYPE);
186
}
187
188
return
$this->git
;
189
}
190
196
public
function
getNgrok
()
197
{
198
if
($this->ngrok ==
null
) {
199
$this->ngrok =
new
ToolNgrok
(
'ngrok'
, self::TYPE);
200
}
201
202
return
$this->ngrok
;
203
}
204
210
public
function
getPerl
()
211
{
212
if
($this->perl ==
null
) {
213
$this->perl =
new
ToolPerl
(
'perl'
, self::TYPE);
214
}
215
216
return
$this->perl
;
217
}
218
224
public
function
getPython
()
225
{
226
if
($this->python ==
null
) {
227
$this->python =
new
ToolPython
(
'python'
, self::TYPE);
228
}
229
230
return
$this->python
;
231
}
232
238
public
function
getRuby
()
239
{
240
if
($this->ruby ==
null
) {
241
$this->ruby =
new
ToolRuby
(
'ruby'
, self::TYPE);
242
}
243
244
return
$this->ruby
;
245
}
246
}
247
Log\info
static info($data, $file=null)
Definition
class.log.php:737
ToolBruno
Definition
class.tool.bruno.php:20
ToolComposer
Definition
class.tool.composer.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
ToolPowerShell
Definition
class.tool.powershell.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\getPowerShell
getPowerShell()
Definition
class.tools.php:140
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:238
Tools\getPython
getPython()
Definition
class.tools.php:224
Tools\getGitGui
getGitGui()
Definition
class.tools.php:182
Tools\getNgrok
getNgrok()
Definition
class.tools.php:196
Tools\$bruno
$bruno
Definition
class.tools.php:32
Tools\getBruno
getBruno()
Definition
class.tools.php:112
Tools\getPerl
getPerl()
Definition
class.tools.php:210
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:126
Tools\$powershell
$powershell
Definition
class.tools.php:37
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\getGhostscript
getGhostscript()
Definition
class.tools.php:154
Tools\getGit
getGit()
Definition
class.tools.php:168
sandbox
core
classes
tools
class.tools.php
Generated by
1.17.0