Zend Framework  3.0
Public Member Functions | List of all members
DependencyInjectionInterface Interface Reference

Public Member Functions

 newInstance ($name, array $params=[])
 Retrieve a new instance of a class.
 

Member Function Documentation

newInstance (   $name,
array  $params = [] 
)

Retrieve a new instance of a class.

Forces retrieval of a discrete instance of the given class, using the constructor parameters provided.

Parameters
mixed$nameClass name or service alias
array$paramsParameters to pass to the constructor
Returns
object|null