Go\Instrument\ClassLoading\AopComposerLoader::findFile PHP Method

findFile() public method

Finds either the path to the file where the class is defined, or gets the appropriate php://filter stream for the given class.
public findFile ( string $class ) : string | false
$class string
return string | false The path/resource if found, false otherwise.
    public function findFile($class)
    {
        static $isAllowedFilter = null, $isProduction = false;
        if (!$isAllowedFilter) {
            $isAllowedFilter = $this->fileEnumerator->getFilter();
            $isProduction = !$this->options['debug'];
        }
        $file = $this->original->findFile($class);
        if ($file) {
            $cacheState = isset($this->cacheState[$file]) ? $this->cacheState[$file] : null;
            if ($cacheState && $isProduction) {
                $file = $cacheState['cacheUri'] ?: $file;
            } elseif ($isAllowedFilter(new \SplFileInfo($file))) {
                // can be optimized here with $cacheState even for debug mode, but no needed right now
                $file = FilterInjectorTransformer::rewrite($file);
            }
        }
        return $file;
    }