PHP code example of alister / reserved-names-bundle

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

    

alister / reserved-names-bundle example snippets


    $bundles = array(
        new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
        // ... many others

        new Alister\ReservedNamesBundle\AlisterReservedNamesBundle(),
    );
    

    $username = 'myname_123';
    $reserved = $this->container->get('alister_reserved_names.check');
    if ($reserved->isReserved($username)) {
        echo "{$username} is reserved";
    }