Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayTools
  • NCallback
  • NComponent
  • NComponentContainer
  • NConfigurator
  • NDateTime53
  • NDebug
  • NEnvironment
  • NFramework
  • NFreezableObject
  • NGenericRecursiveIterator
  • NImage
  • NImageMagick
  • NInstanceFilterIterator
  • NObject
  • NObjectMixin
  • NPaginator
  • NRecursiveComponentIterator
  • NServiceLocator
  • NSmartCachingIterator
  • NString
  • NTools

Interfaces

  • IComponent
  • IComponentContainer
  • IDebuggable
  • IServiceLocator
  • ITranslator

Exceptions

  • NAmbiguousServiceException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Interface IServiceLocator

The service locator.

Direct known implementers

NServiceLocator
Package: Nette
Author: David Grudl
Located at Environment/IServiceLocator.php
Methods summary
public
# addService( string $name, mixed $service, boolean $singleton = TRUE, array $options = NULL )

Adds the specified service to the service container.

Adds the specified service to the service container.

Parameters

$name
string
service name
$service
mixed
object, class name or factory callback
$singleton
boolean
is singleton?
$options
array
factory options
public mixed
# getService( string $name, array $options = NULL )

Gets the service object of the specified type.

Gets the service object of the specified type.

Parameters

$name
string
service name
$options
array
options in case service is not singleton

Returns

mixed
public
# removeService( $name )

Removes the specified service type from the service container.

Removes the specified service type from the service container.

public boolean
# hasService( $name )

Exists the service?

Exists the service?

Returns

boolean
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0