MIOLOConsole class. Extend this class to have MIOLO on your console scripts.
- Autor
- Daniel Hartmann [danie.nosp@m.l@so.nosp@m.lis.c.nosp@m.oop..nosp@m.br]
-
Luiz Gilberto Gregory Filho
Maintainers:
Armando Taffarel Neto [taffa.nosp@m.rel@.nosp@m.solis.nosp@m..coo.nosp@m.p.br] Daniel Hartmann [danie.nosp@m.l@so.nosp@m.lis.c.nosp@m.oop..nosp@m.br]
- Desde
- Creation date 2011/10/27
Organization:
SOLIS - Cooperativa de Soluções Livres
Copyright:
Copyright (c) 2011 SOLIS - Cooperativa de Soluções Livres
License:
Licensed under GPLv2 (for further details read the COPYING file or http://www.gnu.org/licenses/gpl.html)
MIOLOConsole class
◆ __construct()
MIOLOConsole constructor. Initialize MIOLO.
@global string $module Simulate current module.
◆ error()
Shows an error message and quit.
- Parâmetros
-
string | $message | Error message. |
Reimplementado em MIOLOUpdater.
◆ execute()
execute |
( |
| $cmd, |
|
|
| $errorMessage = '', |
|
|
| $endOnError = true ) |
|
protected |
Execute the given command.
- Parâmetros
-
string | $cmd | Command to be executed. |
string | $errorMessage | Message to be shown in case of error. |
boolean | $endOnError | Quit execution on error. |
- Retorna
- array Array with three messages: result (string), output (array), return (string).
◆ fatalErrorShutdown()
Method that is executed when a fatal error occurs.
◆ getMIOLOInstance()
getMIOLOInstance |
( |
| $pathMiolo, |
|
|
| $module ) |
Create a MIOLO instance
- Parâmetros
-
string | $pathMiolo | MIOLO direcotry path |
string | $module | Module |
- Retorna
- object MIOLO instance
◆ loadMIOLO()
◆ message()
Display a message to the user.
- Parâmetros
-
string | $message | Message to be printed. |
Reimplementado em MIOLOUpdater.
◆ prompt()
prompt |
( |
| $message, |
|
|
| $noMessage ) |
|
protected |
Show the user a message and wait for his response to proceed or not.
- Parâmetros
-
string | $message | Main message. |
string | $noMessage | Message to show on quiting. |
◆ sigintShutdown()
sigintShutdown |
( |
| $signal | ) |
|
Method, that is executed, if script has been killed by. SIGINT: Ctrl+C SIGTERM: kill
- Parâmetros
-
integer | $signal | Signal sent by the user. |
◆ $MIOLO
A documentação para esta classe foi gerada a partir dos seguintes ficheiros:
- classes/mioloconsole.class.php
- classes/tests/munittest.class.php