PHP code example of arokettu / phpstorm-metadata-export
1. Go to this page and download the library: Download arokettu/phpstorm-metadata-export 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/ */
arokettu / phpstorm-metadata-export example snippets
$container = new \DI\Container();
// .phpstorm.meta.php must be in a root path of your project
$storePath = __DIR__ '/.phpstorm.meta.php/sandfox_container_export.meta.php';
// just generate the file content
$metaPhp = \Arokettu\PhpStorm\Metadata\Generator::get([$container]);
file_put_contents($storePath, $metaPhp);
// use middleware (Slim 4 example)
$app = new \Slim\App();
$app->addMiddleware(new \Arokettu\PhpStorm\Metadata\Integration\ContainerExportMiddleware($container, [
'filename' => $storePath,
]));