SlideShare a Scribd company logo
Extending Zend_Tool

By Ralph Schindler - Software Engineer
Who Am I?
• Ralph Schindler
• Software Engineer on the Zend Framework Team at Zend
• Email: ralph.schindler@zend.com
• Website: http://ralphschindler.com/
• Project: http://framework.zend.com/
• @ralphschindler (http://twitter.com/ralphschindler)


• Slides at: (provide link)
• Code download link: (provide link)




                                                         2
What’s Zend_Tool All About, Again?
A quick review of where Zend_Tool came from, and where its
going.




                                                             3
What’s Zend_Tool All About, Again?
• Rapid application development of ZF projects
• Tooling framework
 Framework for building repeatable tooling tasks
 Lots of Built in Features
 Easily extensible (what this talk is about!)

• B/c build systems only get us so far
• Tools need to fit in human workflows:
 Tool creates project
 Human edits project
 Tool edits project
 Human edits project
 ... so on and so on ...

                                                    4
What’s Zend_Tool All About, Again?
• Zend_Tool in ZF 1.8
• Zend_Application in 1.8
• Built in project providers:
 create projects
 create controllers
 create actions
 create views
 create modules

• Zend_Reflection & Zend_CodeGenerator in 1.8




                                                5
What’s Zend_Tool All About, Again?
• New features in 1.10
 New base loader (no more include_path scanning)
 Providers
   • DbAdapter configuration
   • DbTable creation based on database tables
   • Layout enabling and creation
 (Web client interface)




                                                    6
System Overview
Let’s have a stroll through the Zend_Tool architecture




                                                         7
System Overview
• Two main “components”
 Zend_Tool_Framework
   • The component responsible for dispatching tooling requests
 Zend_Tool_Project
   • The component responsible for exposing the “project specific” tooling
     capabilities
• Auxiliary Components
 Zend_Reflection
 Zend_CodeGenerator




                                                                             8
System Overview
• Zend_Tool_Framework
 Dispatch style framework, designed to abstract enough system
  internals to make extensibility easy
   • “Flexibility of the tooling dispatch over speed of tooling dispatch”
 Broken down into logical sub-parts:
   • Client
   • Client storage & configuration
   • Loader
   • Provider & Provider Repository
   • Manifest, Manifest Repository & Metadata
   • System (Built-in) Providers




                                                                            9
System Overview / Zend_Tool_Framework
• Zend_Tool_Framework_Client
 Responsibilities:
   • Request object
   • Response object
   • Interactivity support
   • Setting up the system registry containing all required objects
   • The actual dispatch()-ing
 First implementation Zend_Tool_Framework_Client_Console




                                                                      10
System Overview / Zend_Tool_Framework
• Zend_Tool_Framework_Client_Storage &
  Zend_Tool_Framework_Client_Config
 Responsibilities:
   • Allowing clients to specify configuration values for the system and
     providers to use
   • Allowing clients to store artifacts on the filesystem that the system and
     providers can consume
     – Custom profile files
     – Provider specific file formats and metadata




                                                                                 11
System Overview / Zend_Tool_Framework
• Zend_Tool_Framework_Loader
 Responsibilities:
   • Load files provided
   • Search for classes defined that implement:
     – Zend_Tool_Framework_Manifest_Interface
     – Zend_Tool_Framework_Provider_Interface
 Original loader Zend_Tool_Framework_Loader_IncludePathLoader
 New loader Zend_Tool_Framework_Loader_BasicLoader
   • Loads explicitly what it was asked to load




                                                                 12
System Overview / Zend_Tool_Framework
• Zend_Tool_Framework_Provider & Provider Registry
 Responsibilities:
   • An interface for defining via a class, dispatch-able actions and
     “specialties”
     – (Similar to how Action Controllers define actions)
   • Registry to maintain instances of all providers available
   • Parsing of provider classes for dispatch-able “signatures”




                                                                        13
System Overview / Zend_Tool_Framework
• Zend_Tool_Framework_Manifest & Manifest Repository
 Responsibilities:
   • Manifest can supply a collection of providers, actions and/or metadata
   • Registry provides a way to search for metadata in the manifest
• Zend_Tool_Framework_Metadata
 Responsibilities:
   • Primary use case is to attach “data about data” to instance of a specific
     client, a specific provider, or action
     – ex: alternate names for each provider based on the command line naming
       scheme, OR short names (p for profile)




                                                                                 14
System Overview
• Zend_Tool_Project
 Problem: How to successfully model all the notions of a “project”?
 What is a “project”?
   • It is a tree of resources (some filesystem / some not)
   • For each resource we need to capturing it’s “nature” or “context”
 2 main elements
   • Zend_Tool_Project_Profile which is a tree of
     Zend_Tool_Project_Profile_Resources
   • Zend_Tool_Project_Context




                                                                         15
System Overview / Zend_Tool_Project
• Zend_Tool_Project_Profile
 Responsibilities:
   • loading, parsing, serializing and storing a profile file
   • Top most node in a “resource tree”
• Zend_Tool_Project_Profile_Resource
 Responsibilities:
   • The class most responsible for the “where” question of project modeling
   • The class most responsible for implementing a node in a “resource tree”
   • Extends Resource_Container which is a RecursiveIterator (tree
     fundamentals)
   • Can create new Resources at specific locations
   • Can find resources by name and attribute sets
   • Each contains a Zend_Tool_Project_Context object

                                                                               16
System Overview / Zend_Tool_Project
• Zend_Tool_Project_Context
 Responsibilities
   • The class most responsible for the “what” part of project modeling
   • Is assigned to a Zend_Tool_Project_Profile_Resource object
     – (This is known as “composition”)
   • Example contexts:
     – Controller file
     – View script directory
     – View script file
     – Model file
     – Action method
     – ...




                                                                          17
Building & extending for Zend_Tool
With so many extension points, where does one start?




                                                       18
Building & Extending For Zend_Tool
• Path of least resistance when learning to extend:
 Implement a provider, and be able to call it
 Implement a manifest for the provider, and be able to call it
 Implement some metadata about provider, and be able to find it
 Add complex functionality to provider:
   • Selective interactivity (prompting the user)
   • Configuration
   • Use files from user storage area
 Implement a new client interface




                                                                   19
Building & Extending For Zend_Tool
• Ensuring our environment is setup




                                      20
Building & Extending For Zend_Tool
• Basic provider




                                     21
Building & Extending For Zend_Tool
• Enter new provider in config file




                                      22
Building & Extending For Zend_Tool
• Checking the provider is available in console help (zf --help)




                                                                   23
Building & Extending For Zend_Tool
• Create a manifest for our provider
• Notice we moved the provider inside the Tool namespace




                                                           24
Building & Extending For Zend_Tool
• Run the provider




                                     25
Building & Extending For Zend_Tool
• Implement metadata attached to provider
• (dynamic metadata)




                                            26
Building & Extending For Zend_Tool
• Search for metadata




                                     27
Building & Extending For Zend_Tool
• Add interactivity to provider
• (screenshot)




                                     28
Building & Extending For Zend_Tool
• Use the config file to retrieve a value
• (screenshot)




                                            29
Building & Extending For Zend_Tool
• Use the storage area to return a file
• (screenshot)




                                          30
Building & Extending For Zend_Tool
• Zend_Tool_Project extensions typical tasks
 Load existing profile
 Search for resources
 Create resources & contexts
   • Persist attributes
 Execute method on resource/contexts, such as create
 Store profile after changes




                                                        31
Building & Extending For Zend_Tool
• Code to examine to learn more
 Zend_Tool_Framework
   • Zend_Tool_Framework_Client & Zend_Tool_Framework_Registry
 Zend_Tool_Project
   • Zend_Tool_Project_Provider_* (specifically DbAdapter, DbTable)
   • Zend_Tool_Project_Context_* (specifically ControllerFile, ViewScriptFile,
     DbTableFile)
 Zend_Tool_CodeGenerator_Php
   • This is needed to generate, and regenerate code in most cases




                                                                                 32
Building & Extending For Zend_Tool
• Links to example files:
 (link here)

• Link to manual & good articles:
 http://framework.zend.com/manual/en/zend.tool.framework.html
 (more)




                                                                 33
Thank You!
Questions? Comments?




                       34

More Related Content

PDF
Zend Core on IBM i - Security Considerations
PPTX
PHP on IBM i Tutorial
PPT
PHP on Windows - What's New
PDF
Performance tuning with zend framework
PDF
DB2 and PHP in Depth on IBM i
PDF
Strategic Modernization with PHP on IBM i
PPTX
Getting started with PHP on IBM i
PDF
PHP Toolkit from Zend and IBM: Open Source on IBM i
Zend Core on IBM i - Security Considerations
PHP on IBM i Tutorial
PHP on Windows - What's New
Performance tuning with zend framework
DB2 and PHP in Depth on IBM i
Strategic Modernization with PHP on IBM i
Getting started with PHP on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM i

What's hot (20)

PDF
Create a welcoming development environment on IBM i
PDF
From Zero to ZF: Your first zend framework project on ibm i
PDF
PHP Batch Jobs on IBM i
PDF
Zend_Cache: how to improve the performance of PHP applications
PPTX
Get Started with Zend Framework 2
PPTX
PHP Installed on IBM i - the Nickel Tour
PPTX
Fundamentals of performance tuning PHP on IBM i
PPTX
Zend Products and PHP for IBMi
PDF
Running open source PHP applications on you IBM i
PPTX
Install MariaDB on IBM i - Tips, troubleshooting, and more
PDF
IBM i: Fertile Ground for PHP Developers
PDF
Zend Framework 2, What's new, Confoo 2011
PDF
Code for Startup MVP (Ruby on Rails) Session 1
PPT
Edp bootstrapping a-software_company
PPTX
Rest overview briefing
PPTX
What is new in Notes & Domino Deleopment V10.x
PDF
Require js training
PDF
Wt unit 1 ppts web development process
PDF
Web Clients for Ruby and What they should be in the future
PDF
Create a welcoming development environment on IBM i
From Zero to ZF: Your first zend framework project on ibm i
PHP Batch Jobs on IBM i
Zend_Cache: how to improve the performance of PHP applications
Get Started with Zend Framework 2
PHP Installed on IBM i - the Nickel Tour
Fundamentals of performance tuning PHP on IBM i
Zend Products and PHP for IBMi
Running open source PHP applications on you IBM i
Install MariaDB on IBM i - Tips, troubleshooting, and more
IBM i: Fertile Ground for PHP Developers
Zend Framework 2, What's new, Confoo 2011
Code for Startup MVP (Ruby on Rails) Session 1
Edp bootstrapping a-software_company
Rest overview briefing
What is new in Notes & Domino Deleopment V10.x
Require js training
Wt unit 1 ppts web development process
Web Clients for Ruby and What they should be in the future
Ad

Viewers also liked (20)

PDF
Oracle Compute Cloud Service介绍
PDF
Oracle cloud 使用云市场快速搭建小型电商网站
PPTX
Application Diagnosis with Zend Server Tracing
PDF
MySQL Manchester TT - Security
PDF
MySQL in your laptop
KEY
Framework Shootout
PPT
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
PDF
MySQL Manchester TT - Replication Features
PDF
A Storage Story #ChefConf2013
PDF
Script it
PDF
Tiery Eyed
PDF
Why MySQL High Availability Matters
PDF
Oracle cloud ravello介绍及测试账户申请
PPTX
PHP and Platform Independance in the Cloud
PDF
MySQL Manchester TT - 5.7 Whats new
PDF
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
PPTX
MySQL Optimizer Overview
PDF
Oracle Compute Cloud Service快速实践
PDF
Digital Identity
PPT
Planning for Synchronization with Browser-Local Databases
Oracle Compute Cloud Service介绍
Oracle cloud 使用云市场快速搭建小型电商网站
Application Diagnosis with Zend Server Tracing
MySQL Manchester TT - Security
MySQL in your laptop
Framework Shootout
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Manchester TT - Replication Features
A Storage Story #ChefConf2013
Script it
Tiery Eyed
Why MySQL High Availability Matters
Oracle cloud ravello介绍及测试账户申请
PHP and Platform Independance in the Cloud
MySQL Manchester TT - 5.7 Whats new
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
MySQL Optimizer Overview
Oracle Compute Cloud Service快速实践
Digital Identity
Planning for Synchronization with Browser-Local Databases
Ad

Similar to Zend_Tool: Practical use and Extending (20)

KEY
Extending Zend_Tool
PDF
Writing Services with ZF2
KEY
Extending ZF & Extending With ZF
PDF
ZF2: Writing Service Components
PPTX
Innovations in Sencha Tooling and Framework
PPT
Using Zend_Tool to Establish Your Project's Skeleton
KEY
Zend Code in ZF 2.0
PDF
MVC with Zend Framework
PDF
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
PDF
Organinzing Your PHP Projects (2010 Memphis PHP)
PPT
Unit Test for ZF SlideShare Component
PPT
Unit Test for ZF SlideShare Component
PPT
Unit Test for ZF SlideShare Component
PPT
Unit Test for ZF SlideShare Component
PPTX
Modular PHP Development using CodeIgniter Bonfire
PPTX
Zend MVC pattern based Framework – Best for Enterprise web applications
PPTX
Android layouts course-in-mumbai
PDF
Demystify LDAP and OIDC Providing Security to Your App on Kubernetes
PDF
Aai 3228-dev ops-tools-websphere-sl
PDF
Organizing Your PHP Projects (2010 ConFoo)
Extending Zend_Tool
Writing Services with ZF2
Extending ZF & Extending With ZF
ZF2: Writing Service Components
Innovations in Sencha Tooling and Framework
Using Zend_Tool to Establish Your Project's Skeleton
Zend Code in ZF 2.0
MVC with Zend Framework
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Organinzing Your PHP Projects (2010 Memphis PHP)
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Modular PHP Development using CodeIgniter Bonfire
Zend MVC pattern based Framework – Best for Enterprise web applications
Android layouts course-in-mumbai
Demystify LDAP and OIDC Providing Security to Your App on Kubernetes
Aai 3228-dev ops-tools-websphere-sl
Organizing Your PHP Projects (2010 ConFoo)

More from ZendCon (20)

PPT
I18n with PHP 5.3
PDF
Cloud Computing: The Hard Problems Never Go Away
PPT
Magento - a Zend Framework Application
PDF
Enterprise-Class PHP Security
PDF
PHP and IBM i - Database Alternatives
PDF
Insights from the Experts: How PHP Leaders Are Transforming High-Impact PHP A...
PDF
Joe Staner Zend Con 2008
PDF
Make your PHP Application Software-as-a-Service (SaaS) Ready with the Paralle...
PDF
DB2 Storage Engine for MySQL and Open Source Applications Session
PDF
Modernizing i5 Applications
PDF
Lesser Known Security Problems in PHP Applications
PDF
Architecting for PHP5 - Why "Runs on PHP5" is not "Written for PHP5"
PDF
SQL Query Tuning: The Legend of Drunken Query Master
PDF
ZendCon 2008 Closing Keynote
PDF
Top Zend Studio Secrets
PDF
VIM for (PHP) Programmers
PDF
Test Driven Development
PDF
Rickroll To Go With PHP, WURFL, and Other Open Source Tools
PDF
PECL Picks - Extensions to make your life better
PDF
Static and Dynamic Analysis at Ning
I18n with PHP 5.3
Cloud Computing: The Hard Problems Never Go Away
Magento - a Zend Framework Application
Enterprise-Class PHP Security
PHP and IBM i - Database Alternatives
Insights from the Experts: How PHP Leaders Are Transforming High-Impact PHP A...
Joe Staner Zend Con 2008
Make your PHP Application Software-as-a-Service (SaaS) Ready with the Paralle...
DB2 Storage Engine for MySQL and Open Source Applications Session
Modernizing i5 Applications
Lesser Known Security Problems in PHP Applications
Architecting for PHP5 - Why "Runs on PHP5" is not "Written for PHP5"
SQL Query Tuning: The Legend of Drunken Query Master
ZendCon 2008 Closing Keynote
Top Zend Studio Secrets
VIM for (PHP) Programmers
Test Driven Development
Rickroll To Go With PHP, WURFL, and Other Open Source Tools
PECL Picks - Extensions to make your life better
Static and Dynamic Analysis at Ning

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
A Presentation on Artificial Intelligence
PDF
Electronic commerce courselecture one. Pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
1. Introduction to Computer Programming.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
A Presentation on Artificial Intelligence
Electronic commerce courselecture one. Pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
1. Introduction to Computer Programming.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Spectroscopy.pptx food analysis technology
MIND Revenue Release Quarter 2 2025 Press Release
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative analysis of optical character recognition models for extracting...
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Zend_Tool: Practical use and Extending

  • 1. Extending Zend_Tool By Ralph Schindler - Software Engineer
  • 2. Who Am I? • Ralph Schindler • Software Engineer on the Zend Framework Team at Zend • Email: [email protected] • Website: http://ralphschindler.com/ • Project: http://framework.zend.com/ • @ralphschindler (http://twitter.com/ralphschindler) • Slides at: (provide link) • Code download link: (provide link) 2
  • 3. What’s Zend_Tool All About, Again? A quick review of where Zend_Tool came from, and where its going. 3
  • 4. What’s Zend_Tool All About, Again? • Rapid application development of ZF projects • Tooling framework Framework for building repeatable tooling tasks Lots of Built in Features Easily extensible (what this talk is about!) • B/c build systems only get us so far • Tools need to fit in human workflows: Tool creates project Human edits project Tool edits project Human edits project ... so on and so on ... 4
  • 5. What’s Zend_Tool All About, Again? • Zend_Tool in ZF 1.8 • Zend_Application in 1.8 • Built in project providers: create projects create controllers create actions create views create modules • Zend_Reflection & Zend_CodeGenerator in 1.8 5
  • 6. What’s Zend_Tool All About, Again? • New features in 1.10 New base loader (no more include_path scanning) Providers • DbAdapter configuration • DbTable creation based on database tables • Layout enabling and creation (Web client interface) 6
  • 7. System Overview Let’s have a stroll through the Zend_Tool architecture 7
  • 8. System Overview • Two main “components” Zend_Tool_Framework • The component responsible for dispatching tooling requests Zend_Tool_Project • The component responsible for exposing the “project specific” tooling capabilities • Auxiliary Components Zend_Reflection Zend_CodeGenerator 8
  • 9. System Overview • Zend_Tool_Framework Dispatch style framework, designed to abstract enough system internals to make extensibility easy • “Flexibility of the tooling dispatch over speed of tooling dispatch” Broken down into logical sub-parts: • Client • Client storage & configuration • Loader • Provider & Provider Repository • Manifest, Manifest Repository & Metadata • System (Built-in) Providers 9
  • 10. System Overview / Zend_Tool_Framework • Zend_Tool_Framework_Client Responsibilities: • Request object • Response object • Interactivity support • Setting up the system registry containing all required objects • The actual dispatch()-ing First implementation Zend_Tool_Framework_Client_Console 10
  • 11. System Overview / Zend_Tool_Framework • Zend_Tool_Framework_Client_Storage & Zend_Tool_Framework_Client_Config Responsibilities: • Allowing clients to specify configuration values for the system and providers to use • Allowing clients to store artifacts on the filesystem that the system and providers can consume – Custom profile files – Provider specific file formats and metadata 11
  • 12. System Overview / Zend_Tool_Framework • Zend_Tool_Framework_Loader Responsibilities: • Load files provided • Search for classes defined that implement: – Zend_Tool_Framework_Manifest_Interface – Zend_Tool_Framework_Provider_Interface Original loader Zend_Tool_Framework_Loader_IncludePathLoader New loader Zend_Tool_Framework_Loader_BasicLoader • Loads explicitly what it was asked to load 12
  • 13. System Overview / Zend_Tool_Framework • Zend_Tool_Framework_Provider & Provider Registry Responsibilities: • An interface for defining via a class, dispatch-able actions and “specialties” – (Similar to how Action Controllers define actions) • Registry to maintain instances of all providers available • Parsing of provider classes for dispatch-able “signatures” 13
  • 14. System Overview / Zend_Tool_Framework • Zend_Tool_Framework_Manifest & Manifest Repository Responsibilities: • Manifest can supply a collection of providers, actions and/or metadata • Registry provides a way to search for metadata in the manifest • Zend_Tool_Framework_Metadata Responsibilities: • Primary use case is to attach “data about data” to instance of a specific client, a specific provider, or action – ex: alternate names for each provider based on the command line naming scheme, OR short names (p for profile) 14
  • 15. System Overview • Zend_Tool_Project Problem: How to successfully model all the notions of a “project”? What is a “project”? • It is a tree of resources (some filesystem / some not) • For each resource we need to capturing it’s “nature” or “context” 2 main elements • Zend_Tool_Project_Profile which is a tree of Zend_Tool_Project_Profile_Resources • Zend_Tool_Project_Context 15
  • 16. System Overview / Zend_Tool_Project • Zend_Tool_Project_Profile Responsibilities: • loading, parsing, serializing and storing a profile file • Top most node in a “resource tree” • Zend_Tool_Project_Profile_Resource Responsibilities: • The class most responsible for the “where” question of project modeling • The class most responsible for implementing a node in a “resource tree” • Extends Resource_Container which is a RecursiveIterator (tree fundamentals) • Can create new Resources at specific locations • Can find resources by name and attribute sets • Each contains a Zend_Tool_Project_Context object 16
  • 17. System Overview / Zend_Tool_Project • Zend_Tool_Project_Context Responsibilities • The class most responsible for the “what” part of project modeling • Is assigned to a Zend_Tool_Project_Profile_Resource object – (This is known as “composition”) • Example contexts: – Controller file – View script directory – View script file – Model file – Action method – ... 17
  • 18. Building & extending for Zend_Tool With so many extension points, where does one start? 18
  • 19. Building & Extending For Zend_Tool • Path of least resistance when learning to extend: Implement a provider, and be able to call it Implement a manifest for the provider, and be able to call it Implement some metadata about provider, and be able to find it Add complex functionality to provider: • Selective interactivity (prompting the user) • Configuration • Use files from user storage area Implement a new client interface 19
  • 20. Building & Extending For Zend_Tool • Ensuring our environment is setup 20
  • 21. Building & Extending For Zend_Tool • Basic provider 21
  • 22. Building & Extending For Zend_Tool • Enter new provider in config file 22
  • 23. Building & Extending For Zend_Tool • Checking the provider is available in console help (zf --help) 23
  • 24. Building & Extending For Zend_Tool • Create a manifest for our provider • Notice we moved the provider inside the Tool namespace 24
  • 25. Building & Extending For Zend_Tool • Run the provider 25
  • 26. Building & Extending For Zend_Tool • Implement metadata attached to provider • (dynamic metadata) 26
  • 27. Building & Extending For Zend_Tool • Search for metadata 27
  • 28. Building & Extending For Zend_Tool • Add interactivity to provider • (screenshot) 28
  • 29. Building & Extending For Zend_Tool • Use the config file to retrieve a value • (screenshot) 29
  • 30. Building & Extending For Zend_Tool • Use the storage area to return a file • (screenshot) 30
  • 31. Building & Extending For Zend_Tool • Zend_Tool_Project extensions typical tasks Load existing profile Search for resources Create resources & contexts • Persist attributes Execute method on resource/contexts, such as create Store profile after changes 31
  • 32. Building & Extending For Zend_Tool • Code to examine to learn more Zend_Tool_Framework • Zend_Tool_Framework_Client & Zend_Tool_Framework_Registry Zend_Tool_Project • Zend_Tool_Project_Provider_* (specifically DbAdapter, DbTable) • Zend_Tool_Project_Context_* (specifically ControllerFile, ViewScriptFile, DbTableFile) Zend_Tool_CodeGenerator_Php • This is needed to generate, and regenerate code in most cases 32
  • 33. Building & Extending For Zend_Tool • Links to example files: (link here) • Link to manual & good articles: http://framework.zend.com/manual/en/zend.tool.framework.html (more) 33