Iterators
2 years ago
Utils
2 years ago
HtmlStringable.php
2 years ago
SmartObject.php
2 years ago
StaticClass.php
2 years ago
Translator.php
2 years ago
compatibility.php
2 years ago
exceptions.php
2 years ago
StaticClass.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This file is part of the Nette Framework (https://nette.org) |
| 5 | * Copyright (c) 2004 David Grudl (https://davidgrudl.com) |
| 6 | */ |
| 7 | declare (strict_types=1); |
| 8 | namespace FapiMember\Library\Nette; |
| 9 | |
| 10 | /** |
| 11 | * Static class. |
| 12 | */ |
| 13 | trait StaticClass |
| 14 | { |
| 15 | /** |
| 16 | * @return never |
| 17 | * @throws \Error |
| 18 | */ |
| 19 | final public function __construct() |
| 20 | { |
| 21 | throw new \Error('Class ' . static::class . ' is static and cannot be instantiated.'); |
| 22 | } |
| 23 | /** |
| 24 | * Call to undefined static method. |
| 25 | * @return void |
| 26 | * @throws MemberAccessException |
| 27 | */ |
| 28 | public static function __callStatic(string $name, array $args) |
| 29 | { |
| 30 | Utils\ObjectHelpers::strictStaticCall(static::class, $name); |
| 31 | } |
| 32 | } |
| 33 |