Get default db value (can be overridden if non static default values need to be used).

@param string $propertyName
@return mixed
545644
public function getDefaultDbPropertyValue($propertyName)
    {
        // A default value is set
        if (array_key_exists('default', static::$dbProperties[$propertyName])) {
            $defaultValue = static::$dbProperties[$propertyName]['default'];
        // No default value set, use default for type
        } else {
            $defaultValue = self::$typeDefaults[static::$dbProperties[$propertyName]['type']];
        }

        return $defaultValue;
    }
125938
protected function getPropertyValue(array $properties, $propertyName)
    {
        if (!isset($properties[$propertyName])) {
            return null;
        }
        $value = reset($properties[$propertyName]);
        return $value instanceof \core_kernel_classes_Resource ? $value->getUri() : (string) $value;
    }
787766
public function getProperty(NodeInterface $node, $propertyName)
    {
        if ($propertyName[0] === '_') {
            $propertyValue = ObjectAccess::getProperty($node, ltrim($propertyName, '_'));
        } else {
            $propertyValue = $node->getProperty($propertyName);
        }

        $dataType = $node->getNodeType()->getPropertyType($propertyName);
        try {
            $convertedValue = $this->convertValue($propertyValue, $dataType);
        } catch (PropertyException $exception) {
            $logMessage = $this->throwableStorage->logThrowable($exception);
            $this->logger->error($logMessage, LogEnvironment::fromMethodName(__METHOD__));
            $convertedValue = null;
        }

        if ($convertedValue === null) {
            $convertedValue = $this->getDefaultValueForProperty($node->getNodeType(), $propertyName);
            if ($convertedValue !== null) {
                try {
                    $convertedValue = $this->convertValue($convertedValue, $dataType);
                } catch (PropertyException $exception) {
                    $logMessage = $this->throwableStorage->logThrowable($exception);
                    $this->logger->error($logMessage, LogEnvironment::fromMethodName(__METHOD__));
                    $convertedValue = null;
                }
            }
        }

        return $convertedValue;
    }
845514
protected function getProperty(string $propertyName, $defaultValue)
    {
        if (count($this->values) === 1 && isset($this->values['__value'])) {
            return $this->parseType($this->values['__value']);
        }

        if (isset($this->values[$propertyName])) {
            return $this->parseType($this->values[$propertyName]);
        }

        return $defaultValue;
    }
326066
public function get_variable($varname, $default = null)
    {
        if (!isset($this->variables)) {
            $this->variables = array();
        }

        if (array_key_exists($varname, $this->variables)) {
            return $this->variables[$varname];
        }

        // configured value has higher prio
        $conf_value = rcube::get_instance()->config->get('db_' . $varname);
        if ($conf_value !== null) {
            return $this->variables[$varname] = $conf_value;
        }

        $result = $this->query('SHOW VARIABLES LIKE ?', $varname);

        while ($row = $this->fetch_array($result)) {
            $this->variables[$row[0]] = $row[1];
        }

        // not found, use default
        if (!isset($this->variables[$varname])) {
            $this->variables[$varname] = $default;
        }

        return $this->variables[$varname];
    }
191123
public function getDatabase($connectionName = 'default')
    {
        if ($this->databases->containsKey($connectionName)) {
            return $this->databases->get($connectionName);
        }

        $configuration = $this->getConfiguration($connectionName);
        $database = $this->getConnection($connectionName);

        $database->DBOpen(
            $configuration->getDatabase(),
            $configuration->getUser(),
            $configuration->getPassword()
        );

        $this->databases->set($connectionName, $database);

        return $this->databases->get($connectionName);
    }
762493
public function getChangeFor($propertyName)
    {
        foreach ($this->getIterator() as $change) {
            /* @var \Isolate\UnitOfWork\Entity\Value\Change\ScalarChange $change */
            if ($change->isFor($propertyName)) {
                return $change;
            }
        }

        throw new RuntimeException(sprintf("There are no changes for \"%s\" property.", $propertyName));
    }
