// If we have ruled out an App version and the class exists then try it
if (class_exists($alias) && self::
verifyInstanceOf($options,
$alias)) { return $alias;
} // Have to do this the hard way...
$locator = Services::
locator();
// Check if the class alias was namespaced
if (self::
isNamespaced($alias)) { if (!
$file =
$locator->
locateFile($alias,
$options['path'
])) { return null;
} $files =
[$file];
} // No namespace? Search for it
// Check all namespaces, prioritizing App and modules
elseif (!
$files =
$locator->
search($options['path'
] . DIRECTORY_SEPARATOR .
$alias)) { return null;
} // Check all files for a valid class