30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Zend Server <strong>Reference</strong> Manual<br />

Working with Zend Framework<br />

Zend Framework users who deploy Zend Server will benefit from a pre-configured stack that includes all<br />

the system components for developing Web applications with PHP.<br />

The Zend Framework files are placed in:<br />

412<br />

Windows: \share\ZendFramework<br />

RPM, DEB, : /share/ZendFramework<br />

Loading Zend Framework Classes<br />

There are two ways to load Zend Framework's classes in your script:<br />

1. Using the Zend Loader:<br />

The Zend Loader utility class checks whether the class already exists within the script. If it does, it will<br />

create the relevant file from the class name using Zend Framework's naming convention (See<br />

http://framework.zend.com/manual/en/coding-standard.naming-conventions.html for more information on<br />

Zend Framework's naming conventions). If the class already exists, this will speed up performance.<br />

Using the Zend Loader also has the added advantage of loading classes outside of Zend Framework.<br />

To use the Zend Loader:<br />

1. Load the Zend Loader utility class once in your script:<br />

Require_once 'Zend/Loader.php';<br />

2. From now, load each class using the class name:<br />

Zend_Loader::loadClass('Zend_Class_Name');<br />

3. For example, in order to load the Zend Http Client:<br />

Zend_Loader::loadClass('Zend_Http_Client);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!