PHP code example of syzygypl / kunstmaan-feature-switches-bundle

1. Go to this page and download the library: Download syzygypl/kunstmaan-feature-switches-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/ */

    

syzygypl / kunstmaan-feature-switches-bundle example snippets



// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new  SZG\KunstmaanFeatureSwitchesBundle\KunstmaanFeatureSwitchesBundle(),
        );

        // ...
    }

    // ...
}

/// ...
$this->denyAccessUnlessGranted('my_special_feature', 'features');
// ...


// app/Features.php



class Features
{
    const MY_SPECIAL = 'my_special_feature';
}

// app/autoload.php
// ...