flexible-shipping
/
vendor_prefixed
/
wpdesk
/
wp-wpdesk-fs-table-rate
/
src
/
Settings
/
IntegrationSettingsFactory.php
flexible-shipping
/
vendor_prefixed
/
wpdesk
/
wp-wpdesk-fs-table-rate
/
src
/
Settings
Last commit date
CartCalculationOptions.php
1 week ago
CheckboxValue.php
1 week ago
IntegrationSettings.php
1 week ago
IntegrationSettingsFactory.php
1 week ago
IntegrationSettingsImplementation.php
1 week ago
MethodSettings.php
1 week ago
MethodSettingsFactory.php
1 week ago
MethodSettingsImplementation.php
1 week ago
IntegrationSettingsFactory.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Integration settings Factory. |
| 5 | * |
| 6 | * @package WPDesk\FS\TableRate\Settings |
| 7 | */ |
| 8 | namespace FSVendor\WPDesk\FS\TableRate\Settings; |
| 9 | |
| 10 | /** |
| 11 | * Can create Integration settings. |
| 12 | */ |
| 13 | class IntegrationSettingsFactory |
| 14 | { |
| 15 | const INTEGRATION_NONE = 'none'; |
| 16 | /** |
| 17 | * @param array $shipping_method_array |
| 18 | * |
| 19 | * @return IntegrationSettingsImplementation |
| 20 | */ |
| 21 | public static function create_from_shipping_method_settings($shipping_method_array) |
| 22 | { |
| 23 | return new IntegrationSettingsImplementation(isset($shipping_method_array['method_integration']) ? $shipping_method_array['method_integration'] : self::INTEGRATION_NONE); |
| 24 | } |
| 25 | } |
| 26 |