You are currently viewing Zend Server 5.x documentation. Click here to view the latest Zend Server online documentation.
You are here: Zend Server Best Practices > Development > Working with Zend Framework

Working with Zend Framework

Zend Framework users who deploy Zend Server for IBMi will benefit from a pre-configured stack that includes all the system components for developing Web applications with PHP.

 

The Zend Framework files are placed in:

Loading Zend Framework Classes

There are two ways to load Zend Framework's classes in your script:

1. Using the Zend Loader:

The Zend Loader utility class checks whether the class already exists within the script. If it does, it will create the relevant file from the class name using Zend Framework's naming convention (See http://framework.zend.com for more information on Zend Framework's naming conventions). If the class already exists, this will speed up performance.

Using the Zend Loader also has the added advantage of loading classes outside of Zend Framework.

 

 

Instructions on how to complete a procedure

To use the Zend Loader:

  1. Load the Zend Loader utility class once in your script:
    Require_once 'Zend/Loader.php';

  2. From now, load each class using the class name:
    Zend_Loader::loadClass('Zend_Class_Name');

  3. For example, in order to load the Zend Http Client:
    Zend_Loader::loadClass('Zend_Http_Client);

 

 2. Using require / include calls

Classes can also be called using the conventional require or include calls:

 

 

Instructions on how to complete a procedure

To use 'require class':

  1. Enter a 'require' command for the relevant file into your script:
    Require 'File.php';

  2. For example, to require the Zend Http Client Class:
    require 'Zend/Http/client.php';

 

In order to see a full list of Zend Framework's components, including more information on the functionality and use of the various components, see http://framework.zend.com

 

 

Related Links

Related Links:

Zend Framework

http://framework.zend.com - external link

http://framework.zend.com - external link 

 

 

 

© 1999-2013 Zend Technologies, Ltd. All rights reserved.