Bearsampp 2025.8.29
Loading...
Searching...
No Matches
Tools Class Reference

Public Member Functions

 __construct ()
 getAll ()
 getBruno ()
 getComposer ()
 getConsoleZ ()
 getGhostscript ()
 getGit ()
 getGitGui ()
 getNgrok ()
 getPerl ()
 getPython ()
 getRuby ()
 update ()

Data Fields

const TYPE = 'tools'

Private Attributes

 $bruno
 $composer
 $consolez
 $ghostscript
 $git
 $ngrok
 $perl
 $python
 $ruby

Detailed Description

Class Tools

This class manages various tool modules in the Bearsampp application. It provides methods to retrieve and update the configuration of these tools.

Definition at line 17 of file class.tools.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructor for the Tools class.

Definition at line 72 of file class.tools.php.

73 {
74 }

Member Function Documentation

◆ getAll()

getAll ( )

Retrieves all tool instances.

Returns
array An array of all tool instances.

Definition at line 92 of file class.tools.php.

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 }
getComposer()
getConsoleZ()
getGhostscript()

References getBruno(), getComposer(), getConsoleZ(), getGhostscript(), getGit(), getNgrok(), getPerl(), getPython(), and getRuby().

Referenced by update().

◆ getBruno()

getBruno ( )

Retrieves the Bruno tool instance.

Returns
ToolBruno The Bruno tool instance.

Definition at line 112 of file class.tools.php.

113 {
114 if ($this->bruno == null) {
115 $this->bruno = new ToolBruno('bruno', self::TYPE);
116 }
117 return $this->bruno;
118 }

References $bruno.

Referenced by getAll().

◆ getComposer()

getComposer ( )

Retrieves the Composer tool instance.

Returns
ToolComposer The Composer tool instance.

Definition at line 125 of file class.tools.php.

126 {
127 if ($this->composer == null) {
128 $this->composer = new ToolComposer('composer', self::TYPE);
129 }
130 return $this->composer;
131 }

References $composer.

Referenced by getAll().

◆ getConsoleZ()

getConsoleZ ( )

Retrieves the ConsoleZ tool instance.

Returns
ToolConsoleZ The ConsoleZ tool instance.

Definition at line 138 of file class.tools.php.

139 {
140 if ($this->consolez == null) {
141 $this->consolez = new ToolConsoleZ('consolez', self::TYPE);
142 }
143 return $this->consolez;
144 }

References $consolez.

Referenced by getAll().

◆ getGhostscript()

getGhostscript ( )

Retrieves the Ghostscript tool instance.

Returns
ToolGhostscript The Ghostscript tool instance.

Definition at line 151 of file class.tools.php.

152 {
153 if ($this->ghostscript == null) {
154 $this->ghostscript = new ToolGhostscript('ghostscript', self::TYPE);
155 }
156 return $this->ghostscript;
157 }

References $ghostscript.

Referenced by getAll().

◆ getGit()

getGit ( )

Retrieves the Git tool instance.

Returns
ToolGit The Git tool instance.

Definition at line 164 of file class.tools.php.

165 {
166 if ($this->git == null) {
167 $this->git = new ToolGit('git', self::TYPE);
168 }
169 return $this->git;
170 }

References $git.

Referenced by getAll().

◆ getGitGui()

getGitGui ( )

Retrieves the Git GUI tool instance.

Returns
ToolGit The Git GUI tool instance.

Definition at line 177 of file class.tools.php.

178 {
179 if ($this->git == null) {
180 $this->git = new ToolGit('git-gui', self::TYPE);
181 }
182 return $this->git;
183 }

References $git.

◆ getNgrok()

getNgrok ( )

Retrieves the Ngrok tool instance.

Returns
ToolNgrok The Ngrok tool instance.

Definition at line 190 of file class.tools.php.

191 {
192 if ($this->ngrok == null) {
193 $this->ngrok = new ToolNgrok('ngrok', self::TYPE);
194 }
195 return $this->ngrok;
196 }

References $ngrok.

Referenced by getAll().

◆ getPerl()

getPerl ( )

Retrieves the Perl tool instance.

Returns
ToolPerl The Perl tool instance.

Definition at line 203 of file class.tools.php.

204 {
205 if ($this->perl == null) {
206 $this->perl = new ToolPerl('perl', self::TYPE);
207 }
208 return $this->perl;
209 }

References $perl.

Referenced by getAll().

◆ getPython()

getPython ( )

Retrieves the Python tool instance.

Returns
ToolPython The Python tool instance.

Definition at line 216 of file class.tools.php.

217 {
218 if ($this->python == null) {
219 $this->python = new ToolPython('python', self::TYPE);
220 }
221 return $this->python;
222 }

References $python.

Referenced by getAll().

◆ getRuby()

getRuby ( )

Retrieves the Ruby tool instance.

Returns
ToolRuby The Ruby tool instance.

Definition at line 229 of file class.tools.php.

230 {
231 if ($this->ruby == null) {
232 $this->ruby = new ToolRuby('ruby', self::TYPE);
233 }
234 return $this->ruby;
235 }

References $ruby.

Referenced by getAll().

◆ update()

update ( )

Updates the configuration of all tools.

Definition at line 79 of file class.tools.php.

80 {
81 Util::logInfo('Update tools config');
82 foreach ($this->getAll() as $tool) {
83 $tool->update();
84 }
85 }
static logInfo($data, $file=null)

References getAll(), and Util\logInfo().

Field Documentation

◆ $bruno

$bruno
private

Definition at line 32 of file class.tools.php.

Referenced by getBruno().

◆ $composer

$composer
private

Definition at line 27 of file class.tools.php.

Referenced by getComposer().

◆ $consolez

$consolez
private

Definition at line 37 of file class.tools.php.

Referenced by getConsoleZ().

◆ $ghostscript

$ghostscript
private

Definition at line 42 of file class.tools.php.

Referenced by getGhostscript().

◆ $git

$git
private

Definition at line 47 of file class.tools.php.

Referenced by getGit(), and getGitGui().

◆ $ngrok

$ngrok
private

Definition at line 52 of file class.tools.php.

Referenced by getNgrok().

◆ $perl

$perl
private

Definition at line 57 of file class.tools.php.

Referenced by getPerl().

◆ $python

$python
private

Definition at line 62 of file class.tools.php.

Referenced by getPython().

◆ $ruby

$ruby
private

Definition at line 67 of file class.tools.php.

Referenced by getRuby().

◆ TYPE

const TYPE = 'tools'

The type of the tools.

Definition at line 22 of file class.tools.php.

Referenced by Module\reload().


The documentation for this class was generated from the following file: