These examples are provided to help you learn how to structure and build applications with the Joomla Platform from the cli side.
install like any joomla extension (todo pkg, manifest)
All the examples in the cli
folder are run from the command line or terminal.
All you need is PHP configured to run from the command line.
The examples found in the cli
folder are all based on the new JApplicationCli
class.
The is a base level class purpose built for running applications from the command line.
This is a simple example application that download and unzip a Joomla Package .
Usage:
php downloadcli.php
-
Option:
-z [filezip]
Example usage:
php downloadcli.php -z joomla.zip
Unzip the joomla package from joomla.zip
-
Option:
-u [url]
Example usage:
php downloadcli.php -u http://joomlacode.org/gf/download/frsrelease/19239/158104/Joomla_3.2.3-Stable-Full_Package.zip
Download and unzip from http://joomlacode.org/gf/download/frsrelease/19239/158104/Joomla_3.2.3-Stable-Full_Package.zip
-
Option:
-f [file]
Example usage:
php downloadcli.php -f joomlacode.txt
Download and unzip from url listed on file joomlacode.txt
This application install a Joomla Package.
php icli.php --db-user=root --db-name=t323 --db-pass=1234 --admin-user=admin --admin-pass=admin --admin-email='admin@example.com'
This application install joomla extensions.
php installcli.php [options]
-
Option:
-f [extensionfile]
Example usage:
php installcli.php -f plg_example.zip
Install the example plugin from /tmp/plg_example.zip
-
Option:
-u [extensionurl]
Example usage:
php installcli.php -u jfiles.csv
Install the extensions listed on jfiles.csv from web
-
Option:
-m
Example usage:
php installcli.php -m
Install the extensions listed on /cli/files.txt
-
Option:
-w [extensionurl]
Example usage:
php installcli.php -w http://www.joomladdons.eu/update/mod_related_author_update.xml
Install the extension module from www.joomladdons.eu/update/mod_related_author_update.xml
Based on the com_overlaod create dummy articles and category
Usage:
php overloadcli.php [options]
**Example usage: **
php overloadcli.php -a 10 -c 10 -d 1
Create 10 articles from 10 categories with depth=1 ie create 100 dummy articles