Stack
class Stack (View source)
Represents a collection of stack operations for an organization.
Properties
string|null | $organization | ||
string | $name | ||
DateTime | $created | ||
StackOperation[] | $stackOperations | ||
array | $stackOptions | ||
protected StackExpression[] | $stackExpressions |
Methods
Constructor.
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 name of stack for url.
Get date of creation for this stack.
No description
No description
Adds a StackOperation to the list of existing Stack Operations.
No description
No description
Sets a single Stack option to the list of existing Stack options.
No description
Adds a Stack Expression to the list of existing Stack Expression.
No description
Gets stack operations / options / expressions as one array.
Details
__construct(string|null $organization = null, string|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
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($stackName, array $config, null $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
getOrganization()
Get name of organization this stack belongs to.
Stack
setOrganization(null|string $organization)
No description
string
getName()
Get name of stack for url.
Stack
setName(string $name)
No description
DateTime
getCreated()
Get date of creation for this stack.
StackOperation[]
getStackOperations()
No description
Stack
setStackOperations(array $operations)
No description
Stack
addStackOperation(StackOperation $stackOperation)
Adds a StackOperation to the list of existing Stack Operations.
array
getStackOptions()
No description
Stack
setStackOptions(array $options)
No description
Stack
addStackOption(string $key, mixed $value)
Sets a single Stack option to the list of existing Stack options.
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.
Useful for using this to sent as json to the Rokka API