PHP Class Scalr\Api\Service\User\V1beta0\Adapter\ScalingMetricAdapter

Since: 5.11.9 (05.02.2016)
Author: Andrii Penchuk ([email protected])
Inheritance: extends Scalr\Api\DataType\ApiEntityAdapter
Mostrar archivo Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$nameMap array Scaling metric name mapping

Protected Properties

Property Type Description
$entityClass
$functionMap array The list of allowed functions
$rules array Converter rules

Public Methods

Method Description
_filePath ( $from, $to, $action )
_function ( $from, $to, $action )
_name ( $from, $to, $action )
_retrieveMethod ( $from, $to, $action )
_scope ( $from, $to, $action )
functionToEntity ( stdClass $object ) : string Get function name from map
metricNameToData ( string | string[] $name ) : string | string[] Change metrics name used in api responses
metricNameToEntity ( string $name ) : string Get metrics name used in API to internal representation If metric name exist in nameMapping function will return changed name
validateEntity ( $entity )

Method Details

_filePath() public method

public _filePath ( $from, $to, $action )

_function() public method

public _function ( $from, $to, $action )

_name() public method

public _name ( $from, $to, $action )

_retrieveMethod() public method

public _retrieveMethod ( $from, $to, $action )

_scope() public method

public _scope ( $from, $to, $action )

functionToEntity() public method

Get function name from map
public functionToEntity ( stdClass $object ) : string
$object stdClass
return string

metricNameToData() public static method

Change metrics name used in api responses
public static metricNameToData ( string | string[] $name ) : string | string[]
$name string | string[] Metric's name or list of names
return string | string[]

metricNameToEntity() public static method

Get metrics name used in API to internal representation If metric name exist in nameMapping function will return changed name
public static metricNameToEntity ( string $name ) : string
$name string Metric's name
return string

validateEntity() public method

See also: ApiEntityAdapter::validateEntity()
public validateEntity ( $entity )

Property Details

$entityClass protected_oe property

protected $entityClass

$functionMap protected_oe static_oe property

The list of allowed functions
protected static array $functionMap
return array

$nameMap public_oe static_oe property

Scaling metric name mapping
public static array $nameMap
return array

$rules protected_oe property

Converter rules
protected array $rules
return array