====== The Vortex Command Line Interface ======
==== Overview ====
The vCLI ((Vortex Command Line Interface)) is used to call vortex methods from a system shell. This can be used for running scheduled jobs inside the Vortex or manually executing Vortex jobs. The vCLI is executed from the Vortex main directory and the syntax is:
php index.php [databaseID] [username] [password] [operation] [options]
**databaseID** : the ID string of the Vortex Database Instance to use. Depending on the Database Instance, different methods might be available.\\
**username** : the username to log in with\\
**password** : the password to log in with\\
**operation** : the operation to perform in the Vortex. [[#operations|See operations]]\\
**options** : options to pass to the Vortex, on the form varname=value
== Example ==
To call a static method in the class Scriptmytable called test() in the Database Instance myDB as myUser/myPass:
php index.php myDB myUser myPass runscript class=Scriptmytable method=test
In order to pass some additional parameters to the method:
php index.php myDB myUser myPass runscript class=Scriptmytable method=test param1=test param2=my param3=method
The implementation of the class Scriptmytable might look like:
class Scriptmytable {
public static function test( $arguments ) {
printf( "Arguments passed: %s, %s, %s\n", $arguments['param1'], $arguments['param2'], $arguments['param3'] );
}
}
==== Operations ====
Theese are the operations currently available.
=== clean ===
Parameters:\\
**dbid** : Id of DBI to clean.\\
**username** : the username to log in with, must be the admin user\\
**password** : the password to log in with\\
Cleans all broken references, relations and uuid table records.\\
php index.php dbid username password clean
=== createdbi ===
Parameters:\\
**id** : The unique ID of the DBI to create\\
**name** : The name of the DBI to show in the first screen\\
**path** : Relative path to the DBI file structure\\
**database** : Name of database to connect to DBI\\
**dbuser** : User to use to connect to the database\\
**dbpass** : Password for the dbuser\\
**dbhost** : Host of the database server\\
**dbtype** : Type of database (optional)
Creates a new DBI with the default file structure and a base config file to be modified.
=== export ===
Parameters:\\
Not yet fully implemented.
=== import ===
Parameters:\\
Not yet fully implemented.
=== list ===
Implemented in version 1.2.1224\\
List all available DBI:s.
=== purge ===
Parameters:\\
**dbid** : ID of DBI to purge\\
**username** : the username to log in with, must be the admin user\\
**password** : the password to log in with\\
Purges all deleted records from the database (status=1) and removes referring relations and uuid table references.\\
Run as a regular operation,
php index.php dbid username password purge
=== runscript ===
Parameters:\\
**class** : the class where to call a method, default //commandLineScript//\\
**method** : the method in the class to call, default //UnknownScript//
Runs a custom method in a custom class. Additional //options// passed on the form varname=value will be passed to the method as an associative array containing the varname/value couples.
=== sendstats ===
Parameters:\\
**customerid** : The unique customer ID you've been assigned from Stilit AB
Sends usage statistics to Stilit AB for performance optimization
=== upgrade ===
Upgrades ALL dbi:s to latest Vortex version. Often needed after an upgrade of the Vortex engine.