PHP code example of gl3n / serialization-group-bundle

1. Go to this page and download the library: Download gl3n/serialization-group-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/ */

    

gl3n / serialization-group-bundle example snippets


$bundles = array(
    // ...
    new Gl3n\SerializationGroupBundle\Gl3nSerializationGroupBundle(),
);

// Resolving group1 returns ['group1']
$groups = $resolver->resolve('group1');

// Resolving group3 returns ['group2', 'group3']
$groups = $resolver->resolve('group3');

// Resolving group4 returns ['group1', 'group2', 'group3', 'group4']
$groups = $resolver->resolve('group4');