PHP code example of decodelabs / lucid-support

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

    

decodelabs / lucid-support example snippets


namespace My\Library;

use DecodeLabs\Lucid\Provider\SingleContext;
use DecodeLabs\Lucid\Provider\SingleContextTrait;

class MyClass implements SingleContext {

    use SingleContextTrait;

    protected mixed $value;

    public function __construct(mixed $value) {
        $this->value = $value;
    }

    /**
     * This method provides the value to all other
     * sanitisation methods in the interface
     */
    public function getValue(): mixed {
        return $this->value;
    }
}