PHP Class Scalr\Model\Entity\EventDefinition

Since: 5.0 (08.05.2014)
Author: Igor Vodiasov ([email protected])
Inheritance: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\ScopeInterface, implements Scalr\DataType\AccessPermissionsInterface
Mostra file Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$accountId integer The identifier of the client's account
$created DateTime Time when the record is created
$description string Description
$envId integer The identifier of the client's environment
$id integer ID
$name string Event's name

Public Methods

Method Description
__construct ( ) Constructor
getList ( integer $accountId, integer $envId ) : array Gets the list of the events by specified criteria
getScope ( )
getUsed ( integer $accountId = null, integer $envId = null ) : array | false Checks whether the Event exists
hasAccessPermissions ( $user, $environment = null, $modify = null )
isExist ( string $name, integer $accountId, integer $envId ) : boolean Checks whether the event with the specified name exists

Method Details

__construct() public method

Constructor
public __construct ( )

getList() public static method

Gets the list of the events by specified criteria
public static getList ( integer $accountId, integer $envId ) : array
$accountId integer
$envId integer
return array [name => description]

getScope() public method

See also: Scalr\DataType\ScopeInterface::getScope()
public getScope ( )

getUsed() public method

Checks whether the Event exists
public getUsed ( integer $accountId = null, integer $envId = null ) : array | false
$accountId integer optional Identifier of the account
$envId integer optional Identifier of the environment
return array | false Returns FALSE if the Event does not exist on account or Array otherwise. Array looks like ['rolesCount' => N, 'farmRolesCount' => M, 'webhooksCount' => Z, 'accountScriptsCount' => K]

hasAccessPermissions() public method

See also: Scalr\DataType\AccessPermissionsInterface::hasAccessPermissions()
public hasAccessPermissions ( $user, $environment = null, $modify = null )

isExist() public static method

Checks whether the event with the specified name exists
public static isExist ( string $name, integer $accountId, integer $envId ) : boolean
$name string The name of the Event
$accountId integer Identifier of the account
$envId integer Identifier of the environment
return boolean Returns true if the Event exists or false otherwise

Property Details

$accountId public_oe property

The identifier of the client's account
public int $accountId
return integer

$created public_oe property

Time when the record is created
public DateTime $created
return DateTime

$description public_oe property

Description
public string $description
return string

$envId public_oe property

The identifier of the client's environment
public int $envId
return integer

$id public_oe property

ID
public int $id
return integer

$name public_oe property

Event's name
public string $name
return string