RemoteInboxNotificationsDataSourcePoller.php
2 months ago
RemoteInboxNotificationsEngine.php
1 year ago
RuleProcessorInterface.php
1 year ago
SpecRunner.php
4 weeks ago
TransformerInterface.php
1 year ago
TransformerInterface.php
42 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Interface for a transformer. |
| 4 | * |
| 5 | * @deprecated 9.4.0 Use \Automattic\WooCommerce\Admin\RemoteSpecs\Transformers\TransformerInterface instead. |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\WooCommerce\Admin\RemoteInboxNotifications; |
| 9 | |
| 10 | use stdClass; |
| 11 | |
| 12 | /** |
| 13 | * An interface to define a transformer. |
| 14 | * |
| 15 | * Interface TransformerInterface |
| 16 | * |
| 17 | * @package Automattic\WooCommerce\Admin\RemoteInboxNotifications |
| 18 | * |
| 19 | * @deprecated 9.4.0 Use \Automattic\WooCommerce\Admin\RemoteSpecs\Transformers\TransformerInterface instead. |
| 20 | */ |
| 21 | interface TransformerInterface { |
| 22 | /** |
| 23 | * Transform given value to a different value. |
| 24 | * |
| 25 | * @param mixed $value a value to transform. |
| 26 | * @param stdClass|null $arguments arguments. |
| 27 | * @param string|null $default_value default value. |
| 28 | * |
| 29 | * @return mixed|null |
| 30 | */ |
| 31 | public function transform( $value, ?stdClass $arguments = null, $default_value = null ); |
| 32 | |
| 33 | /** |
| 34 | * Validate Transformer arguments. |
| 35 | * |
| 36 | * @param stdClass|null $arguments arguments to validate. |
| 37 | * |
| 38 | * @return mixed |
| 39 | */ |
| 40 | public function validate( ?stdClass $arguments = null ); |
| 41 | } |
| 42 |