Chapter 55. Zend_Tool_Framework

Table of Contents

55.1. Introduction
55.2. Using the CLI Tool
55.2.1. Setting up the CLI tool
55.2.2. Setting up the CLI tool on Unix-like Systems
55.2.3. Setting up the CLI tool on Windows
55.2.4. Other Setup Considerations
55.2.5. Where To Go Next?
55.3. Architecture
55.3.1. Registry
55.3.2. Providers
55.3.3. Loaders
55.3.4. Manifests
55.3.5. Clients
55.4. Creating Providers to use with Zend_Tool_Framework
55.4.1. How Zend Tool finds your Providers
55.4.2. Basic Instructions for Creating Providers
55.4.3. The response object
55.4.4. Advanced Development Information
55.4.4.1. Passing Variables to a Provider
55.4.4.2. Prompt the User for Input
55.4.4.3. Pretending to execute a Provider Action
55.4.4.4. Verbose and Debug modes
55.4.4.5. Accessing User Config and Storage
55.5. Shipped System Providers
55.5.1. The Version Provider
55.5.2. The Manifest Provider
55.6. Extending and Configuring Zend_Tool_Framework
55.6.1. Customizing Zend_Tool Console Client
55.6.1.1. The Home Directory
55.6.1.2. Local Storage
55.6.1.3. User Configuration
55.6.1.4. User Configuration File Content

55.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.