API Documentation for: 1.0.1
Show:

ServiceBrowser Class

Web debugging interface for browsing and testing Services within the CanteenFramework. Located in the namespace Canteen\ServiceBrowser\ServiceBrowser.

Constructor

ServiceBrowser

(
  • aliases
  • basePath
  • browserUri
  • uriRequest
  • [parser=null]
)

Parameters:

  • aliases Dictionary

    The collection of custom service aliases to class names

  • basePath String

    The full path to the base site path

  • browserUri String

    The URI stub for the browser

  • uriRequest String

    The full URI requested on the site

  • [parser=null] Parser optional

    Reference to the Canteen Parser

Methods

callMethod

(
  • call
  • [args=null]
)
String private

Call the method and get the result

Parameters:

  • call String | Array

    The user function to call

  • [args=null] Array optional

    The optional arguments to pass to the user function

Returns:

String:

The HTML result of the call or stack trace

displayArgs

(
  • args
)
String

Display the arguments as a string

Parameters:

  • args Array

    The arguments array

Returns:

String:

The string representation of the arguments, comma-separated

getFormattedTrace

(
  • e
)
Array private

A utility function to formatted the exception stack trace

Parameters:

  • e Exception

    The exception to convert to trace

Returns:

Array:

The collection of arrays

getMethodsList

() String private

The name of the class

Returns:

String:

HTML mark-up for methods lis

getServicesList

() String private

Get a list of services

Returns:

String:

HTML list of services

handle

()

Create the browser request

simpleName

(
  • className
)
String private

Get the name of the class only

Parameters:

  • className String

    The full name of the class with namespace

Returns:

String:

The last class name

Properties

_basePath

String private

The Site's basePath

_browserUri

String private

The uri for this browser

_builtInAliases

Array private

These are the services built into Canteen

_parser

Parser private

Reference to the parser

_services

Array private

The collection of all service aliases, Canteen and Custom

_uri

Array private

The full browser URI as pieces

_uriRequest

String private

The full browser URI path