2017 © Pedro Peláez
 

library edexmllib

PHP Library for validating and importing Edexml files.

image

harmbandstra/edexmllib

PHP Library for validating and importing Edexml files.

  • Saturday, July 15, 2017
  • by harmbandstra
  • Repository
  • 1 Watchers
  • 0 Stars
  • 260 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Edexml library

PHP Library for validating and importing Edexml files., (*1)

Installation

Install with composer:, (*2)

$ composer require harmbandstra/edexmllib, (*3)

Usage

    $xml = file_get_contents('path_to_file');
    try {
        $edex = EdexmlFactory::load($xml);
    } catch (ValidationException $exception) {
        // Handle exception
    }

    foreach ($edex->getGroepen()->getGroep() as $groep) {
        echo $groep->getNaam();
    }

    foreach ($edex->getLeerlingen() as $leerling) {
        echo $leerling->getGebruikersnaam();
    }

If the Edexml file contains elements with a type defined in a non-public XSD, you can strip the block before loading the XML., (*4)

    $xml = file_get_contents('path_to_file');
    try {
        $edex = EdexmlFactory::load(
            EdexmlFactory::stripToevoegingen($xml)
        );
    } catch (ValidationException $exception) {
        // Handle exception
    }

To skip validation, set strict to false, (*5)

    $xml = file_get_contents('path_to_file');
    $edex = EdexmlFactory::load($xml, false);

Development

The library uses xsd2php for creating JMS Serializer definition files. These files are used to deserialize the XML into bite-sized PHP objects., (*6)

Generate classes

To generate new classed and JMS Serializer configuration based on the XSD files, run:, (*7)

php vendor/bin/xsd2php convert config.yml src/Resources/xsd/*.xsd, (*8)

This is only needed when the specification changes., (*9)

The Versions

15/07 2017

dev-master

9999999-dev

PHP Library for validating and importing Edexml files.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php library edexml

15/07 2017

0.1.1

0.1.1.0

PHP Library for validating and importing Edexml files.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php library edexml

20/06 2017

0.1

0.1.0.0

PHP Library for validating and importing Edexml files.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php library edexml