Monday, June 7, 2010

CREATING YOUR FIRST PROJECT USING ZEND

With Zend_Tool installed, you can create your first Zend
Framework-powered project in mere seconds. To create a
project, open a command prompt and navigate to the location
where you’d like the project directory to reside. Then execute
the following command, replacing PROJECT_NAME with the
name of your particular project:

%>zf create project PROJECT_NAME

Creating a Controller

Zend_Tool also supports the ability to create controllers from
the command-line using the following syntax:

%>zf create controller NAMI

Creating Actions

Controllers are simply PHP classes which typically consist of
a series of public methods, known as actions. Each action
is responsible for processing the logic associated with a
corresponding page. For instance, an action named contact
found in the About controller would by default be associated
with the url:

Zend_Tool supports the ability to create an action using the
following syntax:

%>zf create action NAME CONTROLLER-NAME

Be sure to replace NAME with the name of your action, and
CONTROLLER-NAME with the name of the controller where you’d
like this action to be placed.

No comments:

Post a Comment