PHP code example of jlabno / annotations-scanner

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

    

jlabno / annotations-scanner example snippets

 php
$cache = new \Symfony\Component\Cache\Psr16Cache(new \Symfony\Component\Cache\Adapter\NullAdapter());
$scanner = ScannerFactory::createWithDefaultReaderAndCache('/app', $cache);
 php
$scanner = ScannerFactory::createWithAnnotationReader( '/app', $reader);
 php
$scanner = ScannerFactory::createWithAnnotationReaderAndCache( '/app', $reader, $cache);