PHP code example of jms / metadata

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

    

jms / metadata example snippets



    
use Metadata\MetadataFactory;
use Metadata\Driver\DriverChain;

$driver = new DriverChain(array(
    /** Annotation, YAML, XML, PHP, ... drivers */
));
$factory = new MetadataFactory($driver);
$metadata = $factory->getMetadataForClass('MyNamespace\MyObject');