System
[ class tree: System ] [ index: System ] [ all elements ]

Class: TServiceManager

Source Location: /TServiceManager.php

Class Overview


TServiceManager class

Class Details

[line 32]
TServiceManager class

The ServiceManager is responsible for handling and dispatching all web services to their respective classes. Once the Service manager instantiated with XML config, call handleRequest() to service the request. The function handleRequest() will return true if service was handled, false otherwise.




version:  v1.0, last update on 2005/03/11 21:44:52
author:  Wei Zhuo <weizhuo[at]gmail.com>


[ Top ]

Variables

Methods



Class Variables

$services = array()

[line 38]

A list of all the service instantiated.



access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 44]

TServiceManager __construct( SimpleXML $config)

Constructor.



access:  public


Parameters:

SimpleXML   $config   configuration.

[ Top ]

method addService [line 64]

void addService( string $type, TService $service)

Add a new service.



access:  public


Parameters:

string   $type   service type, generally the service class name.
TService   $service   a new service.

[ Top ]

method executable [line 116]

boolean executable( array $request)

Check if the request can be handled.



return:  true if can be handled, false otherwise.
access:  protected


Parameters:

array   $request   request parameters

[ Top ]

method execute [line 84]

void execute( string $type)

Execute the service for this particular type.



access:  public


Parameters:

string   $type   service type.

[ Top ]

method getServices [line 74]

TService[] getServices( string $type)

Return a list of service objects for the given service type.



return:  list of services.
access:  public


Parameters:

string   $type   service type.

[ Top ]

method handleRequest [line 100]

boolean handleRequest( )

Check if the request can be handled, and calls the respective service instantances to handle the request.



return:  true if the request was handled, false otherewise.
access:  public


[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.