Chapter 70. Zend_Tool_Framework

Table of Contents

70.1. Introduction
70.2. Using the CLI Tool
70.2.1. Setting up the CLI tool
70.2.2. Setting up the CLI tool on Unix-like Systems
70.2.3. Setting up the CLI tool on Windows
70.2.4. Other Setup Considerations
70.2.5. Where To Go Next?
70.3. Architecture
70.3.1. Registry
70.3.2. Providers
70.3.3. Loaders
70.3.4. Manifests
70.3.5. Clients
70.4. Creating Providers to use with Zend_Tool_Framework
70.4.1. How Zend_Tool finds your Providers
70.4.2. Basic Instructions for Creating Providers
70.4.3. The response object
70.4.4. Advanced Development Information
70.4.4.1. Passing Variables to a Provider
70.4.4.2. Prompt the User for Input
70.4.4.3. Pretending to execute a Provider Action
70.4.4.4. Verbose and Debug modes
70.4.4.5. Accessing User Config and Storage
70.5. Shipped System Providers
70.5.1. The Version Provider
70.5.2. The Manifest Provider
70.6. Extending and Configuring Zend_Tool_Framework
70.6.1. Customizing Zend_Tool Console Client
70.6.1.1. The Home Directory
70.6.1.2. Local Storage
70.6.1.3. User Configuration
70.6.1.4. User Configuration File Content

70.1. Introduction

Zend_Tool_Framework is a framework for exposing common functionalities such as the creation of project scaffolds, code generation, search index generation, and much more. Functionality may be written and exposed via PHP classes dropped into the PHP include_path, providing incredible flexibility of implementation. The functionality may then be consumed by writing implementation and/or protocol-specific clients -- such as console clients, XML-RPC, SOAP, and much more.

Zend_Tool_Framework provides the following:

  • Common interfaces and abstracts that allow developers to create functionality and capabilities that are dispatchable by tooling clients.

  • Base client functionality and a concrete console implementation that connect external tools and interfaces to the Zend_Tool_Framework. The Console client may be used in CLI environments such as unix shells and the Windows console.

  • "Provider" and "Manifest" interfaces that can be utilized by the tooling system. "Providers" represent the functional aspect of the framework, and define the actions that tooling clients may call. "Manifests" act as metadata registries that provide additional context for the various defined providers.

  • An introspective loading system that will scan the environment for providers and determine what is required to dispatch them.

  • A standard set of system providers that allow the system to report what the full capabilities of the system are as well as provide useful feedback. This also includes a comprehensive "Help System".

Definitions that you should be aware of through this manual with respect to Zend_Tool_Framework include:

  • Zend_Tool_Framework - The framework which exposes tooling capabilities.

  • Tooling Client - A developer tool that connects to and consumes Zend_Tool_Framework.

  • Client - The subsystem of Zend_Tool_Framework that exposes an interface such that tooling clients can connect, query and execute commands.

  • Console Client / Command Line Interface / zf.php - The tooling client for the command line.

  • Provider - A subsystem and a collection of built-in functionality that the framework exports.

  • Manifest - A subsystem for defining, organizing, and disseminating provider requirement data.

  • Zend_Tool_Project Provider - A set of providers specifically for creating and maintaining Zend Framework-based projects.