PHP code example of opxcore / pathset

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

    

opxcore / pathset example snippets


$pathSet = new PathSet;
$pathSet->add('*', 'global_primary', ['global_alternate_1', 'global_alternate_2']);
$pathSet->add('name', 'primary', ['alternate_1', 'alternate_2']);
$set = $pathSet->get('name');
// $set = [
//   'alternate_2',
//   'alternate_1',
//   'primary',
//   'global_alternate_2',
//   'global_alternate_1',
//   'global_primary'
// ]