PHP code example of markup / addressing-bundle

1. Go to this page and download the library: Download markup/addressing-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

markup / addressing-bundle example snippets


    public function registerBundles()
    {
        $bundles = [
            ...
            new Markup\AddressingBundle\MarkupAddressingBundle(),
        ];
        ...
    }

    $renderer = $this->get('markup_addressing.address.renderer');
    $address = new MyAddressAdapter($myAddress); //MyAddressAdapter here wraps a different address definition and makes it implement Markup\Addressing\AddressInterface
    echo $renderer->render($address, ['format' => 'plaintext']);
bash
$ php composer.phar update markup/addressing-bundle