PHP Class DeploynautAPIFormatter

显示文件 Open project: silverstripe/deploynaut

Public Methods

Method Description
getDeploymentData ( DNDeployment $deployment ) : array Return data about a single deployment for use in API response.
getStackMemberData ( DNProject $project, integer $memberID ) : null | array Return data about a particular {@link Member} of the stack for use in API response.

Method Details

getDeploymentData() public method

Return data about a single deployment for use in API response.
public getDeploymentData ( DNDeployment $deployment ) : array
$deployment DNDeployment
return array

getStackMemberData() public method

Notes: 1) This method returns null instead of an array if the member doesn't exists anymore 2) 'role' can be null in the response. This is the case of an admin, or an operations user who can create the deployment but is not part of the stack roles.
public getStackMemberData ( DNProject $project, integer $memberID ) : null | array
$project DNProject
$memberID integer
return null | array