Download form SourceForge
SourceForge.net Logo

Table of contents

  1. Table of contents
  2. About
  3. phpOBrowser Features
  4. Using phpOBrowser
    1. phpOBrowser Installation
    2. phpOBrowser Setup
    3. phpOBrowser Options
    4. phpOBrowser Usage
  5. Element Definitions
  6. Element Structure
  7. Icons Used in phpOBrowser
  8. phpOBrowser Performance
  9. phpOBrowser Limitations
  10. phpOBrowser Notes
  11. Rate phpOBrowser
  12. Link to phpOBrowser
  13. Copyright/Licensing Information
  14. phpOBrowser Objects

About

  • File: phpob.php
  • Version: 1.1.4
  • Created: 05/14/2004
  • Updated: 08/12/2004
  • Author: Scott Greenberg
  • Company: SEG Tech
  • Website: http://gogogadgetscott.info
  • Decription: phpOBrowser is a dynamic object browser that allows you to browse through all available folders, files, sections, and objects in any php application and see classes, properties, methods and constants that are available.
  • Requires:
    • PHP 4.2.0 or later
    • File read permissions to source application files
    • JavaScript 1.2 or later enable web-browser

phpOBrowser Features

  • Lists folders, files, sections, classes, constants, properties, functions
  • Built-in security option with username, password and php sessions
  • Displays DocBlocks as tooltips for individual objects
  • Uses re-entry to searches application source folders and files, including sub-folders
  • Uses advanced Regular Expressions to produce very fast code
  • Select valid source file extensions i.e. php and/or inc
  • Frames or no frames option at runtime
  • Collapse/Expanded all nodes at runtime
  • Copies selected object to clipboard
  • Customizable toolbars
  • Customizable treeview
  • Clean user interface
  • Produces valid XHMTL 1.0 output
  • Allows for separate image folder

*¹Requires a browser using Microsoft's Internet Explorer engine. i.e. IE, MyIE2, Avant, etc..

Using phpOBrowser

Script Installation

Unzip the archive in a directory and configure webserver to serve it. The object browser does not need a live webserver to operate, a localhost setup will do. The user the script runs as needs file permissions to read the package files being listed.
- register_globals can either be on or off, at no comprise to the security or functionality of phpOBrowser.

Script Setup

Open phpOBrowser.php in a text/php editor. Scroll to the script setup section. Edit the setup values to reflect your php package. These values include the title, source folder, images folder and the list of valid php file extensions. The default setup will list all objects used in phpOBrowser.

Script Options

Open phpOBrowser.php in a text/php editor. Scroll to the script options section. Edit the setup values to reflect your desired settings. Options are explained in comments above setting. These setting include turning security on. By default, security and frames are turned off.

phpOBrowser Usage

Using your web-browser open the phpOBrowser.php file, being sure to request it through the webserver. i.e. localhost/phpOBrowser/phpOBrowser.php There are two interfaces, with and without frames. Both have the same functionally, though they have different layouts. In either setup, the icon to the left of the element will symbolize the elements type. An icon key maybe found below. A plus to the left of the icon element will indicate it can be expanded to expose more elements listed within. A minus will indicate it can be collapsed to hide the child elements. Click on the plus/minus or the icon to the right will invoke the appropriate collapse/expand action. If neither a plus or minus is present, then that element has no children. In addition, clicking on the icon of a element without children will copy the elements text to the clipboard.

Both layouts contain a top toolbar. In no frame mode you will find the links to display about information, switch to framed layout, collapse all, expand all and move to bottom of list. In frame mode you will find the links to display help and switch to no frame layout. Both layouts have a bottom toolbar where you will find the parse time to create the object browser list and the links to collapse all, expand all. Only the no frame bottom toolbar has a move to top of list link.

phpOBrowser is a dynamic object browser. By refreshing the web page all folder, files, and object will update to reflect any changes made to you php application. Using the find feature of your browser and element can be found. Only those element in visible display, this includes any elements that may be hidden by the screen size restrictions with be search. This allows you to limit your search to a folder, file, section and/or class. By using the expand all feature from the toolbar the entire php application can be searched.

*²Element is used to describe php application folders, files, sections and/or objects.

Element Definitions

Folder
A self-contained collection of varies kinds of files, including source code, images, documentation, etc. Used to organize files that makeup a php application. An application can consist of one or more folders or even share a folder with other applications.
File
A basic unit of code storage for php applications. An application may consist of one or more files.
Section
A self-contained collection of objects within a file. Used to aid the programming when coding the script and helps produce script documentation.
Class
A collection of properties and functions that acts as a template from which an instance of an object is created at run time. The class defines the properties of the object and the functions used to control the objects behavior.
Property
A symbol into which data can be stored. It is used to describe the class in with is belongs. The value, or contents, of a property can change during script execution. Property are defined by preceding var. Properties are represented by a dollar sign followed by the name and are case-sensitive.
Function
A subroutine called from within an expression in which a value is computed and returned to the script that called it through its name. Any number of arguments, including no arguments may be passed to it either by value or by reference.
Constant
An identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script.

