\Trismegiste\Mondrian\TransformGraphContext

GraphContext is a context for building a graph.

Indexing the vertices by name

Summary

Methods
Properties
Constants
__construct()
findVertex()
existsVertex()
findAllMethodSameName()
indicesVertex()
getExcludedCall()
logFallbackCall()
No public properties found
No constants found
No protected methods found
$vertex
$fineTuning
$buildLogger
N/A
No private methods found
No private properties found
N/A

Properties

$vertex

$vertex : 

Type

$fineTuning

$fineTuning : 

Type

$buildLogger

$buildLogger : 

Type

Methods

__construct()

__construct(array  $cfg, \Trismegiste\Mondrian\Transform\Logger\LoggerInterface  $log) 

Build the context

Parameters

array $cfg

the config

\Trismegiste\Mondrian\Transform\Logger\LoggerInterface $log

a logger

Throws

\InvalidArgumentException

if config is invalid

findVertex()

findVertex(string  $type, string  $key) : \Trismegiste\Mondrian\Graph\Vertex

Find a vertex by its type and name

Parameters

string $type
string $key

Returns

\Trismegiste\Mondrian\Graph\Vertex

or null

existsVertex()

existsVertex(string  $type, string  $key) : boolean

Returns if a vertex of the type $type with the index $key exists

Parameters

string $type
string $key

Returns

boolean

findAllMethodSameName()

findAllMethodSameName(string  $method) : array<mixed,\Trismegiste\Mondrian\Graph\Vertex>

Find all methods with the same name whatever its class

Parameters

string $method

Returns

array<mixed,\Trismegiste\Mondrian\Graph\Vertex>

indicesVertex()

indicesVertex(string  $type, string  $index, \Trismegiste\Mondrian\Graph\Vertex  $v) 

Maintains a hashmap : ( type , index ) => Vertex obj

Parameters

string $type

[interface|class|method|param|impl|trait]

string $index

the unique index in this type

\Trismegiste\Mondrian\Graph\Vertex $v

the vertex to index

getExcludedCall()

getExcludedCall(string  $class, string  $method) : array

Get the list of excluded calls for this Class::Method

Parameters

string $class
string $method

Returns

array —

list of excluded methods "fqcn::methodName"

logFallbackCall()

logFallbackCall(string  $class, string  $method, string  $called) 

Log a call found by the fallback

Parameters

string $class
string $method
string $called