Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
SearchFileParser Class Reference
Inheritance diagram for SearchFileParser:
SearchHelperParser SearchHTMLParser

Public Member Functions

 close ()
 
 doRead ()
 
fromFile (&$file)
 
fromFileType ($type, $path)
 
 getFilePath ()
 
 open ()
 
 read ()
 
 SearchFileParser ($filePath)
 
 setFilePath ($filePath)
 

Public Attributes

 $filePath
 
 $fp
 

Detailed Description

Abstract class to extract search text from a given file.

Definition at line 23 of file SearchFileParser.inc.php.

Member Function Documentation

SearchFileParser::close ( )

Close the file.

Definition at line 73 of file SearchFileParser.inc.php.

SearchFileParser::doRead ( )

Read from the file pointer.

Returns
string

Definition at line 92 of file SearchFileParser.inc.php.

References fromFileType().

& SearchFileParser::fromFile ( $file)

Create a text parser for a file.

Parameters
$file[Article|Paper]File
Returns
SearchFileParser

Definition at line 106 of file SearchFileParser.inc.php.

Referenced by MonographSearchIndex\updateFileIndex().

& SearchFileParser::fromFileType (   $type,
  $path 
)

Create a text parser for a file.

Parameters
$typestring
$pathstring

Definition at line 116 of file SearchFileParser.inc.php.

Referenced by doRead().

SearchFileParser::getFilePath ( )

Return the path to the file.

Returns
string

Definition at line 49 of file SearchFileParser.inc.php.

SearchFileParser::open ( )

Open the file.

Returns
boolean

Definition at line 65 of file SearchFileParser.inc.php.

SearchFileParser::read ( )

Read and return the next block/line of text.

Returns
string (false on EOF)

Definition at line 81 of file SearchFileParser.inc.php.

SearchFileParser::SearchFileParser (   $filePath)

Constructor.

Parameters
$filePathstring

Definition at line 41 of file SearchFileParser.inc.php.

SearchFileParser::setFilePath (   $filePath)

Change the file path.

Parameters
$filePathstring

Definition at line 57 of file SearchFileParser.inc.php.

Member Data Documentation

string SearchFileParser::$filePath

the complete path to the file

Definition at line 29 of file SearchFileParser.inc.php.

int SearchFileParser::$fp

file handle

Definition at line 35 of file SearchFileParser.inc.php.


The documentation for this class was generated from the following file: