/setup
directory in your Zigmoyd instance.
To use the terminal you need to open up a terminal/consol and cd to that setup directory. and type ./zigmoyd
in *nix system and just zigmoyd
on windows/DOS system. If PHP Path is correctly specifyied Zigmoyd Commander should open up.
zigmoyd
and zigmoyd.bat
the first one is for Linux and second one is for Windows. #!/usr/bin/php
-q <?php if(!defined('ZIGROOT'))define('ZIGROOT', dirname(dirname(__FILE__))); chdir('cli'); include_once('zigmoyd.php'); ?>
C:\http_start\xampp\php\php.exe zigmoyd
Here alse you need to change the blue path to the correct php.exe binary path
developer @ zigmoyd $
project.list --help
--name=ProjectName set the Project Name -h Show this help --help Show this help
project.list
it will list all projects in a tabular format.
developer @ zigmoyd$
project.create --help
--name=ProjectName set the Project Name --dir=/project/Directory/ Set The Project Directory -i set The Project as Primary Project -n set The Project as a General Project
project.create --name=foo --dir=bar -i
To create a project called foo in the bar Directory which will be a Primary Project.
developer @ zigmoyd$
project.drop --help
--name=ProjectName set the Project Name -h Show this help --help Show this help
project.drop --name=foo
To remove a Project Called foo
developer @ zigmoyd$
codegen.mvc --help
-m Generate the Model -v Generate the View -c Generate the Controller -h Show this Help -a Include all ORM on model -n Dont ask for ORM while generating model -l Different Layout for each method --name=M/V/C Name set the Model / View / Controller Name --method=method1,method2 Set the method list --project=ProjectName Set the ProjectName --orm=orm1,orm2 set the names of orm Maps --help Show this Help
codegen.mvc -mvca --project=home --name=student --method=info,register
. It will create a controller named student in home project which will have info and register methods. It will also create views for these two methods.It will also create a main method on the Controller and create views for it. It will also create layout and params file for studentController.due to -a option studentModel will attach all ORM Maps available.
You can execute codegen.mvc -mvc --project=home --name=student --orm=student,admin
. to generate a student Controller only with main method in it. Its Model will use two ORM Maps student and admin.
developer @ zigmoyd$
mvc.analyze --help
--prj=ProjectName set the Project Name -h Show this help --help Show this help
mvc.analyze --prj=home
to analyze all Controllers under home Project.
developer @ zigmoyd$
mvc.analyze --prj=home
admin Controller: adminController Shiblings(s): Orm Model(s): AdminOrm ApiTreeOrm ApiDataOrm ApiCommentOrm RefListOrm RefDataOrm RefCommentOrm View(s): main api Controller: apiController Shiblings(s): Orm Model(s): AdminReadOrm ApiTreeReadOrm ApiDataReadOrm ApiCommentReadOrm View(s): browse main ..........
developer @ zigmoyd$
mvc.drop --help
-m Remove the Model -v Remove the View -c Remove the Controller -s Remove the Controller Scaffold too -h Show this Help --name=M/V/C Name set the Model / View / Controller Name --project=ProjectName Set the ProjectName --help Show this Help
mvc.drop -mvcs --name=foo
to remove the controller foo and all Views of it and scaffolds too.
developer\ @ zigmoyd$
codegen.orm --help
--name=OrmMapFileName Set The file name for the orm map --prj=ProjectName Set The Project for which you wanna generate the ORM Map --conn=ConnectionName set the Connection name --host=Hostname Database host --usr=UserName Database User name --psw=Password Database Password --drv=Driver Database Driver --db=DB_Name Database Name --port=DB_port Database Connection Port --help This Help -a Automaticaly Generate the ORM Map -f Force Strict Automation would not ask you any thing -h This help
codegen.orm --name=studentOrm --prj=home --conn=schoolConn --db=school
It will ask you for other informations like host port etc..... (N.B. If server is running on default port just press enter). enter driver as a string mysql
all in Caps (development other drivers under construction).If you specify -a option It will automatically generate the ORM Map but it will ask you Alias Names for all tables and Columns.
If you don't like saying Alias names of all Tables and Columns You can specify -f '''with''' -a e.g. -af so that it will not even ask you about alias Names, rather it will use their Column Names as alias name.
developer @ zigmoyd$
codegen.sibling --help
--class Controller name --project=ProjectName Set the ProjectName --method=methodName Set the Method Name --help Show this Help -h Show this Help
codegen.sibling --class=foo --project=home --method=bar
to create a sibling method named bar on fooController Class on project home.
developer @ zigmoyd$
sibling.drop --help
--class Controller name --project=ProjectName Set the ProjectName --method=methodName Set the Method Name --help Show this Help -h Show this Help -a Remove all Methods
sibling.drop --class=foo --project=home --method=bar
to drop/remove a sibling of fooController class in home Project
developer @ zigmoyd$
codegen.unittest --help
--project=ProjectName Set the ProjectName --help Show this Help -h Show this Help
codegen.unittest --project=home
to make project home unit testing Compatable.
developer @ zigmoyd$
codegen.scaffold --help
--class Controller name --project=ProjectName Set the ProjectName --help Show this Help -h Show this Help
codegen.scaffold --class=foo --project=home
will create scaffolding for foo Controller in home project.exec ls
to list all files and directories in *nix sysstem and use exec dir
to do the same on windows
developer @ zigmoyd$
log --help
--host=hostName Set the Host name to Listen on (Optional) --port=portNumber Set the Port Number on Which to Listen (9999 By Default) --help Show this Help -h Show this Help
log
to listen on default port (9999) on server localhost.etc/mcpt.ini.php
file
developer @ zigmoyd$
mcrypt.config --help
--algo=Algorithm The mcrypt Algorithm to use --mode=Mode The mcrypt encryption mode to use --prj=Project Name Set The Project name --psw=Password encryption Password --rand=randomSource Source of randomness --timeout=s/m Timeout (s)econd or (m)icrosecond --help Show This Help -h Show This help