PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\utils Namespace Reference

Classes

class  AssumptionFailedError
 
class  Binary
 
class  BinaryDataException
 
class  BinaryStream
 
class  BroadcastLoggerForwarder
 
class  Config
 
class  ConfigLoadException
 
class  Filesystem
 
class  Git
 
class  Internet
 
class  InternetException
 
class  InternetRequestResult
 
class  Limits
 
class  MainLogger
 
class  MainLoggerThread
 
class  ObjectSet
 
class  Process
 
class  Random
 
class  ReversePriorityQueue
 
class  ServerException
 
class  ServerKiller
 
class  SignalHandler
 
class  StringToTParser
 
class  Terminal
 
class  TextFormat
 
class  Timezone
 
class  Utils
 
class  VersionString
 

Functions

static __callStatic (string $name, array $arguments)
 
static checkInit ()
 
 getDestructorCallbacks ()
 
static getInstance ()
 
static preprocessMember (object $member)
 
static preprocessMember (object $member)
 
static reset ()
 
static setInstance (self $instance)
 
static setup ()
 

Variables

trait CloningRegistryTrait
 
trait DestructorCallbackTrait
 
trait RegistryTrait
 
trait SingletonTrait
 

Detailed Description

Various Utilities used around the code

Methods for working with binary strings

Function Documentation

◆ __destruct()

pocketmine\utils\__destruct ( )

Definition at line 43 of file DestructorCallbackTrait.php.

◆ __callStatic()

static pocketmine\utils\__callStatic ( string $name,
array $arguments )
static
Parameters
mixed[]$arguments@phpstan-param list<mixed> $arguments

Definition at line 110 of file RegistryTrait.php.

◆ checkInit()

static pocketmine\utils\checkInit ( )
staticprotected

Definition at line 80 of file RegistryTrait.php.

◆ getDestructorCallbacks()

pocketmine\utils\getDestructorCallbacks ( )

@phpstan-return ObjectSet<\Closure() : void>

Definition at line 39 of file DestructorCallbackTrait.php.

◆ getInstance()

static pocketmine\utils\getInstance ( )
static

Definition at line 34 of file SingletonTrait.php.

◆ preprocessMember() [1/2]

static pocketmine\utils\preprocessMember ( object $member)
staticprotected

Definition at line 33 of file CloningRegistryTrait.php.

◆ preprocessMember() [2/2]

static pocketmine\utils\preprocessMember ( object $member)
staticprotected

Definition at line 102 of file RegistryTrait.php.

◆ reset()

static pocketmine\utils\reset ( )
static

Definition at line 45 of file SingletonTrait.php.

◆ setInstance()

static pocketmine\utils\setInstance ( self $instance)
static

Definition at line 41 of file SingletonTrait.php.

◆ setup()

static pocketmine\utils\setup ( )
staticabstractprotected

Inserts default entries into the registry.

(This ought to be private, but traits suck too much for that.)

References pocketmine\utils\setup().

Referenced by pocketmine\utils\setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ CloningRegistryTrait

trait pocketmine::utils\CloningRegistryTrait
Initial value:
{
use RegistryTrait

This trait offers the same functionality as RegistryTrait, but also clones any returned objects to prevent outside modification.

Definition at line 30 of file CloningRegistryTrait.php.

◆ DestructorCallbackTrait

trait pocketmine::utils\DestructorCallbackTrait
Initial value:
{
private $destructorCallbacks = null

This trait provides destructor callback functionality to objects which use it. This enables a weakmap-like system to function without actually having weak maps. TODO: remove this in PHP 8

Definition at line 31 of file DestructorCallbackTrait.php.

◆ RegistryTrait

trait pocketmine::utils\RegistryTrait
Initial value:
{
private static $members = null

This trait allows a class to simulate object class constants, since PHP doesn't currently support this. These faux constants are exposed in static class methods, which are handled using __callStatic().

Classes using this trait need to include @method tags in their class docblock for every faux constant. Alternatively, just put @generate-registry-docblock in the docblock and run build/generate-registry-annotations.php

Definition at line 38 of file RegistryTrait.php.

◆ SingletonTrait

trait pocketmine::utils\SingletonTrait
Initial value:
{
private static $instance = null

Definition at line 26 of file SingletonTrait.php.