mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\Shipping\Model;
|
|
|
|
use Magento\Shipping\Model\Carrier\AbstractCarrierInterface;
|
|
|
|
/**
|
|
* Interface CarrierFactoryInterface
|
|
*
|
|
* @api
|
|
*/
|
|
interface CarrierFactoryInterface
|
|
{
|
|
/**
|
|
* Get carrier instance
|
|
*
|
|
* @param string $carrierCode
|
|
* @return bool|AbstractCarrierInterface
|
|
*/
|
|
public function get($carrierCode);
|
|
|
|
/**
|
|
* Create carrier instance
|
|
*
|
|
* @param string $carrierCode
|
|
* @param int|null $storeId
|
|
* @return bool|AbstractCarrierInterface
|
|
*/
|
|
public function create($carrierCode, $storeId = null);
|
|
|
|
/**
|
|
* Get carrier by its code if it is active
|
|
*
|
|
* @param string $carrierCode
|
|
* @return bool|AbstractCarrierInterface
|
|
*/
|
|
public function getIfActive($carrierCode);
|
|
|
|
/**
|
|
* Create carrier by its code if it is active
|
|
*
|
|
* @param string $carrierCode
|
|
* @param null|int $storeId
|
|
* @return bool|AbstractCarrierInterface
|
|
*/
|
|
public function createIfActive($carrierCode, $storeId = null);
|
|
}
|