2017 © Pedro Peláez
 

library nllom

NLLOM service

image

kennisnet/nllom

NLLOM service

  • Tuesday, July 3, 2018
  • by kennisnet
  • Repository
  • 3 Watchers
  • 0 Stars
  • 159 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 10 Versions
  • 20 % Grown

The README.md

Build Status, (*1)

NL LOM

NL LOM is the Dutch applicationprofile of LOM. This profile was constructed after a project by Stichting Kennisnet and SURFfoundation., (*2)

In NL LOM the agreements 'Content-zoekprofiel' and 'LORElom' are merged to form a metadata agreement for Dutch education based on IEEE-LOM., (*3)

Summary

This library offers a couple classes to simplify creating and parsing Lom objects and XML., (*4)

The Lom class consists of multiple setters/getters which rely on data wrapped in a class. For example, setting the general language uses a value wrapped in a LomString object:, (*5)

<?php
$lom = new NLLOM();
$lom->addGeneralLanguage(new LomString('nl'));

There are multiple types of these Lom wrapper classes, which can be found in the Library folder. For an example of creating a complete Lom record this way, check the unittest NLLOMTest.php in tests., (*6)

Usage

Creating a new Lom object, (*7)

 'en'
];

$lom = new NLLOM\NLLOM($options);

$lom->setGeneralTitle(
    new LomMultiLanguage([
        //Create different titles
        new LomLanguageString('Dit is een titel', 'nl'), //override default language
        new LomLanguageString('This is a title')
    ])
);
```

**Converting a Lom object to DomDocument**

```php
lomToDom($lom);

$result = $dom->saveXML();
```

**Converting existing Lom XML/DomDocument to Lom object** 
```php
load('lom_example.xml');

$mapper = new NLLOM\DomToLomMapper();
$lom = $mapper->domToLom($domDocument);
```

**Validation**
```php

<lom xmlns="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsmd_v1p2 http://www.imsglobal.org/xsd/imsmd_v1p2p4.xsd">
    <general>
        <title>
            <langstring xml:lang="nl">Foobar</langstring>
        </title>
    </general>
</lom>
XML;

NLLOM\Validator::validate($xml);

Kennisnet Developers Wiki, (*8)

NL LOM, (*9)

The Versions

03/07 2018

dev-master

9999999-dev

NLLOM service

  Sources   Download

The Development Requires

25/06 2018

1.0.5

1.0.5.0

NLLOM service

  Sources   Download

The Development Requires

23/05 2018

1.0.4

1.0.4.0

NLLOM service

  Sources   Download

The Development Requires

23/05 2018

1.0.3

1.0.3.0

NLLOM service

  Sources   Download

The Development Requires

23/05 2018

1.0.2

1.0.2.0

NLLOM service

  Sources   Download

The Development Requires

19/04 2018

1.0.1

1.0.1.0

NLLOM service

  Sources   Download

The Development Requires

12/04 2018

1.0.0

1.0.0.0

NLLOM service

  Sources   Download

The Development Requires

14/02 2018

dev-technicalnode

dev-technicalnode

NLLOM service

  Sources   Download

The Development Requires

08/01 2018

0.0.2-alpha

0.0.2.0-alpha

NLLOM service

  Sources   Download

The Development Requires

19/12 2017

0.0.1-alpha

0.0.1.0-alpha

NLLOM service

  Sources   Download

The Development Requires