src/Transfer/Procedure/Procedure.php
public static function createFromDefinition(array $definition, Procedure $parent = null)
    {
        $procedure = new self(
            $definition['name'],
            $definition['sources'],
            $definition['workers'],
            $definition['targets'],
            $parent
        );

        foreach ($definition['children'] as $child) {
            $procedure->addChild(self::createFromDefinition($child, $procedure));
        }

        return $procedure;
    }
public static function createFromDefinition(array $definition, Procedure $parent = null)
    {
        $procedure = new self(
            $definition['name'],
            $definition['sources'],
            $definition['workers'],
            $definition['targets'],
            $parent
        );

        foreach ($definition['children'] as $child) {
            $procedure->addChild(self::createFromDefinition($child, $procedure));
        }

        return $procedure;
    }
public static function createFromDefinition ( array $ definition , Procedure $ parent = null ) { $ procedure = new self ( $ definition [ 'name' ] , $ definition [ 'sources' ] , $ definition [ 'workers' ] , $ definition [ 'targets' ] , $ parent ) ; foreach ( $ definition [ 'children' ] as $ child ) { $ procedure -> addChild ( self :: createFromDefinition ( $ child , $ procedure ) ) ; } return $ procedure ; }
Creates a procedure from a definition.

Procedure definition must be an array consisting of following elements:
* name : string
* sources : array of source adapters
* workers : array of workers
* targets : array of target adapters

@param array     $definition Procedure definition (how a procedure should be built)
@param Procedure $parent     Parent procedure

@return Procedure
Creates a procedure from a definition .