309111
public function getProperty($propertyName)
    {
        if ($this->getPropertyMap()->hasKey($propertyName)) {
            return $this->getPropertyMap()->get($propertyName);
        }

        return $this->attachProperty(new Property($this, $propertyName));
    }
836977
public static function getValue($object, $propertyName)
    {


        if (property_exists($object, $propertyName) || isset($object->$propertyName)) {
            try {
                return $object->$propertyName;
                // @codingStandardsIgnoreLine
            } catch (\BadFunctionCallException $e) {
                //Do nothing and continue
                // @codingStandardsIgnoreLine
            } catch (\InvalidArgumentException $e) {
                //Do nothing and continue
            }
        }


        throw new \InvalidArgumentException(
            vsprintf('The class "%s" does not have the property "%s" or it\'s not readable', array(
                get_class($object),
                $propertyName
            ))
        );
    }
23473
public static function getValue($objectOrClass, string $propertyName)
    {
        $objectOrClass = self::getObject($objectOrClass);
        $closure =
            /**
             * @return mixed
             */
            function () use ($propertyName) {
                if (\property_exists($this, $propertyName)) {
                    $class = new \ReflectionClass(typeOf($this));
                    $property = $class->getProperty($propertyName);
                    $property->setAccessible(true);
                    return $property->getValue($this);
                }
                throw new \RuntimeException(
                    Picklock::errorMessage($this, $propertyName, false)
                );
            };
        return
            $closure->bindTo($objectOrClass, $objectOrClass)();
    }
837702
public function getPropertyMetadata($propertyName)
    {
        if (!isset($this->propertyMetadata[$propertyName])) {
            throw MappingException::mappingNotFound($this->name, $propertyName);
        }

        return $this->propertyMetadata[$propertyName];
    }
569372
public function getDefaultDatabaseName()
    {
        if ($this->_defaultDatabaseName === null) {
            if (preg_match('/^mongodb:\\/\\/.+\\/([^?&]+)/s', $this->dsn, $matches)) {
                $this->_defaultDatabaseName = $matches[1];
            } else {
                throw new InvalidConfigException("Unable to determine default database name from dsn.");
            }
        }

        return $this->_defaultDatabaseName;
    }
178817
public static function getValue($object, $propertyName)
    {
        /**
         * The error container
         *
         * @var \InvalidArgumentException|null $error
         */
        $error = null;

        foreach (self::$providers as $provider) {
            $error = null;
            $value = self::tryGetValue($provider, $object, $propertyName, $error);
            if (is_null($error)) {
                return $value;
            }
        }

        throw $error;
    }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
255920
public function getStatus($propertyName)
    {
        return isset($this->result[$propertyName]) ? $this->result[$propertyName][0] : null;
    }
863103
protected function getUniqueId($propertyName)
    {
        $inputProvider  = $this->getEnvironment()->getInputProvider();
        $sessionStorage = $this->getEnvironment()->getSessionStorage();

        $selector = 'ctrl_' . $propertyName;

        if (('select' !== $inputProvider->getParameter('act'))
            || (false === $inputProvider->hasValue('edit') && false === $inputProvider->hasValue('edit_save'))
        ) {
            return $selector;
        }

        $modelId = ModelId::fromModel($this->model);
        $fields  = $sessionStorage->get($modelId->getDataProviderName() . '.edit')['properties'];

        $fieldId = new ModelId('property.' . $modelId->getDataProviderName(), $propertyName);
        if (!\in_array($fieldId->getSerialized(), $fields)) {
            return $selector;
        }

        $selector = 'ctrl_' . \str_replace('::', '____', $modelId->getSerialized()) . '_' . $propertyName;

        return $selector;
    }
1232308
public function __getSerialisablePropertyValue($propertyName) {
        $map = $this->__getSerialisablePropertyMap();
        if (array_key_exists($propertyName, $map)) {
            return $map [$propertyName];
        } elseif (array_key_exists(substr(strtoupper($propertyName), 0, 1) . substr($propertyName, 1), $map)) {
            return $map [substr(strtoupper($propertyName), 0, 1) . substr($propertyName, 1)];
        } else {
            throw new PropertyNotReadableException (get_class($this), $propertyName);
        }
    }