Returns the default value of the attribute.

@return mixed value to be used/interpreted as the default value
513338
public function getDefaultValue()
    {
        if ($this->hasOption(self::OPTION_DEFAULT_VALUE)) {
            return $this->getSanitizedValue(
                $this->getOption(self::OPTION_DEFAULT_VALUE, $this->getNullValue())
            );
        }

        return $this->getNullValue();
    }
629300
public static function get_default() {
        if ($visiblechildren = self::top()->get_children()) {
            $defcategory = reset($visiblechildren);
        } else {
            $toplevelcategories = self::get_tree(0);
            $defcategoryid = $toplevelcategories[0];
            $defcategory = self::get($defcategoryid, MUST_EXIST, true);
        }
        return $defcategory;
    }
695589
public function getDefault() {
    	if ($this->isPublic() && !$this->isStatic() && $this->refClass->isAbstract() == false) {	    		 
	  		$className = $this->refClass->getName();
	  		// TODO: find a way to get default value for abstract properties.
	  		// TODO: optimize this: we should not have to create one new instance for every property....
	  		/*$instance = new $className();
			$property = $this->getName();
	    	return $instance->$property;*/
	  		
	  		// In some cases, the call to getDefaultProperties can log NOTICES
	  		// in particular if an undefined constant is used as default value.
	  		ob_start();
	  		$defaultProperties = $this->refClass->getDefaultProperties();
	  		$possibleError = ob_get_clean();
			if ($possibleError) {
				throw new \Exception($possibleError);	
			}
	  		return $defaultProperties[$this->getName()];
    	} else {
    		return null;
    	}
    }
136344
public function getValue() {
        if (!is_null($this->value))
            return $this->value;
        $value = $this->getArrayValue($this->form->method == 'POST' ? $_POST : $_GET, $this->getName());
        if ($value) {
            return $value;
        }
        $key = null;
        if (false !== strpos($this->name, '[')){
            $name = explode('[', $this->name, 2);
            $key = substr($name[1], 0, strlen($name[1]) - 1);
            $name = $name[0];
        } else {
            $name = $this->name;
        }
        if ($this->form->model && is_object($this->form->model) && (!$this->form->model->isNewRecord() || $this->form->model->$name)) {
            $val = $this->form->model->$name;
            if (!is_null($key)){
                return isset($val[$key])?$val[$key]:null;
            } else {
                return $val;
            }
        }
        return $this->defaultValue;
    }
429070
protected function _getDefaultValues()
    {
        $teamComponent = $this->_data->parent->parent->parent;
        if (Kwc_Abstract::hasSetting($teamComponent->componentClass, 'defaultVcardValues')) {
            $setting = Kwc_Abstract::getSetting($teamComponent->componentClass, 'defaultVcardValues');
        }

        if (isset($setting)) {
            return $setting;
        } else {
            return Kwc_Abstract::getSetting($this->_data->componentClass, 'defaultVcardValues');
        }
    }
1145429
protected function setDefaults()
    {
        $this->attributes['name']      = $this->name;
        $this->attributes['classname'] = get_called_class();
        $attributesAdapter             = new AttributesAdapter($this->name);
        $defaults                      = $attributesAdapter->defaults();
        if (!isset($this->attributes['width']) && isset($this->attributes['default_width'])) {
            $this->attributes['width'] = $this->attributes['default_width'];
        }
        if (!isset($this->attributes['height']) && isset($this->attributes['default_height'])) {
            $this->attributes['height'] = $this->attributes['default_height'];
        }
        $this->attributes = array_merge($defaults, $this->attributes);

        $attributes = app(Service::class)->findOne(array_merge($defaults, $this->attributes), uri());

        $this->attributes            = array_merge($this->attributes, $attributes);
        $this->attributes['desktop'] = array_only($this->attributes, ['x', 'y', 'width', 'height']);

        return $this->attributes;
    }