Element Structure

Sections are defined with the follow structure:

    // ==
    // Section name
    // ==

or

    // --
    // Section name
    // --

or

    // {{{ Section name
    // }}}

Where the separation symbol [-/=] can be repeated one or more times

All other element require valid php structure as defined by The PHP Group. For more information refer to the php language reference manual.

Icons Used in phpOBrowser

The phpOBrowser contain many icons that represent classes and members. The following is a list of icons and what they represent.

This Icon: Represents a:
FolderFolder
FileFile
SectionSection
ClassClass
PropertyProperty
FunctionFunction
ConstantConstant

phpOBrowser Performance

Lists objects from 23 php applications, 4,166 files, 251 Folders on a single html page

  Parse time (s) Total load time (s)
with frames:
1.338
4.187
without frames:
17.979
33.187

*³Times are an average performed using:

  • phpOBrowser Version 1.0.0
  • PHP Version 4.36
  • IIS Version 5.1
  • Opera Version 7.5
  • MyIE2 Version 0.9.26
  • Windows XP Pro
  • AMD Athlon XP 2200+
  • 1.00 GB of RAM

phpOBrowser Limitations

  1. Any object listed after a class and not part of a second class will be include as part of the class.
    This is only an issue, if any single file has any objects after a first class that are not part of any subsequent class. In the future a method maybe implemented to determine the end of classes, this is not used currently.

phpOBrowser Notes

Change Log:
1.1.4
- Fixed a JavaScript error be removing carriage returns from strings in
function formatline_js.
1.1.3
- Create formatpath_php function to be sure all file system paths are
formatted correctly.
- Added Web Scripts Directory link and rate form to About :: Rate phpOBrowser.
- Renamed contant 'PAGE_PARSE_START_TIME' to 'PHPOB_PARSE_START_TIME'. This
cause a conflict with GoGo Web application.
- Uses ini_set to increase php maximum execution time for script.
- Create icon (phpOBrowser.ico) and link logo (phpOBrowser.gif).
- Applied shortcut icon for web browser.
- Reworked treeview spaces to prevent extra lines.
- Changed treeview display default to show lines.
1.1.2
- Allows for multiple packages, switchable from user interface (UI).
- Fixed copying constant name to clipboard in parse_folder function.
- Moved css style sheet to script setup.
- Renamed script setup variable names to lowercase and switched vocabulary
from 'application' to 'package'.
- Allows symbols ".,'+<>-?" in section name.
- Changed toolbar default to show both images and text.
1.1.1
- Copy only constant name to clipboard.
- Pre-load images.
1.1.0
- Parses DocBlocks.
- Displays DocBlocks as a tool tip for individual objects.
- Fixed error 404 bug when using non-standard script
file name i.e. phpOBrowser-1.1.0.php.
1.0.2
- Finds multiply classes in a single document.
- Convert source comment to phpDocyment tags.
- Multi-line array are found as constants.
- Reformatted source to conform with PEAR Coding Standards,
with a expiation of the header comment block.
- Allowed for forward-slash, '/' in section name.
1.0.1
- Better file handling methods, hands exceptions.
- Prevent finding non-php objects i.e. JavaScript, by
removing Heredoc style strings before parsing.
- Allows for a third section ("fold markers")
style '// {{{ section name // }}}'.
- Finds returning reference functions, '&returns_reference()'.
- Allows for properties set as an array.

To do:
- Prevent any double forward slashes lines from being removed from DocBlock
comments.
- Prevent a forward slash followed by a multiply symbol cause problems when
within DocBlock. Example:
C:\inetpub\wwwroot\gogogadgetscott.info\http_navigator\classes\HTTP_Headers.php :: Line 204

References:
1. The PHP Documentation Group. PHP Manual.
http://www.php.net/docs.php: The PHP Documentation Group, 2004.
2. Mark Wilton-Jones. Collapsible lists. HowToCreate.co.uk, 2002.
http://www.howtocreate.co.uk/tutorials/jsexamples/collapseList.html.
3. The PEAR Documentation Group. PEAR Manual.
http://pear.php.net/manual/en/: The PEAR Documentation Group, 2004.

Rate phpOBrowser

If you like phpOBrowser, please rate it at Hotscripts.com!

or

If you like phpOBrowser, please rate it at Web Scripts Directory!
Excellent Excellent
Great Great
Normal Normal
Web Scripts Directory

Link to phpOBrowser

Copyright/Licensing Information

Copyright© 2004. SEG Tech. All rights reserved.

Click here for copyright information.

Click here for licensing information.

phpOBrowser Objects

`-[+/-]--- phpob.php

Download form SourceForge
SourceForge.net Logo