2017 © Pedro Peláez
 

library xmldatatype

Mapping of XML datatypes to PHP Classes with validation

image

mpi2/xmldatatype

Mapping of XML datatypes to PHP Classes with validation

  • Monday, May 19, 2014
  • by webmasterar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

XML Datatype Mappings to PHP Classes

This package is a bunch of PHP classes that map primitive XML data types and a few other ones. The classes have some built-in validation checking so they throw an Exception if you try to assign the wrong value type., (*1)

The best way to get started using this package is to install Composer and find the package on Packagist to add it as a dependency., (*2)

Example of basic usage:, (*3)

<?php

require_once 'vendor/autoload.php';

$num = new XMLDatatype\Integer(99);

echo "Ich habe $num luftballons";
#Output: Ich habe 99 luftballons

All the classes allow you to use these methods:, (*4)

  • getName()
  • getValue()
  • setValue($value)
  • toString()

And some have methods specific to the datatype. Feel free to explore the source code in ./src. If you want to add more data types or fix bugs then you are more than welcome to contribute., (*5)

The Versions

19/05 2014

dev-master

9999999-dev

Mapping of XML datatypes to PHP Classes with validation

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

The Development Requires