PHP code example of flextype-components / registry

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

    

flextype-components / registry example snippets


use Flextype\Component\Registry;

$registry = new Registry();

$registry->set('movies.the-thin-red-line.title', 'The Thin Red Line');

$registry->get('movies.the-thin-red-line.title');

if ($registry->has('movies.the-thin-red-line.title')) {
    // do something...
}

$registry->delete('movies.the-thin-red-line.title');

$registry->flush();

$dump = $registry->all();