# fluent-cart/1.6.4/api/SanitizerTrait.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 21 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/api/SanitizerTrait.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/api/SanitizerTrait.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/api/SanitizerTrait.php#L10-L20`.

```php
<?php

namespace FluentCart\Api;

trait SanitizerTrait
{
    protected $rules = [];

    protected function sanitize($orderItem)
    {

        foreach ($this->rules as $key => $value) {
            if (isset($orderItem[$key])) {
                $orderItem[$key] = call_user_func($value, $orderItem[$key]);
            }
        }

        return $orderItem;
    }
}

```
