Webiny\Component\ClassLoader\ClassLoader::findClass PHP Method

findClass() public method

Tries to get the path to the class based on registered maps.
public findClass ( string $class ) : string | boolean
$class string The name of the class
return string | boolean The path, if found, or false.
    public function findClass($class)
    {
        if (strrpos($class, '\\') !== false) {
            $file = Loaders\Psr4::getInstance()->findClass($class);
            if (!$file) {
                $file = Loaders\Psr0::getInstance()->findClass($class);
            }
        } else {
            $file = Loaders\Pear::getInstance()->findClass($class);
        }
        return $file;
    }