PocketMine-MP 5.39.3 git-21ae710729750cd637333d673bbbbbc598fc659e
Loading...
Searching...
No Matches
pocketmine\item\VanillaItemsInputs Class Reference
+ Inheritance diagram for pocketmine\item\VanillaItemsInputs:
+ Collaboration diagram for pocketmine\item\VanillaItemsInputs:

Public Member Functions

 cloneResults ()
 
 getAllDeclarations ()
 
 getAllValues ()
 
 getTargetClassDocComment ()
 
 getTargetClassName ()
 

Static Public Member Functions

static preprocessMember (object $member)
 

Protected Member Functions

 register (string $name, \Closure $createItem)
 
 registerDelayed (string $name, \Closure $valueFactory)
 
 registerValue (string $name, mixed $value)
 
 setup ()
 

Detailed Description

Definition at line 48 of file VanillaItemsInputs.php.

Member Function Documentation

◆ cloneResults()

pocketmine\item\VanillaItemsInputs::cloneResults ( )

Override this to return true if the registry members are mutable. Supersedes CloningRegistryTrait

Reimplemented from pocketmine\utils\RegistrySource.

Definition at line 60 of file VanillaItemsInputs.php.

◆ getAllDeclarations()

pocketmine\utils\RegistrySource::getAllDeclarations ( )
finalinherited

Definition at line 185 of file RegistrySource.php.

◆ getAllValues()

pocketmine\utils\RegistrySource::getAllValues ( )
finalinherited

Definition at line 171 of file RegistrySource.php.

◆ getTargetClassDocComment()

pocketmine\item\VanillaItemsInputs::getTargetClassDocComment ( )

Returns information to be prepended to the doc comment on the generated class. Do not include any PHPDoc formatting (e.g. comment tags) in here.

Returns
string[] @phpstan-return list<string>

Reimplemented from pocketmine\utils\RegistrySource.

Definition at line 53 of file VanillaItemsInputs.php.

◆ getTargetClassName()

pocketmine\item\VanillaItemsInputs::getTargetClassName ( )

Returns the short name (without namespace) of the class to be generated. The generated class will have the same namespace as your source class.

Reimplemented from pocketmine\utils\RegistrySource.

Definition at line 49 of file VanillaItemsInputs.php.

◆ preprocessMember()

static pocketmine\utils\RegistrySource::preprocessMember ( object $member)
staticinherited

Override this if you need to, for example, clone a registry member before returning it to the caller

@phpstan-template TParam of object

@phpstan-param TParam $member @phpstan-return TParam

Definition at line 125 of file RegistrySource.php.

◆ register()

pocketmine\item\VanillaItemsInputs::register ( string $name,
\Closure $createItem )
protected

@phpstan-template TItem of Item @phpstan-param \Closure(IID) : TItem $createItem @phpstan-return TItem

Definition at line 83 of file VanillaItemsInputs.php.

◆ registerDelayed()

pocketmine\utils\RegistrySource::registerDelayed ( string $name,
\Closure $valueFactory )
finalprotectedinherited

Adds a value using a callback, which will be invoked when the registry is first accessed at runtime. The type of the generated registry function will be the same as that of the provided closure.

Use this if the value's initialization depends on generated registry code (i.e. it accesses another registry member, either in this registry or another).

Note: A return type MUST be set on the provided closure, or an error will be thrown.

@phpstan-param \Closure(string $name) : TMember $valueFactory

Definition at line 157 of file RegistrySource.php.

◆ registerValue()

pocketmine\utils\RegistrySource::registerValue ( string $name,
mixed $value )
finalprotectedinherited

Adds a plain value to the registry source. You can use this if the value does not depend on any other generated registry code. The type of the generated registry function will be inferred from the value provided.

@phpstan-param TMember $value @phpstan-return TMember

Definition at line 137 of file RegistrySource.php.

◆ setup()

pocketmine\item\VanillaItemsInputs::setup ( )
protected

Implement this to add members to the registry.

See also
self::registerValue() for simple values which do not depend on any other registry members
self::registerDelayed() for values which depend on other registry members, either in this registry or another

Reimplemented from pocketmine\utils\RegistrySource.

Definition at line 89 of file VanillaItemsInputs.php.


The documentation for this class was generated from the following file: