Liste de tous les membres
Attributs protégés statiques |
static | $instance |
Documentation des constructeurs et destructeur
Class constructor.
- Paramètres:
-
mixed | $input | An optional argument to provide dependency injection for the application's input object. If the argument is a JInputCli object that object will become the application's input object, otherwise a default input object is created. |
mixed | $config | An optional argument to provide dependency injection for the application's config object. If the argument is a JRegistry object that object will become the application's config object, otherwise a default config object is created. |
mixed | $dispatcher | An optional argument to provide dependency injection for the application's event dispatcher. If the argument is a JDispatcher object that object will become the application's event dispatcher, if it is null then the default event dispatcher will be created based on the application's loadDispatcher() method. |
- Voir également:
- loadDispatcher()
- Depuis:
- 11.1
Réimplémentée dans JApplicationDaemon.
Références $config, et $dispatcher.
Documentation des fonctions membres
JApplicationCli::close |
( |
|
$code = 0 | ) |
|
Exit the application.
- Paramètres:
-
integer | $code | The exit code (optional; default is 0). |
- Renvoie:
- void
- Depuis:
- 11.1
Référencé par FinderCli\_index().
JApplicationCli::doExecute |
( |
| ) |
|
|
protected |
Method to run the application routines. Most likely you will want to instantiate a controller and execute it, or perform some sort of task directly.
- Renvoie:
- void
- Depuis:
- 11.3
Réimplémentée dans FinderCli, Updatecron, et GarbageCron.
JApplicationCli::execute |
( |
| ) |
|
Execute the application.
- Renvoie:
- void
- Depuis:
- 11.1
JApplicationCli::fetchConfigurationData |
( |
|
$file = '' , |
|
|
|
$class = 'JConfig' |
|
) |
| |
|
protected |
Method to load a PHP configuration class file based on convention and return the instantiated data object. You will extend this method in child classes to provide configuration data from whatever data source is relevant for your specific application.
- Paramètres:
-
string | $file | The path and filename of the configuration file. If not provided, configuration.php in JPATH_BASE will be used. |
string | $class | The class name to instantiate. |
- Renvoie:
- mixed Either an array or object to be loaded into the configuration object.
- Depuis:
- 11.1
Références $class, $config, $file, JPATH_BASE, et JLoader\register().
JApplicationCli::get |
( |
|
$key, |
|
|
|
$default = null |
|
) |
| |
Returns a property of the object or the default value if the property is not set.
- Paramètres:
-
string | $key | The name of the property. |
mixed | $default | The default value (optional) if none is set. |
- Renvoie:
- mixed The value of the configuration.
- Depuis:
- 11.3
Références $key.
static JApplicationCli::getInstance |
( |
|
$name = null | ) |
|
|
static |
Get a value from standard input.
- Renvoie:
- string The input string from standard input.
- Depuis:
- 11.1
JApplicationCli::loadConfiguration |
( |
|
$data | ) |
|
Load an object or array into the application configuration object.
- Paramètres:
-
mixed | $data | Either an array or object to be loaded into the configuration object. |
- Renvoie:
- JApplicationCli Instance of $this to allow chaining.
- Depuis:
- 11.1
Réimplémentée dans JApplicationDaemon.
Références $data, et elseif.
JApplicationCli::loadDispatcher |
( |
| ) |
|
|
protected |
Method to create an event dispatcher for the application. The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create event dispatchers based on more specific needs.
- Renvoie:
- void
- Depuis:
- 11.3
Références JDispatcher\getInstance().
JApplicationCli::out |
( |
|
$text = '' , |
|
|
|
$nl = true |
|
) |
| |
JApplicationCli::registerEvent |
( |
|
$event, |
|
|
|
$handler |
|
) |
| |
Registers a handler to a particular event group.
- Paramètres:
-
string | $event | The event name. |
callback | $handler | The handler, a function or an instance of a event object. |
- Renvoie:
- JApplicationCli Instance of $this to allow chaining.
- Depuis:
- 11.1
JApplicationCli::set |
( |
|
$key, |
|
|
|
$value = null |
|
) |
| |
Modifies a property of the object, creating it if it does not already exist.
- Paramètres:
-
string | $key | The name of the property. |
mixed | $value | The value of the property to set (optional). |
- Renvoie:
- mixed Previous value of the property
- Depuis:
- 11.3
Références $key.
JApplicationCli::triggerEvent |
( |
|
$event, |
|
|
array |
$args = null |
|
) |
| |
Calls all handlers associated with an event group.
- Paramètres:
-
string | $event | The event name. |
array | $args | An array of arguments (optional). |
- Renvoie:
- array An array of results from each function call, or null if no dispatcher is defined.
- Depuis:
- 11.1
Références null.
Documentation des données membres
JApplicationCli::$dispatcher |
|
protected |
JApplicationCli::$instance |
|
staticprotected |
La documentation de cette classe a été générée à partir du fichier suivant :