Applies default values to this object.
This method should be called from the object's constructor (or
equivalent initialization method).
@see __construct()
356758
public function applyDefaultValues()
    {
        $this->is_translation = false;
        $this->is_rotation = false;
        $this->is_acyclic = false;
        $this->is_cyclic = false;
        $this->is_composite = false;
        $this->is_multiple = false;
        $this->importance = 0;
        $this->version = 0;
    }
487530
protected function initializeFromFormDefaults()
    {
        $typeDefinition = $this->formFieldTypeManager->getMergedTypeDefinition($this->type);
        $this->setOptions($typeDefinition);
    }
193834
protected function initIterator()
    {
        // level 1 ezpFieldSet
        if ( $this->childrenFieldSets !== null )
        {
            $this->iteratorData = $this->childrenFieldSets[$this->activeLanguage]->fields;
            $this->iteratorPointer = array_keys( $this->iteratorData );
        }
        else
        {
            $this->iteratorData =  $this->fields;
            $this->iteratorPointer = array_keys( $this->iteratorData );
        }
    }
340887
public function init()
    {
        $this->values      = Enum66::getValues();
        $this->enumerators = Enum66::getEnumerators();

        $this->emptyMap = new EnumMap(Enum66::class);
        $this->fullMap  = new EnumMap(Enum66::class);
        foreach ($this->enumerators as $i => $enumerator) {
            $this->fullMap->offsetSet($enumerator, $i);
        }
    }
1268598
private function _applyDefaults() {
		foreach($this->_flags as $flag => $settings) {
			$this[$flag] = $settings['default'];
		}

		foreach($this->_options as $option => $settings) {
			// If the default is 0 we should still let it be set.
			if (!empty($settings['default']) || $settings['default'] === 0) {
				$this[$option] = $settings['default'];
			}
		}
	}
1363826
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params) {
            foreach ($params as $param) {
                if ($param->getType() == "config") {
                    $this->configParameters[] = $param;
                } else {
                    if ($param->getName() == "encoding") {
                        $this->setEncoding($param->getValue());
                    }
                }
            }
        }
    }
928537
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $_i = count($params); $i < $_i; $i++) {
                if (self::FUNCTION_KEY == $params[$i]->getName()) {
                    $this->function = (string) $params[$i]->getValue();
                    break;
                }
            }
        }
    }
983787
private function setDefaultValues()
    {
        // Set default payment action.
        if (empty($this->paymentAction)) {
            $this->paymentAction = 'Sale';
        }

        // Set default locale.
        if (empty($this->locale)) {
            $this->locale = 'en_US';
        }

        // Set default value for SSL validation.
        if (empty($this->validateSSL)) {
            $this->validateSSL = false;
        }
    }
342927
protected function initialize()
    {
        $this->configuration = new ValueHolder($this->loadConfiguration());
        $this->defaults = new ValueHolder($this->getDefaults());

        return $this;
    }
1341558
def set_defaults(object, filter = method(:skip_default?))
      each do |attribute|
        next if filter.call(object, attribute)
        attribute.set_default_value(object)
      end
    end
713447
public function initConstructorArgs()
    {
        $constructor = $this->reflected->getConstructor();

        if (!is_null($constructor)) {
            // Index parameters by their names
            foreach ($constructor->getParameters() as $param) {
                $name = Util::snakeToCamelCase($param->getName());
                $this->constructorArgs[$name] = $param;
            }
        }
    }
1111625
private function _setDefaults()
    {
        if (!isset(self::$_template))
            self::_initializeDefaults();
        foreach (self::$_template as $k=>$v) {
            if ($k[0] != '_')
                $this->$k = $v;
        }
        return $this;
    }
777922
protected function setupObject()
    {
        $this->name = $this->getAttribute("name");
        $this->value = $this->getAttribute("value");
        $this->classname = $this->getAttribute("class");

        /*
        * Set some default values if they are not specified.
        * This is especially useful for maxLength; the size
        * is already known by the column and this way it is
        * not necessary to manage the same size two times.
        *
        * Currently there is only one such supported default:
        *   - maxLength value = column max length
        *   (this default cannot be easily set at runtime w/o changing
        *   design of class system in undesired ways)
        */
        if ($this->value === null) {
            switch ($this->name) {
                case 'maxLength':
                    $this->value = $this->validator->getColumn()->getSize();
                    break;
            }
        }

        $this->message = $this->getAttribute("message");
    }
821427
public function setDefaultValue($value)
    {
        $value = $this->mmAttribute->valueToWidget($value);

        $this->set('value', $value);

    }
446806
protected function applyValues() {
        foreach($this->_elements as $element) {
            $name = $element->getAttribute("name");
            if(isset($this->_values[$name]))
                $element->setAttribute("value", $this->_values[$name]);
            elseif(substr($name, -2) == "[]" && isset($this->_values[substr($name, 0, -2)]))
                $element->setAttribute("value", $this->_values[substr($name, 0, -2)]);
        }
    }
680127
public function initialize()
    {
        if (is_null($value = $this->getValue())) {
            $value = request()->input($this->getAlias());
        }

        $this->setValue($value);
    }
322123
private function initProphecyReturnValues() {
		$reflection = new \Maybe\Util\Reflection($this->classname);
		
		$returnTypes = $reflection->getReturnTypes();
		foreach ($returnTypes as $method => $type) {
			$this->initProphecyReturnValueForMethod($method, $type);
		}
	}