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

Class: Service

Source Location: /locator/service/Service.class.php

Class Overview

ReflectionClass
   |
   --Service

Service is a extension to the ReflectionClass which provides a series of ServiceLocator/Dependency Injection facilities


Author(s):

  • Tyler Tompkins (ttompkins@mojavi.org)

Variables

Constants

Methods


Child classes:

ConstructorInjectionService
DecoratingService
Service is a extension to the ReflectionClass which provides a series of ServiceLocator/Dependency Injection facilities
BasicService
InstaniatedService

Class Details

[line 18]
Service is a extension to the ReflectionClass which provides a series of ServiceLocator/Dependency Injection facilities



Tags:

abstract:  
author:  Tyler Tompkins (ttompkins@mojavi.org)
since:  4.0.0


[ Top ]


Class Variables

$instance =  null

[line 32]



Tags:

var:  a internal reference to the instance created by resolveInstance()
access:  protected

Type:   $instance


[ Top ]

$options = array()

[line 37]



Tags:

var:  array is a list of all set options for this service
access:  protected

Type:   $options


[ Top ]

$parameters = array()

[line 43]



Tags:

var:  stores a hash of all parameters that are to be passed on class initialization
access:  protected

Type:   $parameters


[ Top ]



Class Methods


constructor __construct [line 47]

Service __construct( mixed $arg, [mixed $options = array()])



Tags:

access:  public


[ Top ]

method getOption [line 87]

mixed getOption( string $name)

Retrieve an option for the Service



Tags:

return:  Option value on success, null otherwise
access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Parameters:

string   $name   An option index

[ Top ]

method getOptions [line 152]

mixed getOptions( string 0)

Retrieve a parameter for the Service



Tags:

return:  Option value on success, null otherwise
access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Parameters:

string   0   An option index

[ Top ]

method getParameter [line 120]

mixed getParameter( string $name)

Retrieve a parameter for the Service



Tags:

return:  Option value on success, null otherwise
access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Parameters:

string   $name   An option index

[ Top ]

method getParameters [line 136]

mixed getParameters( string 0)

Retrieve all Service parameters



Tags:

return:  Option value on success, null otherwise
access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Parameters:

string   0   An option index

[ Top ]

method resolveInstance [line 170]

stdclass resolveInstance( ServiceLocator $sl, [array $args = array()])

Perform any Service-type specific construction



Tags:

return:  an instance of the class requested on success, stdclass otherwise
access:  public
abstract:  
author:  Tyler Tompkins (ttompkins@mojavi.org)


Overridden in child classes as:

ConstructorInjectionService::resolveInstance()
Perform any Service-type specific construction
DecoratingService::resolveInstance()
Perform any Service-type specific construction
BasicService::resolveInstance()
Perform any Service-type specific construction
InstaniatedService::resolveInstance()
Perform any Service-type specific construction

Parameters:

ServiceLocator   $sl   a reference to the ServiceLocator
array   $args   An array of arguments to be passed to the object

[ Top ]

method setInstance [line 181]

void setInstance( stdclass $instance)

Explicitly set the instance



Tags:

access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Overridden in child classes as:

DecoratingService::setInstance()
Explicitly set the instance

Parameters:

stdclass   $instance   An object

[ Top ]

method setOption [line 71]

void setOption( string $name, [string $value = true])

Set an option for the Service



Tags:

access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Parameters:

string   $name   The name of the option
string   $value   The option value

[ Top ]

method setParameter [line 104]

void setParameter( string $name, string $value)

Set a parameters for the instantiation of this Service



Tags:

access:  public
author:  Tyler Tompkins (ttompkins@mojavi.org)


Parameters:

string   $name   A named parameter key
string   $value   The value to be passed for this key

[ Top ]


Class Constants

AUTOLOAD =  'autoload'

[line 24]


[ Top ]

LAZY_INC =  'lazyinc'

[line 23]


[ Top ]

SINGLETON =  'singleton'

[line 22]


[ Top ]



Documentation generated on Tue, 21 Feb 2006 02:30:00 +0900 by phpDocumentor 1.3.0RC5