PHP code example of mouf / classname-mapper
1. Go to this page and download the library: Download mouf/classname-mapper 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/ */
mouf / classname-mapper example snippets
use Mouf\Composer\ClassNameMapper;
// This will create a mapper from your root composer file.
$mapper = ClassNameMapper::createFromComposerFile();
$files = $mapper->getPossibleFileNames('Acme\Controller\MyController');
// $files == ["src/Controller/MyController.php"];
$namespaces = $mapper->getManagedNamespaces();
// $namespaces == ["Acme\\"];