Static Classes
**************
.[perex]
StaticClass is used to denote static classes.
Installation:
```shell
composer require nette/utils
```
Static classes, i.e., classes that are not intended to be instantiated, can be marked with the trait [api:Nette\StaticClass]:
```php
class Strings
{
use Nette\StaticClass;
}
```
{{maintitle: Static Classes in PHP with the Nette StaticClass Trait}}
{{description: Classes that are not meant to be instantiated can be marked with the StaticClass trait from Nette Utils. A short note on how to use it.}}
Static Classes
StaticClass is used to denote static classes.
Installation:
composer require nette/utils
Static classes, i.e., classes that are not intended to be instantiated, can be marked with the trait Nette\StaticClass:
class Strings
{
use Nette\StaticClass;
}