ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBiblRisFileReader Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilBiblRisFileReader:
+ Collaboration diagram for ilBiblRisFileReader:

Public Member Functions

 __construct (ilBiblEntryFactoryInterface $entry_factory, ilBiblFieldFactoryInterface $field_factory, ilBiblAttributeFactoryInterface $attribute_factory)
 
 parseContent ()
 
- Public Member Functions inherited from ilBiblFileReaderBase
 __construct (ilBiblEntryFactoryInterface $entry_factory, ilBiblFieldFactoryInterface $field_factory, ilBiblAttributeFactoryInterface $attribute_factory)
 ilBiblFileReaderBase constructor. More...
 
 readContent (ResourceIdentification $identification)
 
 getFileContent ()
 
 setFileContent (string $file_content)
 
 parseContent ()
 
 parseContentToEntries (ilObjBibliographic $bib)
 
 getEntryFactory ()
 
 getFieldFactory ()
 
 getAttributeFactory ()
 

Protected Attributes

ilBiblRisFileReaderWrapper $wrapper
 
- Protected Attributes inherited from ilBiblFileReaderBase
string $file_content = ''
 
string $path_to_file = ''
 
ilBiblEntryFactoryInterface $entry_factory
 
ilBiblFieldFactoryInterface $field_factory
 
ilBiblAttributeFactoryInterface $attribute_factory
 
ILIAS ResourceStorage Services $storage
 

Private Member Functions

 flattenContent (array $content)
 

Additional Inherited Members

- Data Fields inherited from ilBiblFileReaderBase
const ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH = 4000
 
const ENCODING_UTF_8 = 'UTF-8'
 
const ENCODING_ASCII = 'ASCII'
 
const ENCODING_ISO_8859_1 = 'ISO-8859-1'
 
- Protected Member Functions inherited from ilBiblFileReaderBase
 convertStringToUTF8 (string $string)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilBiblRisFileReader

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 24 of file class.ilBiblRisFileReader.php.

Constructor & Destructor Documentation

◆ __construct()

ilBiblRisFileReader::__construct ( ilBiblEntryFactoryInterface  $entry_factory,
ilBiblFieldFactoryInterface  $field_factory,
ilBiblAttributeFactoryInterface  $attribute_factory 
)

Definition at line 28 of file class.ilBiblRisFileReader.php.

References ILIAS\GlobalScreen\Provider\__construct().

32  {
33  parent::__construct($entry_factory, $field_factory, $attribute_factory);
34  $this->wrapper = new ilBiblRisFileReaderWrapper();
35  }
Class ilBiblRisFileReaderWrapper.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ flattenContent()

ilBiblRisFileReader::flattenContent ( array  $content)
private

Definition at line 44 of file class.ilBiblRisFileReader.php.

References $i.

Referenced by parseContent().

44  : array
45  {
46  $flattener = function ($i) {
47  if (is_array($i)) {
48  return implode(", ", $i);
49  }
50  return $i;
51  };
52 
53  $walker = function ($item) use ($flattener) {
54  if (is_array($item)) {
55  foreach ($item as $k => $i) {
56  $item[$k] = $flattener($i);
57  }
58  return $item;
59  }
60  return $item;
61  };
62 
63  return array_map($walker, $content);
64  }
$i
Definition: metadata.php:41
+ Here is the caller graph for this function:

◆ parseContent()

ilBiblRisFileReader::parseContent ( )

Definition at line 37 of file class.ilBiblRisFileReader.php.

References flattenContent().

37  : array
38  {
39  $content = $this->wrapper->parseContent($this->file_content);
40 
41  return $this->flattenContent($content);
42  }
+ Here is the call graph for this function:

Field Documentation

◆ $wrapper

ilBiblRisFileReaderWrapper ilBiblRisFileReader::$wrapper
protected

Definition at line 26 of file class.ilBiblRisFileReader.php.


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