| @@ 38-48 (lines=11) @@ | ||
| 35 | /** @var EbayEnterprise_Inventory_Model_Quantity_Service */ |
|
| 36 | protected $quantityService; |
|
| 37 | ||
| 38 | public function __construct($init = []) |
|
| 39 | { |
|
| 40 | list($this->invHelper, $this->logger, $this->logContext, $this->factory, $this->quantityService) = |
|
| 41 | $this->checkTypes( |
|
| 42 | $this->nullCoalesce($init, 'inv_helper', Mage::helper('ebayenterprise_inventory')), |
|
| 43 | $this->nullCoalesce($init, 'logger', Mage::helper('ebayenterprise_magelog')), |
|
| 44 | $this->nullCoalesce($init, 'log_context', Mage::helper('ebayenterprise_magelog/context')), |
|
| 45 | $this->nullCoalesce($init, 'factory', Mage::helper('ebayenterprise_inventory/details_factory')), |
|
| 46 | $this->nullCoalesce($init, 'quantity_service', Mage::getModel('ebayenterprise_inventory/quantity_service')) |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * enforce types |
|
| @@ 35-45 (lines=11) @@ | ||
| 32 | * @param array $initParams Must have this key: |
|
| 33 | * - 'response' => IOrderDetailResponse |
|
| 34 | */ |
|
| 35 | public function __construct(array $initParams=[]) |
|
| 36 | { |
|
| 37 | list($this->orderHelper, $this->coreConfig, $this->shipping, $this->factory, $this->itemHelper) = $this->checkTypes( |
|
| 38 | $this->nullCoalesce($initParams, 'order_helper', Mage::helper('ebayenterprise_order')), |
|
| 39 | $this->nullCoalesce($initParams, 'core_config', Mage::helper('eb2ccore')->getConfigModel()), |
|
| 40 | $this->nullCoalesce($initParams, 'shipping', Mage::getModel('shipping/shipping')), |
|
| 41 | $this->nullCoalesce($initParams, 'factory', Mage::helper('ebayenterprise_order/factory')), |
|
| 42 | $this->nullCoalesce($initParams, 'item_helper', Mage::helper('ebayenterprise_order/detail_item')) |
|
| 43 | ); |
|
| 44 | parent::__construct($this->removeKnownKeys($initParams)); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * Populate a new array with keys that not in the array of known keys. |
|
| @@ 44-59 (lines=16) @@ | ||
| 41 | /** |
|
| 42 | * @param array |
|
| 43 | */ |
|
| 44 | public function __construct(array $args = []) |
|
| 45 | { |
|
| 46 | list( |
|
| 47 | $this->container, |
|
| 48 | $this->helper, |
|
| 49 | $this->logger, |
|
| 50 | $this->logContext, |
|
| 51 | $this->session |
|
| 52 | ) = $this->checkTypes( |
|
| 53 | $this->nullCoalesce($args, 'container', Mage::getModel('ebayenterprise_giftcard/container')), |
|
| 54 | $this->nullCoalesce($args, 'helper', Mage::helper('ebayenterprise_giftcard')), |
|
| 55 | $this->nullCoalesce($args, 'logger', Mage::helper('ebayenterprise_magelog')), |
|
| 56 | $this->nullCoalesce($args, 'log_context', Mage::helper('ebayenterprise_magelog/context')), |
|
| 57 | $this->nullCoalesce($args, 'session', null) |
|
| 58 | ); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * @param EbayEnterprise_GiftCard_Model_IContainer |
|