Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Factory Class Reference

Public Member Functions

 __construct (\Magento\Framework\ObjectManagerInterface $objectManager)
 
 create ($className, array $data=[])
 

Protected Attributes

 $_objectManager = null
 

Detailed Description

Definition at line 12 of file Factory.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\ObjectManagerInterface  $objectManager)

Factory constructor

Parameters
\Magento\Framework\ObjectManagerInterface$objectManager

Definition at line 26 of file Factory.php.

27  {
28  $this->_objectManager = $objectManager;
29  }
$objectManager
Definition: bootstrap.php:17

Member Function Documentation

◆ create()

create (   $className,
array  $data = [] 
)

Create class instance with specified parameters

Parameters
string$className
array$data
Returns
\Magento\Paypal\Model\Api\AbstractApi

Definition at line 38 of file Factory.php.

39  {
40  return $this->_objectManager->create($className, $data);
41  }
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31

Field Documentation

◆ $_objectManager

$_objectManager = null
protected

Definition at line 19 of file Factory.php.


The documentation for this class was generated from the following file: