com\setasign\SetaFramework\Di

ClosureWithIdentifier Class ClosureWithIdentifier

File: /SetaFramework/src/Di/ClosureWithIdentifier.php

This is a wrapper for a closure. This closure offers an identifier used by the Di\Invoker.

Class hierarchy

Summary

Properties

$ident

private string ClosureWithIdentifier::$ident

Static Methods

create()

public static ClosureWithIdentifier::create (
array $callable
): ClosureWithIdentifier

Helper method to build an instance of ClosureWithIdentifier without generating $ident by yourself.

Parameters
$callable : array
 

Methods

__construct()

public ClosureWithIdentifier::__construct (
string $ident,
\Closure $closure
)
Parameters
$ident : string
 
$closure : \Closure
 

__invoke()

public ClosureWithIdentifier::__invoke (
...$args
): void
Parameters
$args
 

getClosure()

getIdent()

public ClosureWithIdentifier::getIdent (
void
): string