src/Utility/Sanitizer.php
protected function apply($function, $args = array())
  {
    foreach ($this->data as $key => &$value) {

      if (!is_array($value)) {
        $value = $this->applyToValue($function, $args, $value);
      } else {
        $value = array_map(function ($v) use ($function, $args) {
          return $this->applyToValue($function, $args, $v);
        }, $value);
      }

    }
  }
protected function apply($function, $args = array())
  {
    foreach ($this->data as $key => &$value) {

      if (!is_array($value)) {
        $value = $this->applyToValue($function, $args, $value);
      } else {
        $value = array_map(function ($v) use ($function, $args) {
          return $this->applyToValue($function, $args, $v);
        }, $value);
      }

    }
  }
protected function apply ( $ function , $ args = array ( ) ) { foreach ( $ this -> data as $ key => & $ value ) { if ( ! is_array ( $ value ) ) { $ value = $ this -> applyToValue ( $ function , $ args , $ value ) ; } else { $ value = array_map ( function ( $ v ) use ( $ function , $ args ) { return $ this -> applyToValue ( $ function , $ args , $ v ) ; } , $ value ) ; } } }
Apply a function to each value
@param  string $function Function name (ex: "stripslashes")
@param  array  $args     Function arguments
@return null
Apply a function to each value