PHP code example of polass / exposer

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

    

polass / exposer example snippets




class Secrecy {
    private $property = 'hidden';

    private function method($argument) {
        return 'called';
    }
}

$exposer = expose(new Secrecy);

echo $exposer->property;  // `hidden`

$exposer->property = 'exposed';
echo $exposer->property;  // `exposed`

echo $exposer->method('argument');  // `called`