---
title: "Simple usage"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:services-using-services-simple@11.5"
source: "ApiOverview/Services/UsingServices/SimpleUse.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Simple usage {#services-using-services-simple}

The most basic use is when you want an object that handles a
given service type:

```php
if (is_object($serviceObject = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceService('textLang'))) {
	$language = $serviceObject->guessLanguage($text);
}
```

In this example a service of type "textLang" is requested. If such a
service is indeed available an object will be returned. Then the
`guessLanguage()` \- which would be part of the "textLang" service
type public API - is called.

There's no certainty that an object will be returned, for a number of
reasons:

-   there might be no service of the requested type installed
-   the service deactivated itself during registration because it
    recognized it can't run on your platform
-   the service was deactivated by the system because of certain checks
-   during initialization the service checked that it can't run and
    deactivated itself

Note that when a service is requested, the instance created is stored
in a global registry. If that service is requested again during the
same code run, the stored instance will be returned instead of a new
one. More details in [Service API](https://docs.typo3.org/permalink/t3coreapi:services-developer-service-api@11.5).

If several services are available, the one with the highest priority
(or quality if priority are equals) will be used.