396832
protected function attributeValue() {
        if ($this->scanner->current() != '=') {
            return null;
        }
        $this->scanner->next();
        // 8.1.2.3
        $this->scanner->whitespace();

        $tok = $this->scanner->current();
        switch ($tok) {
            case "\n":
            case "\f":
            case " ":
            case "\t":
                // Whitespace here indicates an empty value.
                return null;
            case '"':
            case "'":
                $this->scanner->next();
                return $this->quotedAttributeValue($tok);
            case '>':
                // case '/': // 8.2.4.37 seems to allow foo=/ as a valid attr.
                $this->parseError("Expected attribute value, got tag end.");
                return null;
            case '=':
            case '`':
                $this->parseError("Expecting quotes, got %s.", $tok);
                return $this->unquotedAttributeValue();
            default:
                return $this->unquotedAttributeValue();
        }
    }
740629
public function getDefaultValue()
    {
        if (!$this->hasDefaultValue) {
            throw new \LogicException(sprintf('Argument $%s does not have a default value. Use %s::hasDefaultValue() to avoid this exception.', $this->name, __CLASS__));
        }

        return $this->defaultValue;
    }
559174
public function getValue()
	{
		$input = $this->getInput();

		$name = $this->name;

		if ($input->getString($name))
		{
			return $input->getString($name);
		}

		foreach ($this->alias as $alias)
		{
			if ($input->getString($alias))
			{
				return $input->getString($alias);
			}
		}

		return $this->default;
	}
47734
public function getPhpDefaultValue()
    {
        if ($this->defaultValue === null) {
            return null;
        }

        if ($this->defaultValue->isExpression()) {
            throw new EngineException("Cannot get PHP version of default value for default value EXPRESSION.");
        }

        if ($this->propelType === PropelTypes::BOOLEAN || $this->propelType === PropelTypes::BOOLEAN_EMU) {
            return $this->booleanValue($this->defaultValue->getValue());
        }

        if (PropelTypes::PHP_ARRAY === $this->propelType) {
            return $this->getDefaultValueForArray($this->defaultValue->getValue());
        }

        return $this->defaultValue->getValue();
    }
820862
public function doGetAttribute()
    {
        return array_key_exists($this->attribute, $this->data) ? $this->data[$this->attribute] : $this->default;
    }
15820
public function getDefaultValues()
    {
        $values = [];
        foreach ($this->getColumns() as $column) {
            $values[$column->getName()] = $column->getDefaultValue();
        }
        return $values;
    }
91149
public function getDefaultValues()
    {
        $result = [];

        foreach ($this->getFormFields() as $attribute => $field) {
            if (($value = array_get($field, 'default')) === null) {
                continue;
            }

            $result[$attribute] = $value;
        }

        return $result;
    }
902643
public function getDefaultValue()
    {
        if (!$this->hasDefaultValue()) {
            return null;
        }

        if ($this->defaultValue instanceof FragmentInterface) {
            //Defined as SQL piece
            return $this->defaultValue;
        }

        if (in_array($this->getAbstractType(), ['time', 'date', 'datetime', 'timestamp'])) {
            return $this->formatDatetime($this->getAbstractType(), $this->defaultValue);
        }

        switch ($this->getType()) {
            case 'int':
                return (int)$this->defaultValue;
            case 'float':
                return (float)$this->defaultValue;
            case 'bool':
                if (is_string($this->defaultValue) && strtolower($this->defaultValue) == 'false') {
                    return false;
                }

                return (bool)$this->defaultValue;
        }

        return (string)$this->defaultValue;
    }
1308194
public function getValueAttribute()
    {
        if (!isset($this->cachedValue)) {
            $this->cachedValue = $this->getDataTypeRegistry()
                ->getHandlerForType($this->type)
                ->unserializeValue($this->attributes['value']);
        }

        return $this->cachedValue;
    }
928092
def get_default_value(self):
        
        if ('default_value' in self.attributes and
                bool(self.attributes['default_value'].strip())):
            return self.attributes['default_value']
        else:
            return None
1325172
public function getValue()
    {

        $value = $this->defaultValue;
        if ($this->existsRequest()) {
            $value = trim($_GET[$this->requestName]);
        }

        return $value;

    }