Download the PHP package yuubit/paxb without Composer

On this page you can find all versions of the php package yuubit/paxb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package paxb

PAXB

PAXB - very basic implementation of annotation driven xml binding

Supported annotations

This lib supports listed bellow annotations:

These annotations could be used only as property annotations or class annotation(XmlElement only)

Sample code

Marshalling example

    /**
     * @XmlElement(name="root")
     */
    class SampleEntity {

        /**
         * @XmlElement(name="attribute-value", type="AttributeValueEntity")
         */
        private $nestedEntity;

        private $text;

        /**
         * @XmlElementWrapper(name="number-list")
         */
        private $number = array();

        public function __construct($number = array(), $nestedEntity = null, $text = "")
        {
            $this->number = $number;
            $this->nestedEntity = $nestedEntity;
            $this->text = $text;
        }
    }

    class AttributeValueEntity {

        /**
         * @XmlAttribute
         */
        private $attribute;

        /**
         * @XmlElement
         */
        private $value;

        /**
         * @param string $attribute
         * @param string $value
         */
        public function __construct($attribute = "", $value = "")
        {
            $this->attribute = $attribute;
            $this->value = $value;
        }

        /**
         * @return string
         */
        public function getAttribute()
        {
            return $this->attribute;
        }

        /**
         * @return string
         */
        public function getValue()
        {
            return $this->value;
        }
    }

Marshalling code:

    $sampleEntity = new SampleEntity(
        array(1,2,3),
        new AttributeValueEntity('sample attribure', 'sample value'),
        'Sample text'
    );

    echo PAXB\Setup::getMarshaller()->marshall($sampleEntity, true);

Output:

    <?xml version="1.0"?>
    <root>
        <attribute-value attribute="sample attribure">
            <value>sample value</value>
        </attribute-value>
        <text>Sample text</text>
        <number-list>
            <number>1</number>
            <number>2</number>
            <number>3</number>
        </number-list>
    </root>

Unmarshalling example

    $xmlInput = '...'; //as above
    /** @var SampleEntity $sampleEntity */
    $sampleEntity = PAXB\Setup::getUnmarshaller()->unmarshall($xmlInput, 'SampleEntity');

Running examples

  1. Install composer: php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
  2. Install dependencies: ./composer.phar install
  3. run demo script: php demo/demo-marshall.php or php demo/demo-unmarshall.php

All versions of paxb with dependencies

PHP Build Version
Package Version
Requires doctrine/annotations Version 1.6.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yuubit/paxb contains the following files

Loading the files please wait ....