code/libraries/joomlatools/library/filter/iterator.php
public function sanitize($data)
    {
        if(is_array($data) || $data instanceof Traversable)
        {
            foreach((array)$data as $key => $value)
            {
                if(is_array($data)) {
                    $data[$key] = $this->sanitize($value);
                } else {
                    $data->$key = $this->sanitize($value);
                }
            }
        }
        else  $data = $this->getDelegate()->sanitize($data);

        return $data;
    }
public function sanitize($data)
    {
        if(is_array($data) || $data instanceof Traversable)
        {
            foreach((array)$data as $key => $value)
            {
                if(is_array($data)) {
                    $data[$key] = $this->sanitize($value);
                } else {
                    $data->$key = $this->sanitize($value);
                }
            }
        }
        else  $data = $this->getDelegate()->sanitize($data);

        return $data;
    }
public function sanitize ( $ data ) { if ( is_array ( $ data ) || $ data instanceof Traversable ) { foreach ( ( array ) $ data as $ key => $ value ) { if ( is_array ( $ data ) ) { $ data [ $ key ] = $ this -> sanitize ( $ value ) ; } else { $ data -> $ key = $ this -> sanitize ( $ value ) ; } } } else $ data = $ this -> getDelegate ( ) -> sanitize ( $ data ) ; return $ data ; }
Sanitize a scalar or traversable data

@param   mixed   $data Value to be sanitized
@return  mixed   The sanitized value
Sanitize a scalar or traversable data