protected function _checkViewVars(&$item, $key)
    {
        if ($item instanceof Exception) {
            $item = (string)$item;
        }

        if (is_resource($item) ||
            $item instanceof Closure ||
            $item instanceof PDO
        ) {
            throw new RuntimeException(sprintf(
                'Failed serializing the `%s` %s in the `%s` view var',
                is_resource($item) ? get_resource_type($item) : get_class($item),
                is_resource($item) ? 'resource' : 'object',
                $key
            ));
        }
    }
protected function _checkViewVars(&$item, $key)
    {
        if ($item instanceof Exception) {
            $item = (string)$item;
        }

        if (is_resource($item) ||
            $item instanceof Closure ||
            $item instanceof PDO
        ) {
            throw new RuntimeException(sprintf(
                'Failed serializing the `%s` %s in the `%s` view var',
                is_resource($item) ? get_resource_type($item) : get_class($item),
                is_resource($item) ? 'resource' : 'object',
                $key
            ));
        }
    }
protected function _checkViewVars ( & $ item , $ key ) { if ( $ item instanceof Exception ) { $ item = ( string ) $ item ; } if ( is_resource ( $ item ) || $ item instanceof Closure || $ item instanceof PDO ) { throw new RuntimeException ( sprintf ( 'Failed serializing the `%s` %s in the `%s` view var' , is_resource ( $ item ) ? get_resource_type ( $ item ) : get_class ( $ item ) , is_resource ( $ item ) ? 'resource' : 'object' , $ key ) ) ; } }
Iterates through hash to clean up and normalize.

@param mixed $item Reference to the view var value.
@param string $key View var key.
@return void
Iterates through hash to clean up and normalize .