public static function fromFile($filename, $use_include_path = false, $context = null)
    {
        $read_time = microtime(true);
        $html      = file_get_contents($filename, $use_include_path, $context);
        $read_time = microtime(true) - $read_time;
        if (false === $html) {
            return $html;
        }

        $doc              = self::fromHTML($html, $filename);
        $doc->source_type = 'file';
        $doc->read_time   = $read_time * 1000;
        return $doc;
    }
public static function fromFile($filename, $use_include_path = false, $context = null)
    {
        $read_time = microtime(true);
        $html      = file_get_contents($filename, $use_include_path, $context);
        $read_time = microtime(true) - $read_time;
        if (false === $html) {
            return $html;
        }

        $doc              = self::fromHTML($html, $filename);
        $doc->source_type = 'file';
        $doc->read_time   = $read_time * 1000;
        return $doc;
    }
public static function fromFile ( $ filename , $ use_include_path = false , $ context = null ) { $ read_time = microtime ( true ) ; $ html = file_get_contents ( $ filename , $ use_include_path , $ context ) ; $ read_time = microtime ( true ) - $ read_time ; if ( false === $ html ) { return $ html ; } $ doc = self :: fromHTML ( $ html , $ filename ) ; $ doc -> source_type = 'file' ; $ doc -> read_time = $ read_time * 1000 ; return $ doc ; }
Read the HTML document from a file.

@param  string   $filename         - a valid filename
@param  bool     $use_include_path - OPTIONAL passed to file_get_contents()
@param  resource $context          - OPTIONAL A valid context resource created with stream_context_create(). See file_get_contents()
@return hQuery   $doc
Read the HTML document from a file .