Documentation

TopLevel
in package
implements Scope

Top level injector class for returning the default binding for an object

This class returns a Horde\Injector\Binder\Implementation with the requested $interface mapped to itself. This is the default case, and for concrete classes should work all the time so long as you constructor parameters are typed.

Tags
author

Bob Mckee bmckee@bywires.com

author

James Pepin james@jamespepin.com

category

Horde

copyright

2009-2021 Horde LLC

license

http://www.horde.org/licenses/bsd BSD

Interfaces, Classes, Traits and Enums

Scope
Interface for injector scopes

Table of Contents

get()  : mixed
Returns instance of requested object if proper configuration has been provided.
getBinder()  : AnnotatedSetters
Get an Implementation Binder that maps the $interface to itself.
getInstance()  : null
Always return null. Object doesn't keep instance references.
has()  : bool
Stub of has()

Methods

get()

Returns instance of requested object if proper configuration has been provided.

public get(mixed $interface) : mixed
Parameters
$interface : mixed

Interface name of object which is being requested.

Return values
mixed

getBinder()

Get an Implementation Binder that maps the $interface to itself.

public getBinder(string $interface) : AnnotatedSetters
Parameters
$interface : string

The interface to retrieve binding information for.

Return values
AnnotatedSetters

A new binding object that maps the interface to itself.

getInstance()

Always return null. Object doesn't keep instance references.

public getInstance(string $interface) : null

Method is necessary because this object is the default parent Injector. The child of this injector will ask it for instances in the case where no bindings are set on the child. This should always return null.

Parameters
$interface : string

The interface in question.

Return values
null

has()

Stub of has()

public has(string $interface) : bool

Always false.

Parameters
$interface : string
Return values
bool

False

Search results