Scalr\Api\Service\User\V1beta0\Controller\GlobalVariableTrait::getActualValue PHP Метод

getActualValue() защищенный Метод

Extracts most relevant property of the Global Variable with given the possible new values
protected getActualValue ( string $property, array $variable, object $object = null, string $objectProperty = null, mixed $defaultValue = null ) : mixed
$property string The name of extracting property
$variable array Array representation of Global Variable that presents current state
$object object optional JSON representation of Global Variable containing a new values
$objectProperty string optional The name of extracting property in JSON representation
$defaultValue mixed optional Default return value if it's not presented in any scope
Результат mixed Returns the value of the property
    protected function getActualValue($property, array $variable, $object = null, $objectProperty = null, $defaultValue = null)
    {
        if (empty($objectProperty)) {
            $objectProperty = $property;
        }
        return isset($object->{$objectProperty}) ? $object->{$objectProperty} : (isset($variable['locked'][$property]) ? $variable['locked'][$property] : (isset($variable['current'][$property]) ? $variable['current'][$property] : $defaultValue));
    }