MMOframework
Why AI Playground Libraries Documentation Search Agency
FR EN
Index

Graphviz

MMO\doc · 1 symbol · generated 27 Oct 2026

class

Graphviz

Graphviz.php:15
class MMO\doc\Graphviz extends MMO\core\classes\aExporter
Namespace
MMO\doc
Extends
aExporter

Index

bin
colors
headersthe header of an entity's table in an entity graph
icons
palettethe colors of the links of an entity graph, one per entity (linkColor)
attribute($text)
exportClass($ref, $options)
exportEntityClass($ref, $options)An entity as a table: its name (and the parent it extends) in the header, then one row per field -- its unique keys and name on the left, its type on the right, its description as the row's tooltip.
exportTypes($ref, $options)
generateGraph($dotFilename, $output, $layout, $cwd)Generate a graphviz document from a dot file
getClassId($ref)
getId($ref, $withQuote)
hash($value, $options)
linkColor($class)
propertyOrigin($property, $ref)
visibilityIcon($ref)
__construct($config)

Properties5

bin

string $bin = 'dot'
Type
string

colors

array $colors = […6 items]
Type
array

headers

the header of an entity's table in an entity graph

array $headers = ['entity' => '#2f6f5e', 'embedded' => '#4f7cac']
Type
array

icons

array $icons = […18 items]
Type
array

palette

the colors of the links of an entity graph, one per entity (linkColor)

array $palette = […10 items]
Type
array

Methods12

attribute($text)

Graphviz.php:345
protected function attribute(string $text): string
$textstring
returnsstringthe text for an attribute of an html-like label (quotes and new lines escaped)

exportClass($ref, $options)

Graphviz.php:358
function exportClass(ReflectionClass $ref, array $options = []): string
$refReflectionClass
$options = []arrayAvailable options : - graph: class(default) | entity if entity, any class that represents an entity is printed using exportEntityClass - linkNamespaces: ?[string] namespaces to print links for. If null, print all links - linkInterfaces: bool if true show interfaces link. (default: false for entity, true for class) - linkTraits: bool if true show traits link. (default: false for entity, true for class)
returnsstring

exportEntityClass($ref, $options)

Graphviz.php:183

An entity as a table: its name (and the parent it extends) in the header, then one row per field -- its unique keys and name on the left, its type on the right, its description as the row's tooltip. The fields every entity gets from the framework (id, uid, ctime...) are folded into a single line at the bottom, a field inherited from a parent of the application is greyed, and a field that references another entity draws its link from its own row, with the cardinality at the arrow's head: a bar for one, a crow's foot for many, a circle when it can be empty. An enum is only named in the type, its values listed in the tooltip: linked, they would be most of the lines (and Documentor::graphFromReflections leaves their boxes out).

function exportEntityClass(ReflectionClass $ref, array $options = []): string
$refReflectionClass
$options = []arrayAvailable options : - linkNamespaces: ?[string] namespaces to print links for. If null, print all links - linkInterfaces: bool if true show interface links. (default: false) - linkTraits: bool if true show trait links. (default: false) - baseEntities: [string] the application's own base entities, read as the framework's: their fields folded into the last line, never an "extends" - links: ?\ArrayObject when given, the links are appended to it rather than returned with the node (to declare them after every cluster: a node first named by an edge lands in the cluster that edge is written in)
returnsstring

generateGraph($dotFilename, $output, $layout, $cwd)

Graphviz.php:89

Generate a graphviz document from a dot file

