Zend Studio is a new generation of intelligent professional PHP IDE (application development environment). It is designed to help developers improve efficiency, create high-quality PHP applications! It contains the components necessary to develop PHP, through a set of editing, debugging, analysis, optimization and database tools, Zend Studio to accelerate development cycles, and simplifies complex applications.
This tutorial explains how to use Zend Studio Zend Framework 2 (ZF2) for development. Zend Studio integrated built-in tools that allow developers to more efficient use of ZF2: You can pass a few steps and shortest development time, create a new project based on Zend Framework. You can create ZF2 modules, views and assistant controller, content services to help get and use other functions ZF2 to improve coding efficiency. Now take a look at the outline of the course of it, the overall look -
Course content
In this tutorial, we will create a sample Web site with a download page. The application will ZF2 two modules, services, and views and uses examples helper. Specifically, you will learn:
Create a new project in Zend Studio in ZF2
Deploy the project on the local Zend Server
And ZF2 adding configure a new module, and a controller which is arranged
Add a new ZF2 view helper
To use the MVC Outline view
The project
In this tutorial, we will provide you with the following:
Late tutorial completed ZF2 project. Check please click here
Throughout the tutorial, you will get the code fragments used in the project file. Check please click here
prerequisites
Zend Studio 11.0 or later.
Zend Server 7.x or higher.
Related media
To better understand the process described in this tutorial, please watch this video:
Read the foregoing, I am sure this tutorial have a rough idea, and now look at specific steps tutorial is how to operate it - following content describes the specific steps of a ~
Step one: Create and deploy new project ZF2
我们的第一步是在工作区中使用包含ZF2框架应用程序的ZF2内容创建一个新的本地PHP项目。然后,我们将在本地安装的Zend Server上部署该应用程序。
创建项目
首先,我们将在工作区中创建新的ZF2项目。
要在Zend Studio中创建一个新的本地PHP项目 :
1、在Zend Studio中,转到File | 新的| 本地 PHP项目。
将显示“新建本地PHP项目”向导。
2、为新项目命名。
3、选择项目的文件位置。
4、从PHP Server下拉菜单中选择本地Zend Server。要定义新的本地Zend Server,请单击“添加服务器”。有关添加本地Zend Server的更多信息,请参阅添加本地Zend Server。
5、选择使用ZF2库创建新项目:
在“内容”字段中,选择“Zend Framework”。
在Version字段中,单击下拉菜单并选择Zend Framework 2.3.1(内置)。
6、单击完成。
创建新的ZF2项目,并在Zend Framework图标表示的PHP Explorer中显示
生成的项目包括具有预配置依赖项的Zend Framework 2应用程序框架,因此在浏览器中实际运行项目之前无需采取任何其他操作(例如,运行Composer)。
部署项目
其次,我们将在本地Zend Server上部署应用程序。
要部署应用程序:
1、在PHP资源管理器中,打开“deployment.xml”文件(在创建项目后自动打开并显示)。
2、在“测试”区域中,单击“启动PHP应用程序”。
The "Enable PHP Application" dialog box, and select the local Zend Server has been defined in the "deployed to" field.
3, click Finish.
ZF2 Framework application deployment and launch in Zend Studio's internal browser.
After the first deployment, Zend Studio default configuration for any changes made to the project will be uploaded to the cloud. Therefore, after you save your changes, you only need to refresh your browser to see all the changes.
Contents of this tutorial is not over yet, so stay tuned follow-content ~