Stack
class Stack extends AbstractStack (View source)
Represents a collection of stack operations for an organization.
Properties
string|null | $name | from AbstractStack | |
StackOperation[] | $stackOperations | from AbstractStack | |
array | $stackOptions | from AbstractStack | |
string|null | $organization | ||
protected StackExpression[] | $stackExpressions |
Methods
Constructor.
Returns all operations matching name.
Adds a StackOperation to the list of existing Stack Operations.
Sets a single Stack option to the list of existing Stack options.
Create a stack from the JSON data returned by the rokka.io API.
Creates a Stack object from an array.
Get name of organization this stack belongs to.
No description
Get date of creation for this stack.
No description
Adds a Stack Expression to the list of existing Stack Expression.
No description
Gets stack operations / options / expressions as one array.
Returns the stack url part as a dynamic stack for previewing.
Details
__construct(string|null $organization = null, $name = null, array $stackOperations = [], array $stackOptions = [], DateTime $created = null)
Constructor.
It's recommended to use one of the helper static methods to create this object instead of the constructor directly
null|string
getName()
Get name of stack for url.
AbstractStack
setName(string $name)
No description
StackOperation[]
getStackOperations()
No description
StackOperation[]
getStackOperationsByName(string $name)
Returns all operations matching name.
AbstractStack
setStackOperations(array $operations)
No description
AbstractStack
addStackOperation(StackOperation $stackOperation)
Adds a StackOperation to the list of existing Stack Operations.
array
getStackOptions()
No description
AbstractStack
setStackOptions(array $options)
No description
AbstractStack
addStackOption(string $key, mixed $value)
Sets a single Stack option to the list of existing Stack options.
static Stack
createFromJsonResponse(string|array $data, bool $isArray = false)
Create a stack from the JSON data returned by the rokka.io API.
static Stack
createFromConfig(string $stackName, array $config, string $organization = null)
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.
string|null
getOrganization()
Get name of organization this stack belongs to.
Stack
setOrganization(null|string $organization)
No description
null|DateTime
getCreated()
Get date of creation for this stack.
Stack
setStackExpressions(array $stackExpressions)
No description
Stack
addStackExpression(StackExpression $stackExpression)
Adds a Stack Expression to the list of existing Stack Expression.
StackExpression[]
getStackExpressions()
No description
array
getConfig()
Gets stack operations / options / expressions as one array.
The values of the keys are objects for operations and expressions.
Useful for using this to sent a stack as json to the Rokka API
string
getDynamicUriString()
Returns the stack url part as a dynamic stack for previewing.