function generateGraph( string $dotFilename, string $output, string $layout = 'neato', ?string $cwd = null ): string
$dotFilenamestringthe dot filename
$outputstringthe file destination
$layout = 'neato'stringthe layout to use to draw (dot|neato|fdp|sfdp|circo|twopi|nop|nop2|osage|patchwork)[https://graphviz.org/docs/layouts/]
$cwd = nullnull | stringcurrent working directory (for the script to run)
returnsstring

linkColor($class)

Graphviz.php:337
function linkColor(string $class): string
$classstring
returnsstringthe color of the links leaving an entity: always the same for one entity, so its lines can be followed across the graph
Inherited members (70)
ConstantsDeclared byDescription
ALERTiLogLevelAlert: Action must be taken immediately.
ALLiLogLevelMask for all
ALL_PLUSiLogLeveldebug everything
BACKTRACEiLogLevel
CRITICALiLogLevelCritical: Critical conditions.
DEBUGiLogLevelDebug: Detailed debug information.
DEEPiLogLeveldebug everything with arguments
EMERGENCYiLogLevelEmergency: System is unusable.
ERRORiLogLevelError: Runtime errors that do not require immediate action but should typically be logged and monitored.
ERROR_PLUSiLogLevelMask for all error
FATALiLogLevelMask for all fatal error
INFOiLogLevelInfo: Interesting events.
INFO_PLUSiLogLevelMask for all errors/warning/notices/info
MEMORYiLogLevelinclude backtrace object
NOTICEiLogLevelNotice: Normal but significant events.
NOTICE_PLUSiLogLevelMask for all errors/warning/notices/info
TRACEiLogLevelinclude backtrace as origins
WARNINGiLogLevelWarning: Exceptional occurrences that are not errors.
WARNING_PLUSiLogLevelMask for all errors and warnings
PropertiesDeclared byDescription
functionsaConverter
globalOptionsaConverter
verbosityaModule
MethodsDeclared byDescription
addOptions($type, $options)aConverterMerge $options into $type's existing options (via merge), rather than replacing them wholesale like setOptions.
alert($message, $context)aModuleAction must be taken immediately.
backtraces($message, $context)aModuleForce-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it).
call($type, $value, $options)aConverterCall the function associated to a type
clear()aConverterRemove every registered type/function.
Configure($config)aModuleMerge $config into this module's configuration in the shared Configuration.
critical($message, $context)aModuleCritical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask.
debug($message, $context)aModuleDetailed debug information.
debugName()aModuleHuman-readable identifier used as the default {origin} in this instance's log messages.
DefaultConfig()aModuleThe config a module starts from before anything loaded via Configuration is merged in.
emergency($message, $context)aModuleSystem is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask.
error($message, $context)aModuleRuntime errors that do not require immediate action but should typically be logged and monitored.
Export($value, $options, $type)aExporterExport any value, dispatching to the right converter based on its type (or the explicit $type).
exportArray($value, $options)aExporterBuilt-in 'array' converter (a list): recursively exports every value, in place.
exportEnum($value, $options)aExporterBuilt-in 'enum' converter.
exportInstance($value, $options)aExporterBuilt-in 'instance' converter: exports every property of $value (including protected/private ones, via reflection) recursively, tracking each property's path in $options['path'] (e.g.
exportObject($value, $options)aExporterBuilt-in 'object' converter (an associative array): recursively exports every value, in place.
ExportProperties($value, $options)aExporterExport an object exportInstance method
exportsProperty($prop, $value)aExporterWhether exportInstance exports $prop of $value: not a static property -- it is the class's, not $value's -- nor an uninitialized one, which has no value (the properties (array)$value holds).
getClassFunction($class)aConverterFind which registered type (a class or interface name) applies to $class: itself if directly registered, else the closest registered ancestor class or implemented interface.
getFunction($type)aConverter
getFunctions()aConverter
getOptions($type)aConverter
getType($value, $allowClass)aConverterNormalize $value's type into one of this converter's type names.
getVerbosity()aModule
hasType($type)aConverter
info($message, $context)aModuleInteresting events. No-op if INFO is currently filtered out by the verbosity mask.
Instantiate($config)aModule(Re)create the shared instance immediately, configured with $config merged into the class's existing config.
IsShared()aModule
log($level, $message, $context)aModuleLogs with an arbitrary level.
notice($message, $context)aModuleNormal but significant events.
offsetExists($key)aModule\ArrayAccess::offsetExists -- tells whether $key is a declared property at all, regardless of whether it is currently readable/writable through array access.
offsetGet($key)aModule\ArrayAccess::offsetGet -- reads a property directly, unless it has a #[Serialize(serialize: 'methodName')] attribute, in which case that zero-argument method is called instead (e.g.
offsetSet($key, $value)aModule\ArrayAccess::offsetSet -- sets a property directly, unless it has a #[Serialize(unserialize: 'methodName')] attribute, in which case that method is called with $value instead (e.g.
offsetUnset($key)aModule\ArrayAccess::offsetUnset -- equivalent to $module[$key] = null.
resetHash($value, $options)aExporterForget that $value was already seen, within the given $options['hashes'] tracking map: the next time $value is encountered in this same export, it is exported in full again instead of collapsing to…
serialize($path, $serializer)aModule\MMO\core\interfaces\iSerializable::serialize -- exports every property (via
setFunction($type, $fn, $options)aConverterSet a coercer
setFunctions($fns)aConverterRegister many functions at once, e.g.
setOptions($type, $options)aConverterReplace $type's options wholesale.
setVerbosity($verb)aModuleSet the current verbosity mask, replacing whatever it was before.
Shared()aModuleGet the shared instance, creating (and configuring) it on first call.
testVerbosity($level)aModuleTest whether a given level (or set of levels) is currently enabled by this instance's verbosity mask.
traitUnshare($serialize)aModuleRemove the shared instance, so the next Shared() call creates a fresh one.
unserialize($data, $path, $instances)aModule\MMO\core\interfaces\iSerializable::unserialize -- merges $data onto DefaultConfig, runs it through the (possibly overridden) constructor, then applies each resulting value to its property (via
Unshare($serialize)aModuleLike tSingleton::Unshare, but also disconnects this module's instance from every event it was listening to (via Event::DisconnectListeners) before dropping it.
warning($message, $context)aModuleExceptional occurrences that are not errors.
__invoke($value, $options, $type)aExporterThe actual export entry point (also what iExporter's $exporter($value) calling convention invokes).