2024.8.23
Loading...
Searching...
No Matches
Tools Class Reference

Public Member Functions

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

Data Fields

const TYPE = 'tools'
 

Private Attributes

 $composer
 
 $consolez
 
 $ghostscript
 
 $git
 
 $ngrok
 
 $perl
 
 $python
 
 $ruby
 
 $xdc
 
 $yarn
 

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 16 of file class.tools.php.

Constructor & Destructor Documentation

◆ __construct()

Tools::__construct ( )

Constructor for the Tools class.

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

77 {
78 }

Member Function Documentation

◆ getAll()

Tools::getAll ( )

Retrieves all tool instances.

Returns
array An array of all tool instances.

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

97 {
98 return array(
99 $this->getComposer(),
100 $this->getConsoleZ(),
101 $this->getGhostscript(),
102 $this->getGit(),
103 $this->getNgrok(),
104 $this->getPerl(),
105 $this->getPython(),
106 $this->getRuby(),
107 $this->getXdc(),
108 $this->getYarn(),
109 );
110 }
getComposer()
getConsoleZ()
getGhostscript()

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

Referenced by update().

+ Here is the caller graph for this function:

◆ getComposer()

Tools::getComposer ( )

Retrieves the Composer tool instance.

Returns
ToolComposer The Composer tool instance.

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

118 {
119 if ($this->composer == null) {
120 $this->composer = new ToolComposer('composer', self::TYPE);
121 }
122 return $this->composer;
123 }

References $composer.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getConsoleZ()

Tools::getConsoleZ ( )

Retrieves the ConsoleZ tool instance.

Returns
ToolConsoleZ The ConsoleZ tool instance.

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

131 {
132 if ($this->consolez == null) {
133 $this->consolez = new ToolConsoleZ('consolez', self::TYPE);
134 }
135 return $this->consolez;
136 }

References $consolez.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getGhostscript()

Tools::getGhostscript ( )

Retrieves the Ghostscript tool instance.

Returns
ToolGhostscript The Ghostscript tool instance.

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

144 {
145 if ($this->ghostscript == null) {
146 $this->ghostscript = new ToolGhostscript('ghostscript', self::TYPE);
147 }
148 return $this->ghostscript;
149 }

References $ghostscript.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getGit()

Tools::getGit ( )

Retrieves the Git tool instance.

Returns
ToolGit The Git tool instance.

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

157 {
158 if ($this->git == null) {
159 $this->git = new ToolGit('git', self::TYPE);
160 }
161 return $this->git;
162 }

References $git.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getGitGui()

Tools::getGitGui ( )

Retrieves the Git GUI tool instance.

Returns
ToolGit The Git GUI tool instance.

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

170 {
171 if ($this->git == null) {
172 $this->git = new ToolGit('git-gui', self::TYPE);
173 }
174 return $this->git;
175 }

References $git.

◆ getNgrok()

Tools::getNgrok ( )

Retrieves the Ngrok tool instance.

Returns
ToolNgrok The Ngrok tool instance.

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

183 {
184 if ($this->ngrok == null) {
185 $this->ngrok = new ToolNgrok('ngrok', self::TYPE);
186 }
187 return $this->ngrok;
188 }

References $ngrok.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getPerl()

Tools::getPerl ( )

Retrieves the Perl tool instance.

Returns
ToolPerl The Perl tool instance.

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

196 {
197 if ($this->perl == null) {
198 $this->perl = new ToolPerl('perl', self::TYPE);
199 }
200 return $this->perl;
201 }

References $perl.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getPython()

Tools::getPython ( )

Retrieves the Python tool instance.

Returns
ToolPython The Python tool instance.

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

209 {
210 if ($this->python == null) {
211 $this->python = new ToolPython('python', self::TYPE);
212 }
213 return $this->python;
214 }

References $python.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getRuby()

Tools::getRuby ( )

Retrieves the Ruby tool instance.

Returns
ToolRuby The Ruby tool instance.

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

222 {
223 if ($this->ruby == null) {
224 $this->ruby = new ToolRuby('ruby', self::TYPE);
225 }
226 return $this->ruby;
227 }

References $ruby.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getXdc()

Tools::getXdc ( )

Retrieves the Xdc tool instance.

Returns
ToolXdc The Xdc tool instance.

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

235 {
236 if ($this->xdc == null) {
237 $this->xdc = new ToolXdc('xdc', self::TYPE);
238 }
239 return $this->xdc;
240 }

References $xdc.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ getYarn()

Tools::getYarn ( )

Retrieves the Yarn tool instance.

Returns
ToolYarn The Yarn tool instance.

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

248 {
249 if ($this->yarn == null) {
250 $this->yarn = new ToolYarn('yarn', self::TYPE);
251 }
252 return $this->yarn;
253 }

References $yarn.

Referenced by getAll().

+ Here is the caller graph for this function:

◆ update()

Tools::update ( )

Updates the configuration of all tools.

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

84 {
85 Util::logInfo('Update tools config');
86 foreach ($this->getAll() as $tool) {
87 $tool->update();
88 }
89 }
static logInfo($data, $file=null)

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

Field Documentation

◆ $composer

Tools::$composer
private

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

Referenced by getComposer().

◆ $consolez

Tools::$consolez
private

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

Referenced by getConsoleZ().

◆ $ghostscript

Tools::$ghostscript
private

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

Referenced by getGhostscript().

◆ $git

Tools::$git
private

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

Referenced by getGit(), and getGitGui().

◆ $ngrok

Tools::$ngrok
private

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

Referenced by getNgrok().

◆ $perl

Tools::$perl
private

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

Referenced by getPerl().

◆ $python

Tools::$python
private

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

Referenced by getPython().

◆ $ruby

Tools::$ruby
private

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

Referenced by getRuby().

◆ $xdc

Tools::$xdc
private

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

Referenced by getXdc().

◆ $yarn

Tools::$yarn
private

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

Referenced by getYarn().

◆ TYPE

const Tools::TYPE = 'tools'

The type of the tools.

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

Referenced by Module\reload().


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