Vortex has the ability to run command line scripts in the same manner as other scripts are run. When running a command line script the database and user information is supplied together with the class and method to run. Parameters can be passed to the method.
When running the index.php for the Vortex without arguments the standard syntax message is displayed
Usage: index.php [dbid] [username] [password] [operation] [options]
To execute a command line script, supply the database ID, username and password to execute the script as and runscript as operation.
php index.php myDatabase myUser myPassword runscript
If no options are supplied to the runscript operation, the script will try to execute the method UnknownScript in the class commandLineScript. If this is not defined an error message will be displayed stating
Unknown method commandLineScript::UnknownScript
To chose which class and method to use, you can supply the options class= and method=
php index.php myDatabase myUser myPassword runscript class=myScriptClass method=myTestMethod
This will execute the static method myScriptClass::myTestMethod
To pass arguments to the method
php index.php myDatabase myUser myPassword runscript class=myScriptClass method=myTestMethod argument1=testing argument2=my argument3=arguments
Arguments can be freely named and will be referenced by the script code using the argument name.