Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
Developing a Z-Ray Plugin 101
Nov 04, 2015 @ 16:44:13

The Zend Developer Zone has posted a tutorial showing you the basics of creating a plugin for Z-Ray, the tool from Zend that provides details and metrics around the execution of your application.

One of the great things about Z-Ray is the ability to extend it to display any info you want about your app. This is done by creating plugins. In this tutorial I’m going to describe how to create a new Z-Ray plugin. I’ll be supplying code snippets to insert in the various plugin files but of course feel free to replace it with your own code when possible.

They start by describing how Z-Ray shows its data and offering two options - the default panel or a custom panel. They choose the custom panel and show you how to:

  • create the template for the panel
  • make the module directory and zray.php
  • and Modules.php file to define the plugin

There's also a section on how the Z-Ray plugin traces through the execution of your application, illustrating with a DummyClass. They include the code to set up the Trace and define which methods and actions to watch. Finally they relay this information back out to the custom panel view via Javascript collection and the code to show the results.

tagged: zray plugin custom performance dummyclass execution tracer tutorial

Link: http://devzone.zend.com/6826/developing-a-z-ray-plugin-101/


Trending Topics: