File_Therion_Readers
[ class tree: File_Therion_Readers ] [ index: File_Therion_Readers ] [ all elements ]

Class: File_Therion_Reader

Source Location: /File_Therion-0.4.1/File/Therion/Readers/ReaderInterface.php

Class Overview


Interface defines reader plugins for fetching data.


Author(s):

Copyright:

  • 2016 Benedikt Hallinger

Methods


Inherited Variables

Inherited Methods


Class Details

[line 38]
Interface defines reader plugins for fetching data.

Readers can be used to influence the reading of therion file data. They are usually expected to addLine() the line representation of Therion file data content.

The reader must be capable of being invoked several times with different target arguments as it will also be used when evaluating 'input' commands. This means that eg. for a database reader it must be able to detect the neccessary datasets from the supplied filename (via passed therion file object) alone.

It is also possible to implement readers that directly create therion data model objects and generate the line data afterwards.



[ Top ]


Method Detail

fetch   [line 57]

void fetch( File_Therion $file)

Read datasource and add lines to Therion file object.

This will be called by File_Therion->fetch() to actually perform the read. The filename can be determined from $file->getFilename() if needed.

The reader is expected to reset the File_Therion using clearLines(). Only in special circumstances should this be passed, for example to federate line content from several datasources.

  • Throws: File_Therion_IOException in case of IO error
  • Throws: File_Therion_SyntaxException in case of parsing-to-file-obj error
  • Throws: File_Therion_Exception for other errors
  • Access: public

Parameters:

File_Therion   $file   —  the file object to generate lines into

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:09:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.