Interface
CarrierFactoryInterface
Magento\Shipping\Model\CarrierFactoryInterface
What it does
This interface defines a factory for creating and retrieving shipping carrier instances in Magento 2.
Developers use this to get carrier objects by their code (e.g., 'ups', 'fedex') and can optionally filter for only active carriers or specify a store context.
It's essential when building custom shipping integrations or working with shipping methods programmatically.
Public Methods
- get()
- create()
- getIfActive()
- createIfActive()