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

Public Member Functions

 newInstance ($name, array $params=array())
 Retrieve a new instance of a class.
 
- Public Member Functions inherited from LocatorInterface
 get ($name, array $params=array())
 Retrieve a class instance.
 

Member Function Documentation

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

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