Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/SM/Factory/AbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,20 @@ public function get($object, $graph = 'default')
$graph
));
}


/**
* @return array returns available graph names
*/
public function getGraphs()
{
$graphNames = [];

foreach ($this->configs as $config) {
$graphNames[] = $config['graph'];
}
return $graphNames;
}

/**
* {@inheritDoc}
*/
Expand All @@ -84,7 +97,7 @@ public function addConfig(array $config, $graph = 'default')

if (!isset($config['class'])) {
throw new SMException(sprintf(
'Index "class" needed for the state machine configuration of graph "%s"',
'Index "class" needed for the state machine configuration of graph "%s"',
$config['graph']
));
}
Expand Down