PluginProbe ʕ •ᴥ•ʔ
FAPI Member / trunk
FAPI Member vtrunk
2.2.33 2.2.32 trunk 1.9.47 2.1.18 2.2.24 2.2.25 2.2.26 2.2.28 2.2.29 2.2.30 2.2.31
fapi-member / libs / nette / utils / src / StaticClass.php
fapi-member / libs / nette / utils / src Last commit date
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