public function readFileHandle($file_handle)
    {
        if (!is_resource($file_handle))
            throw new \InvalidArgumentException("No file handle was provided");

        $data = array();
        $this->file_handle = $file_handle;

        foreach ($this as $row)
            $data[] = $row;

        return $data;
    }
public function readFileHandle($file_handle)
    {
        if (!is_resource($file_handle))
            throw new \InvalidArgumentException("No file handle was provided");

        $data = array();
        $this->file_handle = $file_handle;

        foreach ($this as $row)
            $data[] = $row;

        return $data;
    }
public function readFileHandle ( $ file_handle ) { if ( ! is_resource ( $ file_handle ) ) throw new \ InvalidArgumentException ( "No file handle was provided" ) ; $ data = array ( ) ; $ this -> file_handle = $ file_handle ; foreach ( $ this as $ row ) $ data [ ] = $ row ; return $ data ; }
Read CSV from a stream.

@param resource $file_handle The stream to read CSV from
@return array The parsed data
Read CSV from a stream .