Loading Please wait...
You will find two versions of Zigmoyd to Download one is a Clean version and anotehr one is Sandbox Version. The Clean Version doesn't have any Project already Created Its Pure and clean package with only Contains Zigmoyd Framework. and the sandbox edition contains one precreated Project called
main
as a default Project in
projects/home
directory So If you have downloaded clean version you have to create a new project with any name using Zigmoyd Commander. and if you are using sandbox version you have can work with the precreated Project named
main
. but remember that your project name is
main
.
Naming Convension used in this Docs. This Docs assumes that you are dealingw ith a project who's name is
home
which is kept in
project/home
directory.
Zigmoyd comes with some command line tools treated as zigmoyd Commands to control behaviour of zigmoyd. each commaand takes some options more or less like unix commands. to get a list of options you can execute command --help or command -h to get
Zigmoyd Commander open a terminal/console/Dos and cd to the directory where you have installed zigmoyd. there you should see another directory called setup. just cd to that setup directory. and type ./zigmoyd in *nix platform and zigmoyd on Window/Dos Platform. On windows you might need to setup path to php executable too.
You can have one or more project running on a single Zigmoyd Instance. having more projects doesn't have much relation with performance increase/decrease. In zigmoyd you will find a directory called
project/
all project files stays in this Directory. to see a list of already created project invoke project.list to that terminal window. to create a project use
project.create
command. to remove a project type
project.drop
Command.
All project(s) resides in project/
Directory. its not mandatory that the project name would be same as teh project name itself. you can name a project home and put it in project/building Directory. you can specify the directory name on zigmoyd commander. you must keep one project as teh default project. you can do all this things in Commander.
When you create a project using Commander first it generates files and directories required in the specified project directory. and then keeps the project name, directory name and wheather or not its the daefault project in a file in '''Zigmoyd's''' etc directory. if you open the etc/fstab.php
directory you will find the following. if there is no project
{projectName} {projectDir} {projectIndex}
and if there is a project called home in home directory and two other non default project called mkt and sales in mrketing and sales directory. You will see something like this.
{projectName} {projectDir} {projectIndex}
home home 1
mkt marketing 0
sales sales 0
When zigmoyd starts it parses this file. so if you delete or mess with this file zigmoyd migth work unexpectedly.
if zigmoyd is installed on http://localhost/zig
a controller of default project will be accessible through http://localhost/zig/controller
but to access non-default project you have to use http://localhost/zig/projectName.controller
e.g. http://localhost/zig/sales.buy/food
you will understand it more clearly when seeing Controllers.
assuming zigmoyd is installed on
http://localhost/zig
zigmoyd url(s) would be like
http://localhost/zig/student/report/52
when user will go to this url zigmoyd will first try to search a class
studentController
if found it will search for
report
method of that class. if found it will invoke that method with the supplied argument (
52
).e.g, similer to.
<?php
.....
$tmp = new studentController();
$tmp->report(52);
.....
?>
and return its output to user. in zigmoyd things are served by
Controller classes first you have to plan and create the controller(s). e.g. for this example you haev to create studentController and also create a public method called report for it which can take one argument.
if the user tries to go http://localhost/zig/student
''(no method specified)'' zigmoyd executes main method of student class.
if your project nae is home all Controller classes of home project will inherit from homeController Class. so if studentController is a controller class of hoem project you must write
studentController extends homeController{
}
Project level Controller(s) ultimately inherits from Zigmoyd's Controller
zigController
class.
all controller(s) resides in project's apps/controller
directory. e.g. if your project name is home
(which is stored in home
directory) and controller name is student
you will write the studentController class in a file names student.php in project/home/apps/controller/student.php
Read more on Controller.
Zigmoyd is highly configurable. Its configured through cofiguration files those are mostly
INI Files. which are easily Configurable and a lot human readable. Zigmoyd Configuration files are stored in etc Directory. There are two kind of configuration files. one found in zigmoyd's etc/ Directory and other found in project's Directories etc Directory. the first one configures zigmoyd globally and will effect on all projects found in taht Instance of zigmoyd. and the other one configures a perticullar project e.g. Project Specific settings which will effect that project only. some configuration directive(s) can only be effected globally whereas some of them can be effected only in project specific way.
Zigmoyd have some initialization Scripts however you can create your custom initialization scripts too. all initializer scripts stays in etc/init.d directory in zigmoyd installation Directory. you can create your own customInitializer.php file which will be executed at the very begening. and it will effect all project(s) found on the same Instance. after you create it you have to edit the
etc/inittab.php file (''which is just a simple human readable Text File'') and add that file's Name (''without .php extension'').
And Thats All. it will be executed at very begening. however when there are more than one initializer scripts list in
inittab.php it will be executed sequentially one after another. by default there will be some initializers which are required for zigmoyd to start. so its better if you add your initializer at the end of that list.
- See also:
- Main article on Zigmoyd modularity.
Zigmoyd is Highly Moduler.
Zigmoyd supports loadable
Modules and
Plugins and
Libs. Module and Plugins are global (e.g. applies to all Project) where as libs are Project Specific. some of the modules are Preloaded through above mentioned init.d other have to be loaded using
load_module()
or
$this->load->module()
or
$load-> module()
(when
$load
is available as a global variable).
modules are stored in usr/lib/module
Directory of your zigmoyd Installation Directory and plugins are stored in usr/lib/plugin
. as libs are Project Specific libs are stored in /usr/local/lib
directory. they can be load through $this->load->lib()
- See also:
- Main Article on Model View Controller
Zigmoyd is based on MVC architecture where the application logic (
Controller), visual Representation (
View) and Database Abstraction Layer (
Model,
Controller,
Connection File etc..) is completely separated / isolated where each of these components can be easily
shared between other components in an as simple as possible way utilizing PHP OOPS