1. Go to this page and download the library: Download liquidrazor/class-locator 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/ */
liquidrazor / class-locator example snippets
$fileLocator = new FileLocator(...);
$classLocator = new ClassLocator($fileLocator, Mode::STRICT);
$result = $classLocator->locate();
new ClassLocator(FileLocator $fileLocator, Mode $mode = Mode::ENFORCING)
$fileLocator = new FileLocator(...);
$classLocator = new ClassLocator($fileLocator, Mode::STRICT);
$result = $classLocator->locate();
foreach ($result->getClasses() as $classInfo) {
if (!$classInfo->hasResolvedMetadata()) {
continue;
}
if ($classInfo->getSymbolKind() !== SymbolKind::CLASS_) {
continue;
}
if (in_array('App\\Contract\\EventSubscriber', $classInfo->getImplementedInterfaces(), true)) {
// Downstream code can classify this symbol without re-parsing the file.
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.