/**
* Returns a Pathway object
*
* @param string $client The name of the client
*
* @return Pathway A Pathway object.
*
* @since 1.5
* @throws \RuntimeException
* @deprecated 5.0 Get the instance from the application, eg. $application->getPathway()
*/
public static function getInstance($client)
{
if (empty(self::$instances[$client])) {
// Create a Pathway object
$name = ucfirst($client) . 'Pathway';
if (!Factory::getContainer()->has($name)) {
throw new \RuntimeException(Text::sprintf('JLIB_APPLICATION_ERROR_PATHWAY_LOAD', $client), 500);
}
self::$instances[$client] = Factory::getContainer()->get($name);
}
return self::$instances[$client];
}