* @param string filePath * @return mixed */ public function __construct($filePath) { $this->filePath = $filePath; } /** * Reads a translation file to put TranslationUnits of the TranslationFile * memory. Retrieved strings must be unescaped to avoid any misunderstanding * the client code. This method must be implemented by subclasses. * * @abstract * @access public * @author Jerome Bogaerts, * @return mixed */ abstract public function read(); /** * Gets the TranslationFile instance resulting of the reading of the file. * * @access public * @author Jerome Bogaerts, * @return tao_helpers_translation_TranslationFile */ public function getTranslationFile() { $returnValue = null; if ($this->translationFile != null) { return $this->translationFile; } else { throw new tao_helpers_translation_TranslationException('No TranslationFile to retrieve.'); } return $returnValue; } /** * Gets the location where the file has to be read. * * @access public * @author Jerome Bogaerts, * @return string */ public function getFilePath() { $returnValue = (string) ''; return $this->filePath; return (string) $returnValue; } /** * Sets the location where the file has to be read. * * @access public * @author Jerome Bogaerts, * @param string filePath * @return mixed */ public function setFilePath($filePath) { $this->filePath = $filePath; } /** * Short description of method setTranslationFile * * @access public * @author Jerome Bogaerts, * @param TranslationFile translationFile * @return mixed */ public function setTranslationFile(tao_helpers_translation_TranslationFile $translationFile) { $this->translationFile = $translationFile; } } /* end of abstract class tao_helpers_translation_TranslationFileReader */