ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilBibliograficFileReaderBase Class Reference

Class ilBibliograficFileReaderBase. More...

+ Inheritance diagram for ilBibliograficFileReaderBase:
+ Collaboration diagram for ilBibliograficFileReaderBase:

Public Member Functions

 getFileContent ()
 
 setFileContent ($file_content)
 
 getPathToFile ()
 
 setPathToFile ($path_to_file)
 
- Public Member Functions inherited from ilBibliograficFileReader
 readContent ($path_to_file)
 
 parseContent ()
 

Data Fields

const ENCODING_UTF_8 = 'UTF-8'
 
const ENCODING_ASCII = 'ASCII'
 
const ENCODING_ISO_8859_1 = 'ISO-8859-1'
 

Protected Member Functions

 convertStringToUTF8 ($string)
 

Protected Attributes

 $file_content = ''
 
 $path_to_file = ''
 

Detailed Description

Member Function Documentation

◆ convertStringToUTF8()

ilBibliograficFileReaderBase::convertStringToUTF8 (   $string)
protected
Parameters
$string
Returns
string

Definition at line 46 of file class.ilBibliograficFileReaderBase.php.

References array.

47  {
48  if (!function_exists('mb_detect_encoding') || !function_exists('mb_detect_order')
49  || !function_exists("mb_convert_encoding")
50  ) {
51  return $string;
52  }
53  ob_end_clean();
54  $mb_detect_encoding = mb_detect_encoding($string);
55  mb_detect_order(array( self::ENCODING_UTF_8, self::ENCODING_ISO_8859_1 ));
56  switch ($mb_detect_encoding) {
57  case self::ENCODING_UTF_8:
58  break;
59  case self::ENCODING_ASCII:
60  $string = utf8_encode(iconv(self::ENCODING_ASCII, 'UTF-8//IGNORE', $string));
61  break;
62  default:
63  $string = mb_convert_encoding($string, self::ENCODING_UTF_8, $mb_detect_encoding);
64  break;
65  }
66 
67  return $string;
68  }
Create styles array
The data for the language used.

◆ getFileContent()

ilBibliograficFileReaderBase::getFileContent ( )
Returns
string

Definition at line 74 of file class.ilBibliograficFileReaderBase.php.

References $file_content.

Referenced by ilBibTex\convertBibSpecialChars(), ilBibTex\normalizeContent(), and ilBibTex\parseContent().

+ Here is the caller graph for this function:

◆ getPathToFile()

ilBibliograficFileReaderBase::getPathToFile ( )
Returns
string

Definition at line 92 of file class.ilBibliograficFileReaderBase.php.

References $path_to_file.

◆ setFileContent()

ilBibliograficFileReaderBase::setFileContent (   $file_content)
Parameters
string$file_content

Definition at line 83 of file class.ilBibliograficFileReaderBase.php.

References $file_content.

Referenced by ilBibTex\convertBibSpecialChars(), and ilBibTex\normalizeContent().

84  {
85  $this->file_content = $file_content;
86  }
+ Here is the caller graph for this function:

◆ setPathToFile()

ilBibliograficFileReaderBase::setPathToFile (   $path_to_file)
Parameters
string$path_to_file

Definition at line 101 of file class.ilBibliograficFileReaderBase.php.

References $path_to_file.

102  {
103  $this->path_to_file = $path_to_file;
104  }

Field Documentation

◆ $file_content

ilBibliograficFileReaderBase::$file_content = ''
protected

Definition at line 16 of file class.ilBibliograficFileReaderBase.php.

Referenced by getFileContent(), and setFileContent().

◆ $path_to_file

ilBibliograficFileReaderBase::$path_to_file = ''
protected

Definition at line 20 of file class.ilBibliograficFileReaderBase.php.

Referenced by getPathToFile(), and setPathToFile().

◆ ENCODING_ASCII

const ilBibliograficFileReaderBase::ENCODING_ASCII = 'ASCII'

Definition at line 11 of file class.ilBibliograficFileReaderBase.php.

◆ ENCODING_ISO_8859_1

const ilBibliograficFileReaderBase::ENCODING_ISO_8859_1 = 'ISO-8859-1'

Definition at line 12 of file class.ilBibliograficFileReaderBase.php.

◆ ENCODING_UTF_8

const ilBibliograficFileReaderBase::ENCODING_UTF_8 = 'UTF-8'

Definition at line 10 of file class.ilBibliograficFileReaderBase.php.


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