src/Core/Stack.php
public static function createFromConfig($stackName, array $config, $organization = null)
    {
        $stack = new static($organization, $stackName);

        if (isset($config['operations'])) {
            $stack->setStackOperations($config['operations']);
        }

        if (isset($config['options'])) {
            $stack->setStackOptions($config['options']);
        }

        if (isset($config['expressions'])) {
            $stack->setStackExpressions($config['expressions']);
        }
        if (isset($config['variables'])) {
            $stack->setStackVariables($config['variables']);
        }

        return $stack;
    }
public static function createFromConfig($stackName, array $config, $organization = null)
    {
        $stack = new static($organization, $stackName);

        if (isset($config['operations'])) {
            $stack->setStackOperations($config['operations']);
        }

        if (isset($config['options'])) {
            $stack->setStackOptions($config['options']);
        }

        if (isset($config['expressions'])) {
            $stack->setStackExpressions($config['expressions']);
        }
        if (isset($config['variables'])) {
            $stack->setStackVariables($config['variables']);
        }

        return $stack;
    }
public static function createFromConfig ( $ stackName , array $ config , $ organization = null ) { $ stack = new static ( $ organization , $ stackName ) ; if ( isset ( $ config [ 'operations' ] ) ) { $ stack -> setStackOperations ( $ config [ 'operations' ] ) ; } if ( isset ( $ config [ 'options' ] ) ) { $ stack -> setStackOptions ( $ config [ 'options' ] ) ; } if ( isset ( $ config [ 'expressions' ] ) ) { $ stack -> setStackExpressions ( $ config [ 'expressions' ] ) ; } if ( isset ( $ config [ 'variables' ] ) ) { $ stack -> setStackVariables ( $ config [ 'variables' ] ) ; } return $ stack ; }
Creates a Stack object from an array.

$config = ['operations' => StackOperation[]
'options' => $options,
'expressions' => $expressions
]

All are optional, if operations doesn't exist, it will be a noop operation.

@since 1.1.0

@param string      $stackName
@param array       $config
@param string|null $organization

@return self
Creates a Stack object from an array .