Open Journal Systems  3.3.0
SearchFileParser Class Reference
Inheritance diagram for SearchFileParser:
SearchHelperParser SearchHTMLParser

Public Member Functions

 __construct ($filePath)
 
 close ()
 
 doRead ()
 
 getFilePath ()
 
 open ()
 
 read ()
 
 setFilePath ($filePath)
 

Static Public Member Functions

static fromFile ($file)
 
static fromFileType ($type, $path)
 

Data Fields

 $filePath
 
 $fp
 

Detailed Description

Abstract class to extract search text from a given file.

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

Constructor & Destructor Documentation

◆ __construct()

SearchFileParser::__construct (   $filePath)

Constructor.

Parameters
$filePathstring

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

References $filePath.

Member Function Documentation

◆ close()

SearchFileParser::close ( )

Close the file.

Reimplemented in SearchHelperParser.

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

◆ doRead()

SearchFileParser::doRead ( )

Read from the file pointer.

Returns
string

Reimplemented in SearchHTMLParser.

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

Referenced by read().

◆ fromFile()

static SearchFileParser::fromFile (   $file)
static

Create a text parser for a file.

Parameters
$file[Article|Paper]File
Returns
SearchFileParser

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

References fromFileType().

Referenced by ArticleSearchIndex\submissionFileChanged().

◆ fromFileType()

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

Create a text parser for a file.

Parameters
$typestring
$pathstring

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

Referenced by fromFile().

◆ getFilePath()

SearchFileParser::getFilePath ( )

Return the path to the file.

Returns
string

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

References $filePath.

Referenced by SearchHelperParser\open().

◆ open()

SearchFileParser::open ( )

Open the file.

Returns
boolean

Reimplemented in SearchHelperParser.

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

◆ read()

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.

References doRead().

◆ setFilePath()

SearchFileParser::setFilePath (   $filePath)

Change the file path.

Parameters
$filePathstring

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

References $filePath.

Field Documentation

◆ $filePath

string SearchFileParser::$filePath

the complete path to the file

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

Referenced by SearchHelperParser\__construct(), __construct(), getFilePath(), and setFilePath().

◆ $fp

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: