SM\Factory\AbstractFactory::__construct PHP Method

__construct() public method

public __construct ( array $configs )
$configs array Array of configs for the available state machines
    public function __construct(array $configs)
    {
        foreach ($configs as $graph => $config) {
            $this->addConfig($config, $graph);
        }
    }

Usage Example

示例#1
0
 public function __construct(array $configs, EventDispatcherInterface $dispatcher = null, CallbackFactoryInterface $callbackFactory = null)
 {
     parent::__construct($configs);
     $this->dispatcher = $dispatcher;
     $this->callbackFactory = $callbackFactory;
 }