ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (protected \ilBiblEntryFactoryInterface $entry_factory, protected \ilBiblFieldFactoryInterface $field_factory, protected \ilBiblAttributeFactoryInterface $attribute_factory)
 ilBiblFileReaderBase constructor. More...
 
 readContent (ResourceIdentification $identification)
 
 getFileContent ()
 
 setFileContent (string $file_content)
 
 parseContent ()
 
 parseContentToEntries (ilObjBibliographic $bib)
 @inheritDoc More...
 
 getEntryFactory ()
 
 getFieldFactory ()
 
 getAttributeFactory ()
 @inheritDoc More...
 
 readContent (ResourceIdentification $identification)
 
 parseContentToEntries (ilObjBibliographic $bib)
 
 getEntryFactory ()
 
 getFieldFactory ()
 
 getAttributeFactory ()
 

Protected Attributes

ilBiblRisFileReaderWrapper $wrapper
 
- Protected Attributes inherited from ilBiblFileReaderBase
string $file_content = ''
 
string $path_to_file = ''
 
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.

32 {
33 parent::__construct($entry_factory, $field_factory, $attribute_factory);
34 $this->wrapper = new ilBiblRisFileReaderWrapper();
35 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ 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.

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 }

Referenced by parseContent().

+ Here is the caller graph for this function:

◆ parseContent()

ilBiblRisFileReader::parseContent ( )

Reimplemented from ilBiblFileReaderBase.

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

37 : array
38 {
39 $content = $this->wrapper->parseContent($this->file_content);
40
41 return $this->flattenContent($content);
42 }

References flattenContent().

+ 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: