Skip to end of metadata
Go to start of metadata



<p>Zend_Tool_Rpc is a framework that provides:</p>
<li>common interfaces, abstracts that allow will allow developers (through the most minimal of efforts) to create functionality and capabilities that are dispatchable by "tooling clients" (1).</li>
<li>Implementation of "endpoints" (5) to be used to connect "tooling clients" to the Zend_Tool_Rpc, the primary endpoint implementation being that of the "Command Line Interface Endpoint" (6)</li>
<li>Implement a stardard set of "providers" (8) that allow the system to report what the full capabilities of the system are as well as provide useful feedback. This might also be known as a "Help System".</li>

<p>In a more general sense, Zend_Tool_Rpc might be useful in creating a system that can expose common functionalities such as the creation of files, the creation of project scaffolds, building of indexes, ... the list goes on. Central to all of the tasks of tooling is a resounding theme: </p>

<p>"Dont work harder, work smarter."</p>

<h2>The subsystems that make up Zend_Tool_Rpc</h2>

<h3>Zend_Tool_Rpc_Provider & Zend_Tool_Rpc_ProviderAbstract</h3>

<p>Zend_Tool_Rpc_Provider represents the functional or "capability" aspect of the Zend_Tool_Rpc framework. Fundamentally, Zend_Tool_Rpc_Provider will provide the interfaces and abstracts necessary to produce "providers", or bits of tooling functionality, that can be called and used inside the Zend_Tool_Rpc toolchain. The simplistic nature of extending this "provider abstract" allows the developer a "one-stop-shop" of adding functionality/capabilities to the Zend_Tool_Rpc.</p>

<p>Here is the abstract for the provider to get a sense for what this sub-system is responsible for:</p>

<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[

abstract class Zend_Tool_Rpc_ProviderAbstract

Unknown macro: { /** * @var string */ protected $_name = null; /** * @var Zend_Tool_Rpc_Endpoint_Request */ protected $_request = null; /** * @var Zend_Tool_Rpc_Endpoint_Response */ protected $_response = null; /** * @var Zend_Tool_Rpc_Provider_Action */ protected $_action = null; /** * @var array */ protected $_specialties = array(); /** * @var array */ private $_actionableMethods = null; public function setName($name); public function getName(); public function setManifest(Zend_Tool_Rpc_Manifest $manifest); public function getManifest(); public function setRequest(Zend_Tool_Rpc_Endpoint_Request $request); public function setResponse(Zend_Tool_Rpc_Endpoint_Response $response); public function getSpecialties(); public function execute($actionName, $providerSpecialty = null); public function getActions(); public function getParameterRequirements($actionName = null, $specialtyName = null); private function _getActionableMethods(); private function _parseActionableMethods(); private function _getParameterInformation($methodName); }


<p>For example, if a developer wants to add the capability of showing the version of a datafile that his 3rd party component is working from, there is only one class the developer would need to implement. Assuming the components is called Some3rdParty_Component, he would create a class/file named Some3rdParty_Component_MyZfTool (MyZfTool.php). This class would extend Zend_Tool_Rpc_ProviderAbstract and the body of this file would only have to look like the following:</p>

<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
class Some3rdParty_Component_MyZfTool extends Zend_Tool_Rpc_ProviderAbstract
public function showDatafileVersion()

Unknown macro: { $version = Some3rdParty_Component_Datafile}



<p>Given that code above, and assuming the developer wishes to access this functionilty through the Command Line Tooling Client, the call would look like this:</p>

<p>#zf show my-zf-tool.datafile-version<br />
Version number is: 4.0</p>


<p>The Zend_Tool_Rpc_Registry is a runtime bootstrapped registry of all available providers and manifestation metadata.</p>


<p>The purpose of the Registry Loader is to find Providers and Manifest files within the php include_path who's file names match a specific set of patterns and implement/extend either Zend_Tool_Rpc_ProviderAbstract or Zend_Tool_Rpc_ManifestInterface. Once these files are found, the providers are loaded into the Provider Registry and manifest metadata is loaded into the Manifest Registry.</p>

<p>Currently, it has been decided that the file names to be search for (which will be configurable), will be *Tool.php and *Manifest.php. The registry loader will make use of RecursiveDirectoryIterator as well as RecursiveFilterIterator in order to find which files match the patterns described. </p>


<p>Zend_Tool_Rpc_Manifest provides the means by which those creating providers and endpoint can decorate providers in such a way that is consumable and reusable by all components within the system. The interface for the files implementing a manifest is below (also remember this file should be named *Manifest.php in order to be found and parsed when the tooling systme bootstraps.)</p>

<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[

class Zend_Tool_Rpc_ManifestInterface

Unknown macro: { public function getMetadata(); /** * Optional Methods - this method will be tested for, and if it exists will be used * to load local providers into the provider registry */ // public function getProviders() }]]></ac}


<h3>Zend_Tool_Rpc_Endpoint_Cli & Zend_Tool_Rpc_Endpoint_Rpci</h3>

<p>The command line interface endpoint shall make use of the command line arguments to initiate the action/provider) request, and also make use of standard out to alert the user of any output that came from the exection of the provider.</p>

XXXXXXXXXXXXXXXX Discuss Rcpi endpoint<br />

<h2>Zend_Tool_Rpc_Provider's built in providers</h2>

<p>These providers will be able to allow the system to reflect back to the user all of the capabilities and providers that are loaded within the tooling system.</p>


XXXXXXXXXXXXXXXX Talk about internal methods<br />

<h2>Definitions and Terms</h2>

<p> (1) Zend_Tool_Rpc - The framework which exposes tooling capabilities.</p>

<p> (2) Tooling Client - A developer tool that connects to and consumes "Zend_Tool_Rpc".</p>

<p> (3) Command Line Tool / Command Line Interface / zf.php - The "tooling client" for the command line.</p>

<p> (4) Zend Studio - An IDE based "tooling client", connects via the RPC "Zend_Tool_Rpc_Endpoint"</p>

<p> (5) Endpoint - The subsystem of "Zend Tool" that exposes an interface such that "tooling clients" can connect, query and execute commands.</p>

<p> (6) Cli Endpoint - An endpoint implementation responsible for exposing "Zend Tool RPC" via the "command line interface".</p>

<p> (7) Rpci Endpoint - An endpoint implementation responsible for exposing "Zend Tool RPC" via the "remote procedure call interface".</p>

<p> (8) Provider - A subsystem and a collection of built-in functionality that the "Zend Tool" system exports.</p>

<p> (9) ZFProject Provider - A set of providers specifically for creating and maintaining Zend Framework based projects.</p>

<p> (10) Manifest - A subsystem for defining, organizing, and disseminating "provider" requirement data.</p>

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.