PHP 클래스 Scalr\Stats\CostAnalytics\Entity\ProjectEntity

부터: 5.0 (11.02.2014)
저자: Vitaliy Demidov ([email protected])
상속: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\AccessPermissionsInterface
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$accountId integer Global by default
$archived boolean Whether the project has been archived
$ccId string Cost centre identifier (UUID)
$created DateTime The date the record was created on
$createdByEmail string Email address of the user who created record
$createdById integer Identifier of the user who created this project
$envId integer It's used only in combination with share type - 3
$name string The name of the cost centre
$projectId string Project identifier (UUID)
$shared integer Share type

공개 메소드들

메소드 설명
__construct ( ) Constructor
checkRemoval ( ) : boolean Checks whether project can be removed
delete ( )
getCostCenter ( ) : Scalr\Stats\CostAnalytics\Entity\CostCentreEntity Gets parent Cost Center
getFarmsList ( ) : array Get the list of the farms which are assigned to specified project
getProperties ( ) : ArrayCollection | null Gets all collection of the properties for this cost centre
getProperty ( string $name, boolean $ignoreCache = false ) : string | null Gets property with name
getQuarterlyBudget ( integer $year ) : ArrayCollection Gets quarterly budget of specified year for the Project
hasAccessPermissions ( $user, $environment = null, $modify = null )
loadProperties ( ) Loads all properties to entity
save ( )
saveProperty ( string $name, string $value ) : Scalr\Stats\CostAnalytics\Entity\CostCentreEntity Saves property
setCostCenter ( Scalr\Stats\CostAnalytics\Entity\CostCentreEntity $cc = null ) : ProjectEntity Sets a parent costcenter
setProperty ( string $name, string $value ) : Scalr\Stats\CostAnalytics\Entity\CostCentreEntity Sets property with specified name

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

checkRemoval() 공개 메소드

If Project can't be archived and removed it will throw an exception
public checkRemoval ( ) : boolean
리턴 boolean Returns TRUE if Project can be removed or false if it can be archived or throws an exception otherwise

delete() 공개 메소드

또한 보기: Scalr\Model\AbstractEntity::delete()
public delete ( )

getCostCenter() 공개 메소드

Gets parent Cost Center
public getCostCenter ( ) : Scalr\Stats\CostAnalytics\Entity\CostCentreEntity
리턴 Scalr\Stats\CostAnalytics\Entity\CostCentreEntity Returns cost centre entity

getFarmsList() 공개 메소드

Get the list of the farms which are assigned to specified project
public getFarmsList ( ) : array
리턴 array Returns the array looks like [farm_id => name]

getProperties() 공개 메소드

Gets all collection of the properties for this cost centre
public getProperties ( ) : ArrayCollection | null
리턴 Scalr\Model\Collections\ArrayCollection | null

getProperty() 공개 메소드

Gets property with name
public getProperty ( string $name, boolean $ignoreCache = false ) : string | null
$name string The name of the property
$ignoreCache boolean optional Should it ignore cache or not
리턴 string | null Returns the property entity or null

getQuarterlyBudget() 공개 메소드

Gets quarterly budget of specified year for the Project
public getQuarterlyBudget ( integer $year ) : ArrayCollection
$year integer The year
리턴 Scalr\Model\Collections\ArrayCollection Returns collection of the QuarterlyBudgetEntity objects

hasAccessPermissions() 공개 메소드

또한 보기: AccessPermissionsInterface::hasAccessPermissions()
public hasAccessPermissions ( $user, $environment = null, $modify = null )

loadProperties() 공개 메소드

Loads all properties to entity
public loadProperties ( )

save() 공개 메소드

또한 보기: Scalr\Model\AbstractEntity::save()
public save ( )

saveProperty() 공개 메소드

It will immediately save specified record to database, so that cost centre must exist before you call this method.
public saveProperty ( string $name, string $value ) : Scalr\Stats\CostAnalytics\Entity\CostCentreEntity
$name string The unique name of the property
$value string The value of the property
리턴 Scalr\Stats\CostAnalytics\Entity\CostCentreEntity

setCostCenter() 공개 메소드

Sets a parent costcenter
public setCostCenter ( Scalr\Stats\CostAnalytics\Entity\CostCentreEntity $cc = null ) : ProjectEntity
$cc Scalr\Stats\CostAnalytics\Entity\CostCentreEntity
리턴 ProjectEntity

setProperty() 공개 메소드

Sets property with specified name
public setProperty ( string $name, string $value ) : Scalr\Stats\CostAnalytics\Entity\CostCentreEntity
$name string The unique name of the property
$value string The value of the property
리턴 Scalr\Stats\CostAnalytics\Entity\CostCentreEntity

프로퍼티 상세

$accountId 공개적으로 프로퍼티

Global by default
public int $accountId
리턴 integer

$archived 공개적으로 프로퍼티

Whether the project has been archived
public bool $archived
리턴 boolean

$ccId 공개적으로 프로퍼티

Cost centre identifier (UUID)
public string $ccId
리턴 string

$created 공개적으로 프로퍼티

The date the record was created on
public DateTime $created
리턴 DateTime

$createdByEmail 공개적으로 프로퍼티

Email address of the user who created record
public string $createdByEmail
리턴 string

$createdById 공개적으로 프로퍼티

Identifier of the user who created this project
public int $createdById
리턴 integer

$envId 공개적으로 프로퍼티

It's used only in combination with share type - 3
public int $envId
리턴 integer

$name 공개적으로 프로퍼티

The name of the cost centre
public string $name
리턴 string

$projectId 공개적으로 프로퍼티

Project identifier (UUID)
public string $projectId
리턴 string

$shared 공개적으로 프로퍼티

Share type
public int $shared
리턴 integer