* @deprecated */ class core_kernel_uri_UriService { const CONFIG_KEY = 'uriProvider'; private static $instance; public static function singleton() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; } private $uriProvider = null; /** * Generate a new URI with the UriProvider in force. * * @return string */ public function generateUri() { return (string) $this->getUriProvider()->provide(); } /** * Set the UriProvider in force. * * @param UriProvider $provider */ public function setUriProvider(UriProvider $provider) { $this->uriProvider = $provider; ServiceManager::getServiceManager()->register(UriProvider::SERVICE_ID, $provider); } /** * Get the UriProvider in force. * * @return UriProvider */ public function getUriProvider() { if (is_null($this->uriProvider)) { $this->uriProvider = ServiceManager::getServiceManager()->get(UriProvider::SERVICE_ID); } return $this->uriProvider; } }